#pragma once #include "stdafx.h" #include #include #include #include #include "IActionStorage.h" #include "StorageFactory.h" /** * CSigmaStore 负责SigmaDoc 的存储和加载 */ class CSigmaStore { public: ~CSigmaStore(); static CSigmaStore& GetInstance() { static CSigmaStore store(StorageFactory::GetInstance().CreateDefaultStorage()); return store; } CSigmaStore(const CSigmaStore& other) = delete; CSigmaStore(CSigmaStore&& other) noexcept = delete; bool Exist(const CString& path); bool Load(CSigmaDoc* pDoc, const CString& path); bool Save(CSigmaDoc* pDoc); void Clear(const CString& path); private: CSigmaStore(std::shared_ptr storage); class Impl; std::unique_ptr m_impl; };