| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #pragma once
- #include "TriTempItem.h"
- namespace OTSMODEL {
- using namespace OTSDATA;
- // triangle template file mark
- const int TRIA_TEMP_FILE_MARK = 'T' + 'R' + 'I' + 'A' + 'T' + 'E' + 'M' + 'P';
- const CString TRIA_TEMP_NAME = _T("TriangulationTemplate");
- // triangle template file version
- const CString TRIA_TEMP_FILE_VERSION = _T("1.3.1");
- // triangle template file extension
- const CString TRIA_TEMP_FILE_EXT = _T(".tpf");
- const CString TRIA_TEMP_FILE_FILTER = _T("Triangle Template Files (*.tpf)|*.tpf||");
- class __declspec(dllexport) CTriTempFile :public xmls::ISlo
- {
- public:
- CTriTempFile(); // constructor
- CTriTempFile(const CTriTempFile&); // copy constructor
- CTriTempFile(CTriTempFile*); // copy constructor
- CTriTempFile& operator=(const CTriTempFile&); // =operator
- BOOL operator==(const CTriTempFile&); // ==operator
- virtual ~CTriTempFile(); // 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; }
- //version
- CString GetVersion() { return m_strVersion; }
- void SetVersion(CString a_strVersion) { m_strVersion = a_strVersion; }
- // triangle template list
- CTriTempItemList& GetTriTempItemList() { return m_listTriTempItem; }
- void SetTriTempItemList(CTriTempItemList& a_listTriTemp, BOOL a_bClear = TRUE);
- CTriTempItemPtr GetTriTempByIndex(int a_nIndex);
- CTriTempItemPtr GetTriTempByName(CString a_strPartSizeName);
- protected:
- // cleanup
- void Cleanup();
- // initialization
- void Init();
- // duplication
- void Duplicate(const CTriTempFile& a_oSource);
- // name
- CString m_strName;
- //Version
- CString m_strVersion;
- // triangle template list
- CTriTempItemList m_listTriTempItem;
- };
- typedef std::shared_ptr<CTriTempFile> CTriTempFilePtr;
- typedef std::vector<CTriTempFilePtr> CTriTempFilePtrList;
- }
|