Improved error handling and reporting when loading/saving project files; added file lock class to prevent the same project from being opened in multiple PWE instances

This commit is contained in:
Aruki
2017-02-10 14:52:47 -07:00
parent 6d77604667
commit 882973d9d5
21 changed files with 321 additions and 78 deletions

View File

@@ -1,15 +1,22 @@
#include "CAssetNameMap.h"
void CAssetNameMap::LoadAssetNames(TString Path /*= gkAssetMapPath*/)
bool CAssetNameMap::LoadAssetNames(TString Path /*= gkAssetMapPath*/)
{
CXMLReader Reader(Path);
Serialize(Reader);
if (Reader.IsValid())
{
Serialize(Reader);
return true;
}
else return false;
}
void CAssetNameMap::SaveAssetNames(TString Path /*= gkAssetMapPath*/)
bool CAssetNameMap::SaveAssetNames(TString Path /*= gkAssetMapPath*/)
{
CXMLWriter Writer(Path, "AssetNameMap", 0, eUnknownGame);
Serialize(Writer);
return Writer.Save();
}
bool CAssetNameMap::GetNameInfo(CAssetID ID, TString& rOutDirectory, TString& rOutName)