#pragma once #include "afx.h" #include "XMLSerialization.h" namespace OTSDATA { // COTSSegment class __declspec(dllexport) COTSSegment : public xmls::ISlo { public: // constructor COTSSegment(); // constructor COTSSegment(long a_nHeight, long a_nStart, long a_nLength); // constructor COTSSegment(const COTSSegment&); // copy constructor COTSSegment(COTSSegment*); // copy constructor COTSSegment& operator=(const COTSSegment&); // =operator BOOL operator==(const COTSSegment&); // ==operator virtual ~COTSSegment(); // destructor // serialization void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode); long GetHeight() { return m_nHeight; } void SetHeight(long a_nHeight) { m_nHeight = a_nHeight; } long GetStart() { return m_nStart; } void SetStart(long a_nStart) { m_nStart = a_nStart; } long GetEnd() { return m_nStart + m_nLength; } void SetEnd(long end) { m_nLength = end - m_nStart; } long GetLength() { return m_nLength; } void SetLength(long a_nLength) { m_nLength = a_nLength; } BOOL UpDownConection(const COTSSegment &a_Segment); protected: // cleanup void Cleanup(); // initialization void Init(); // duplication void Duplicate(const COTSSegment& a_oSource); // height long m_nHeight; // start long m_nStart; // length long m_nLength; }; typedef std::shared_ptr __declspec(dllexport) COTSSegmentPtr; typedef std::vector __declspec(dllexport) COTSSegmentsList; }