#pragma once #include "IntRange.h" #include "ElementRange.h" using namespace OTSDATA; namespace OTSClassifyEngine{ // CSTDItem command target class __declspec(dllexport) CSTDItem : public xmls::ISlo { public: CSTDItem(); // constructor CSTDItem(const CSTDItem&); // copy constructor CSTDItem(CSTDItem*); // copy constructor CSTDItem& operator=(const CSTDItem&); // =operator BOOL operator==(const CSTDItem&); // ==operator virtual ~CSTDItem(); // destructor // serialization void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode); // name CString GetName() { return m_strName; } void SetName(CString a_strName) { m_strName = a_strName; } // color CString GetColor() { return m_clrColor; } void SetColor(CString a_clrColor) { m_clrColor = a_clrColor; } // circle radio double GetCircleRadio() { return m_dCircleRadio; } void SetCircleRadio(double a_dCircleRadio) { m_dCircleRadio = a_dCircleRadio; } // rectangle radio double GetRectRadio() { return m_dRectRadio; } void SetRectRadio(double a_dRectRadio) { m_dRectRadio = a_dRectRadio; } // STD id int GetSTDId() { return m_nSTDId; } void SetSTDId(int a_nSTDId) { m_nSTDId = a_nSTDId; } // width/height radio double GetWidth_HeightRadio() { return m_dWidth_Height; } void SetWidth_HeightRadio(double a_dWidth_Height) { m_dWidth_Height = a_dWidth_Height; } // gray level range CIntRangePtr GetGrayLevelRange() { return m_poGrayLevel; } void SetGrayLevelRange(CIntRangePtr a_poGrayLevel) { m_poGrayLevel = a_poGrayLevel; } // element range list CElementRangeList& GetElementRangeList() { return m_listElementRange; } void SetElementRangeList(CElementRangeList& a_istElementRange, BOOL a_bClear = TRUE); // element range num void SetElementRange(int a_nElementRangeNum) { m_nElementRangeNum = a_nElementRangeNum; } int GetElementRange() { return m_nElementRangeNum; } protected: // cleanup void Cleanup(); // initialization void Init(); // duplication void Duplicate(const CSTDItem& a_oSource); // name CString m_strName; // color CString m_clrColor;//COLORREF, C# can't access // circle radio double m_dCircleRadio; // rectangle radio double m_dRectRadio; // STD id int m_nSTDId; // width/height radio double m_dWidth_Height; // gray level range CIntRangePtr m_poGrayLevel; // element range num int m_nElementRangeNum; // element range list CElementRangeList m_listElementRange; }; typedef std::shared_ptr __declspec(dllexport) CSTDItemPtr; typedef std::vector __declspec(dllexport) CSTDItemsList; }