#pragma once #include "IntRange.h" namespace OTSCLRINTERFACE { using namespace System; using namespace OTSDATA; public ref class CIntRangeClr : public Object { public: CIntRangeClr(); !CIntRangeClr(); ~CIntRangeClr(); CIntRangeClr(CIntRangePtr a_pIntRange); // copy constructor,can only be used in C++ ,because the original C++ type. CIntRangeClr(int a_nStart, int a_nEnd); // data in range bool DataInRange(int a_nData); // start long GetStart() { return mIntRange->get()->GetStart(); } void SetStart(int a_nStart); // end long GetEnd() { return mIntRange->get()->GetEnd(); }//C++ type cann't be recognized by CLR,so all the exposed type must be the original type(int long bool etc.) or clr type. void SetEnd(int a_nEnd); // get pointer CIntRangePtr GetCIntRangePtr();//C++ type cann't be recognized by CLR. private: CIntRangePtr* mIntRange; }; }