IntRangeClr.h 928 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include "IntRange.h"
  3. namespace OTSCLRINTERFACE {
  4. using namespace System;
  5. using namespace OTSDATA;
  6. public ref class CIntRangeClr : public Object
  7. {
  8. public:
  9. CIntRangeClr();
  10. !CIntRangeClr();
  11. ~CIntRangeClr();
  12. CIntRangeClr(CIntRangePtr a_pIntRange); // copy constructor,can only be used in C++ ,because the original C++ type.
  13. CIntRangeClr(int a_nStart, int a_nEnd);
  14. // data in range
  15. bool DataInRange(int a_nData);
  16. // start
  17. long GetStart() { return mIntRange->get()->GetStart(); }
  18. void SetStart(int a_nStart);
  19. // end
  20. 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.
  21. void SetEnd(int a_nEnd);
  22. // get pointer
  23. CIntRangePtr GetCIntRangePtr();//C++ type cann't be recognized by CLR.
  24. private:
  25. CIntRangePtr* mIntRange;
  26. };
  27. }