#pragma once #include "afx.h" #include "stdafx.h" #include "BSEImg.h" #include "OTSFileSys.h" #include "OTSHelper.h" #include "XMLSerialization.h" namespace OTSMODEL { using namespace OTSDATA; // BSE image file mark const int BSE_IMG_FILE_MARK = 'B' + 'S' + 'E' + 'I' + 'M' + 'G' ; // BSE image file version string const CString BSE_IMG_FILE_VERSION = _T("1.1.1"); // BSE image const CString BSE_IMG_FILE_EXT = _T(".img"); const CString BSE_IMG_FILE_FILTER = _T("BSE image Files (*.img)|*.img||"); // bmp image const CString BMP_IMG_FILE_EXT = _T(".bmp"); const CString BMP_IMG_FILE_FILTER = _T("Bitmap image Files (*.bmp)|*.bmp||"); class __declspec(dllexport) CBSEImgFileMgr : public CObject, public xmls::ISlo { protected: //DECLARE_SERIAL(CBSEImgFileMgr) public: CBSEImgFileMgr(); virtual ~CBSEImgFileMgr(); // serialization //void Serialize(CArchive& ar); // Load/Save /*BOOL Load(CString a_strPathName = _T(""), BOOL a_bClear = TRUE); BOOL Save(CString a_strPathName = _T(""));*/ // LoadFromBitmap BOOL LoadFromBitmap(CString a_strPathName = _T(""), BOOL a_bClear = TRUE); BOOL SaveIntoBitmap(CString a_strPathName = _T("")); // file pathname CString GetPathName() { return m_strPathName; } void SetPathName(CString a_strPathName) { m_strPathName = a_strPathName; } //image CBSEImgPtr GetBSEImg() { return m_poBSE; } void SetBSEImg(CBSEImgPtr a_poBSE); //void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode); protected: // cleanup //void Cleanup(); //// initialization //void Init(int w,int h); //// duplication //void Duplicate(const CBSEImgFileMgr& a_oSource); // file pathname CString m_strPathName; // BSE image CBSEImgPtr m_poBSE; }; typedef std::shared_ptr __declspec(dllexport) CBSEImgFileMgrPtr; }