#pragma once #include "Frames/Frame.h" #include "Wrapping/Value.h" #include "Wrapping/WrappedSmartPtr.h" namespace Bblids { namespace Wrapping { // ----------------------------------------------------------------------------- // ***************************************************************************** // ----------------------------------------------------------------------------- public ref class CFrame : System::IEquatable { public: CFrame(); CFrame(const Bblids::Frames::PFrame& parFrame); CFrame(CFrame% parOther); public: void Clear() { FWrappedFrame->Clear(); } void Phony_Clear() { FWrappedFrame->Phony_Clear(); } bool Sound() { return (FWrappedFrame->Sound()); } bool Phony_Sound() { return (FWrappedFrame->Phony_Sound()); } void Refresh() { FWrappedFrame->Refresh(); } void Phony_Refresh() { FWrappedFrame->Phony_Refresh(); } void Clone(CFrame% outClone) { FWrappedFrame->Clone(outClone.FWrappedFrame.Get()); } void Swap(CFrame% parOther) { FWrappedFrame->Swap(parOther.FWrappedFrame.Get()); } void Swap_Ptr(CFrame% parOther) { FWrappedFrame->Swap_Ptr(parOther.FWrappedFrame.Get()); } public: property CValue::CGuid Uid { CValue::CGuid get() { return (CValue::NativeToGuid(FWrappedFrame->Uid().GetConstAsValue())); } void set(CValue::CGuid parValue) { Bblids::Frames::TValue native_value(FWrappedFrame->Uid().GetConstAsValue()); CValue::NativeFromGuid(native_value, parValue); FWrappedFrame->Uid().SetAsValue(native_value); } } property CValue::CString Name { CValue::CString get() { return (CValue::NativeToString(FWrappedFrame->Name().GetConstAsValue())); } void set(CValue::CString parValue) { Bblids::Frames::TValue native_value(FWrappedFrame->Name().GetConstAsValue()); CValue::NativeFromString(native_value, parValue); FWrappedFrame->Name().SetAsValue(native_value); } } public: virtual bool Equals(CFrame^ parOther); bool operator ==(CFrame% parOther) { return (parOther.FWrappedFrame.Get() == FWrappedFrame.Get()); } bool operator !=(CFrame% parOther) { return (parOther.FWrappedFrame.Get() != FWrappedFrame.Get()); } public: const Bblids::Frames::PFrame& GetWrappedFrame() { return (FWrappedFrame.Get()); } void GetWrappedFrame(Bblids::Frames::PFrame& outPFrame) { outPFrame = FWrappedFrame.Get(); } private: CWrappedSmartPtr FWrappedFrame; }; // ----------------------------------------------------------------------------- // ***************************************************************************** // ----------------------------------------------------------------------------- }}