| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #pragma once
- #include "stdafx.h"
- #include "PartSizeFile.h"
- #include "RptParamFileMgr.h"
- namespace OTSMODEL {
- using namespace OTSDATA;
- // CPartSTDFileMnr command target
- class __declspec(dllexport) CPartSizeFileMgr
- {
- public:
- CPartSizeFileMgr(); // constructor
- CPartSizeFileMgr(const CPartSizeFileMgr&); // copy constructor
- CPartSizeFileMgr(CPartSizeFileMgr*); // copy constructor
- CPartSizeFileMgr& operator=(const CPartSizeFileMgr&); // =operator
- BOOL operator==(const CPartSizeFileMgr&); // ==operator
- virtual ~CPartSizeFileMgr(); // destructor
- // LoadAll/SaveAll
- BOOL LoadAll(CString a_strPathName = _T(""), BOOL a_bClear = TRUE);
- BOOL SaveAll(CString a_strPathName = _T(""), CString a_SizeName = _T(""));
- // Load/Save
- BOOL Load(CString a_strPathName = _T(""), BOOL a_bClear = TRUE);
- BOOL Save(CString a_strPathName = _T(""));
- // load/save a part size from a text file
- BOOL LoadPartSizeFromTextFile(CString a_strFilePathName = _T(""));
- BOOL SavePartSizeTextFile(CString a_strFilePathName = _T(""));
- // std items list
- void SetPartSizeItemList(std::vector<double>& a_listSTDItems, BOOL a_bClear = TRUE);
-
- CPartSizeItemPtr GetPartSizeItemByIndex(int a_nIndex);
- CPartSizeItemPtr GetPartSizeItemByName(CString a_strName);
- BOOL DeletePartSizeItemByIndex(int a_nIndex);
- BOOL DeletePartSizeItemByPart(double d_Part);
-
- BOOL AddPartSizeItem(double a_poPartSizeItem);
-
- BOOL EditPartSizeItem(int a_nIndex, CPartSizeItemPtr a_poPartSizeItem);
- // particle analysis standard data
- CPartSizeFilePtr GetPartSizeFile() { return m_poPartSizeFile; }
- void SetPartSizeFile(CPartSizeFilePtr);
- // 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 CPartSizeFileMgr& a_oSource);
- // get part size
- CPartSizeItemPtr GetLevel(CString a_strValue);
- // get part size body
- CString GetPartSizeTextBody(CPartSizeFilePtr a_pPartSizeFile);
- // particle size level data
- CPartSizeFilePtr m_poPartSizeFile;
- // file pathname
- CString m_strPathName;
- // modify flag
- BOOL m_bModify;
- };
- typedef std::shared_ptr<CPartSizeFileMgr> __declspec(dllexport) CPartSizeFileMgrPtr;
- }
|