12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #pragma once
- #include "XMLSerialization.h"
- namespace OTSDATA
- {
- /*using namespace xmls;*/
- class __declspec(dllexport) CIntRange : public xmls::ISlo
- {
- /*protected:
- DECLARE_SERIAL(CIntRange)*/
- public:
- CIntRange(); // constructor
- CIntRange(long a_nStart, long a_nEnd); // constructor
- CIntRange(const CIntRange&); // copy constructor
- CIntRange(CIntRange*); // copy constructor
- CIntRange& operator=(const CIntRange&); // =operator
- BOOL operator==(const CIntRange&); // =operator
- virtual ~CIntRange(); // detractor
- // serialization
- //void Serialize(CArchive& ar);
- void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
- // data in range
- BOOL DataInRange(long a_nData);
- // start
- long GetStart() const { return m_nStart; }
- void SetStart(long a_nStart);
- // end
- long GetEnd() const { return m_nEnd; }
- void SetEnd(long a_nEnd);
- // normalize
- void Normalise();
- protected:
- // cleanup
- void Cleanup();
- // initialization
- void Init();
- // duplication
- void Duplicate(const CIntRange& a_oSource);
-
- private:
- // start
- long m_nStart;
- // end
- long m_nEnd;
- };
- typedef std::shared_ptr<CIntRange> __declspec(dllexport) CIntRangePtr;
- typedef std::vector<CIntRangePtr> __declspec(dllexport) CIntRangeList;
- }
|