| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #pragma once
- #include "stdafx.h"
- #include "TriTempFile.h"
- namespace OTSMODEL {
- // CPartSTDFileMnr command target
- class __declspec(dllexport) CTriTempFileMgr
- {
- public:
- CTriTempFileMgr(); // constructor
- CTriTempFileMgr(const CTriTempFileMgr&); // copy constructor
- CTriTempFileMgr(CTriTempFileMgr*); // copy constructor
- CTriTempFileMgr& operator=(const CTriTempFileMgr&); // =operator
- BOOL operator==(const CTriTempFileMgr&); // ==operator
- virtual ~CTriTempFileMgr(); // destructor
- // Load/Save
- BOOL Load(CString a_strPathName = _T(""), BOOL a_bClear = TRUE);
- BOOL Save(CString a_strPathName = _T(""));
- // std items list
- void SetTriTempItemList(CTriTempItemList& a_listSTDItems, BOOL a_bClear = TRUE);
- CTriTempItemPtr GetTriTempItemByIndex(int a_nIndex);
- CTriTempItemPtr GetTriTempItemByName(CString a_strName);
- BOOL DeleteTriTempItemByIndex(int a_nIndex);
- BOOL AddTriTempItem(CTriTempItemPtr a_poTriTempItem);
- BOOL InsertTriTempItem(int a_nIndex, CTriTempItemPtr a_poTriTempItem);
- BOOL EditTriTempItem(int a_nIndex, CTriTempItemPtr a_poTriTempItem);
- // triangle template standard data
- CTriTempFilePtr GetTriTempFile() { return m_poTriTempFile; }
- void SetTriTempFile(CTriTempFilePtr);
- // file pathname
- CString GetPathName() { return m_strPathName; }
- void SetPathName(CString a_strPathName) { m_strPathName = a_strPathName; }
- // modify flag
- BOOL IsModified() { return m_bModify; }
- void SetModify(BOOL a_bModify = TRUE) { m_bModify = a_bModify; }
- protected:
- // cleanup
- void Cleanup();
- // initialization
- void Init();
- // duplication
- void Duplicate(const CTriTempFileMgr& a_oSource);
- // particle size level data
- CTriTempFilePtr m_poTriTempFile;
- // file pathname
- CString m_strPathName;
- // modify flag
- BOOL m_bModify;
- };
- typedef std::shared_ptr<CTriTempFileMgr> __declspec(dllexport) CTriTempFileMgrPtr;
- }
|