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.
kev/Drawer/Module/GeoSigmaDraw/InterfaceRecovery.cpp

46 lines
900 B
C++

#include "stdafx.h"
#include "SigmaView.h"
#include "Util.h"
#include "SigmaStore.h"
#include "SigmaDoc.h"
#include "UndoManager/UndoManager.h"
#include "StorageFactory.h"
/**
* 获取对应文件的备份 SigmaDoc 指针
*
* \param filePath 文件的绝对路径
* \return 如果存在相应的备份信息,返回 SigamDoc 指针,否则返回 nullptr
*/
extern "C" __declspec(dllexport)
bool SigmaDocBackupExists(const LPCTSTR filePath)
{
assert(filePath != nullptr);
return CSigmaStore::GetInstance().Exist(filePath);
}
/**
* 清理对应的备份文件
*
* \param pDoc
*/
extern "C" __declspec(dllexport)
void SigmaDocClearBackup(CSigmaDoc* pDoc)
{
assert(pDoc != nullptr);
if (pDoc->m_FileName.IsEmpty())
{
return;
}
CSigmaStore::GetInstance().Clear(pDoc->m_FileName);
}
extern "C" __declspec(dllexport)
void SigmaDocEnableRecoverMode(CSigmaView* pView, bool enable)
{
pView->m_pDoc->EnableRecoverMode(enable);
}