Added: #1440 Storage functions for process result metadata

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent 60fdb1c23e
commit 1c3d8e6609

@ -153,9 +153,24 @@ std::string CMetadataStorage::getResultPath(const std::string &projectName, cons
void CMetadataStorage::readProcessResult(CProcessResult &result, const std::string &path)
{
// TODO
if (!NLMISC::CFile::fileExists(path))
{
nlwarning("Process running for the first time, this may take a long time");
result.clear();
// TODO
return;
}
NLMISC::CIFile is(path, false);
result.serial(is);
is.close();
}
void CMetadataStorage::writeProcessResult(const CProcessResult &result, const std::string &path)
{
NLMISC::COFile os(path, false, false, true);
const_cast<CProcessResult &>(result).serial(os);
os.flush();
os.close();
}
///////////////////////////////////////////////////////////////////////

@ -155,6 +155,7 @@ public:
// Pathname for result metadata is like .../project.projectname.meta/pluginname.result
static std::string getResultPath(const std::string &projectName, const std::string &pluginName);
static void readProcessResult(CProcessResult &result, const std::string &path);
static void writeProcessResult(const CProcessResult &result, const std::string &path);
}; /* class CMetadataStorage */

Loading…
Cancel
Save