You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
#include <chrono>
|
|
|
|
|
|
#include <filesystem>
|
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
#include "IActionStorage.h"
|
|
|
|
|
|
#include "StorageFactory.h"
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* CSigmaStore <EFBFBD><EFBFBD><EFBFBD><EFBFBD>SigmaDoc <EFBFBD>Ĵ洢<EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
*/
|
|
|
|
|
|
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<IActionStorage> storage);
|
|
|
|
|
|
|
|
|
|
|
|
class Impl;
|
|
|
|
|
|
std::unique_ptr<Impl> m_impl;
|
|
|
|
|
|
};
|