From a2daa6baf6e15de70c72ff2549ee154da9ceb342 Mon Sep 17 00:00:00 2001 From: Alesandro Dragnev Date: Mon, 7 Oct 2024 17:44:37 +0300 Subject: [PATCH] Adding GetPhysicalUnit and SetPhysicalUnit --- src/Implementation/CGdtfSubPhysicalUnit.cpp | 19 +++++++++++++++++++ src/Implementation/CGdtfSubPhysicalUnit.h | 2 ++ src/Include/IMediaRessourceVectorInterface.h | 2 ++ 3 files changed, 23 insertions(+) diff --git a/src/Implementation/CGdtfSubPhysicalUnit.cpp b/src/Implementation/CGdtfSubPhysicalUnit.cpp index fff6f303..d164f598 100644 --- a/src/Implementation/CGdtfSubPhysicalUnit.cpp +++ b/src/Implementation/CGdtfSubPhysicalUnit.cpp @@ -44,6 +44,15 @@ VectorworksMVR::VCOMError VectorworksMVR::CGdtfSubPhysicalUnitImpl::GetPhysicalT return kVCOMError_NoError; } +VectorworksMVR::VCOMError VectorworksMVR::CGdtfSubPhysicalUnitImpl::GetPhysicalUnit(GdtfDefines::EGdtfPhysicalUnit& unit) +{ + // Check Pointer + if ( ! fSubPhysicalUnit) return kVCOMError_NotInitialized; + + unit = fSubPhysicalUnit->GetPhysicalUnit(); + return kVCOMError_NoError; +} + VectorworksMVR::VCOMError VectorworksMVR::CGdtfSubPhysicalUnitImpl::SetType(GdtfDefines::EGdtfSubPhysicalUnitType type) { // Check Pointer @@ -64,6 +73,16 @@ VectorworksMVR::VCOMError VectorworksMVR::CGdtfSubPhysicalUnitImpl::SetPhysicalF return kVCOMError_NoError; } +VectorworksMVR::VCOMError VectorworksMVR::CGdtfSubPhysicalUnitImpl::SetPhysicalUnit(GdtfDefines::EGdtfPhysicalUnit& unit) +{ + // Check Pointer + if( ! fSubPhysicalUnit) return kVCOMError_NotInitialized; + + fSubPhysicalUnit->SetPhysicalUnit(unit); + + return kVCOMError_NoError; +} + VectorworksMVR::VCOMError VectorworksMVR::CGdtfSubPhysicalUnitImpl::SetPhysicalTo(double physicalTo) { // Check Pointer diff --git a/src/Implementation/CGdtfSubPhysicalUnit.h b/src/Implementation/CGdtfSubPhysicalUnit.h index 01507869..202341f5 100644 --- a/src/Implementation/CGdtfSubPhysicalUnit.h +++ b/src/Implementation/CGdtfSubPhysicalUnit.h @@ -18,10 +18,12 @@ namespace VectorworksMVR virtual VCOMError VCOM_CALLTYPE GetType(GdtfDefines::EGdtfSubPhysicalUnitType& type); virtual VCOMError VCOM_CALLTYPE GetPhysicalFrom(double& physicalFrom); virtual VCOMError VCOM_CALLTYPE GetPhysicalTo(double& physicalTo); + virtual VCOMError VCOM_CALLTYPE GetPhysicalUnit(GdtfDefines::EGdtfPhysicalUnit& unit); virtual VCOMError VCOM_CALLTYPE SetType(GdtfDefines::EGdtfSubPhysicalUnitType type); virtual VCOMError VCOM_CALLTYPE SetPhysicalFrom(double physicalFrom); virtual VCOMError VCOM_CALLTYPE SetPhysicalTo(double physicalTo); + virtual VCOMError VCOM_CALLTYPE SetPhysicalUnit(GdtfDefines::EGdtfPhysicalUnit& unit); virtual VCOMError VCOM_CALLTYPE BindToObject(void* objAddr); virtual void* VCOM_CALLTYPE GetBoundObject(); diff --git a/src/Include/IMediaRessourceVectorInterface.h b/src/Include/IMediaRessourceVectorInterface.h index 66fa0557..cb948f34 100644 --- a/src/Include/IMediaRessourceVectorInterface.h +++ b/src/Include/IMediaRessourceVectorInterface.h @@ -521,10 +521,12 @@ namespace VectorworksMVR virtual VCOMError VCOM_CALLTYPE GetType(GdtfDefines::EGdtfSubPhysicalUnitType& type) = 0; virtual VCOMError VCOM_CALLTYPE GetPhysicalFrom(double& physicalFrom) = 0; virtual VCOMError VCOM_CALLTYPE GetPhysicalTo(double& physicalTo) = 0; + virtual VCOMError VCOM_CALLTYPE GetPhysicalUnit(GdtfDefines::EGdtfPhysicalUnit& unit) = 0; virtual VCOMError VCOM_CALLTYPE SetType(GdtfDefines::EGdtfSubPhysicalUnitType type) = 0; virtual VCOMError VCOM_CALLTYPE SetPhysicalFrom(double physicalFrom) = 0; virtual VCOMError VCOM_CALLTYPE SetPhysicalTo(double physicalTo) = 0; + virtual VCOMError VCOM_CALLTYPE SetPhysicalUnit(GdtfDefines::EGdtfPhysicalUnit& unit) = 0; virtual VCOMError VCOM_CALLTYPE BindToObject(void* objAddr) = 0; virtual void* VCOM_CALLTYPE GetBoundObject() = 0;