From 71cd3be857ded9126fd25fe5a2a2f192da719e98 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 30 Jul 2012 16:26:18 +0200 Subject: [PATCH] Added: #1440 Project output meta file format --HG-- branch : build_pipeline_v3 --- .../pipeline/service/database_status.cpp | 14 +++++++++++ .../tools/pipeline/service/database_status.h | 23 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/code/nel/tools/pipeline/service/database_status.cpp b/code/nel/tools/pipeline/service/database_status.cpp index 449715ac6..8d255cf0d 100644 --- a/code/nel/tools/pipeline/service/database_status.cpp +++ b/code/nel/tools/pipeline/service/database_status.cpp @@ -178,6 +178,20 @@ void CFileRemove::serial(NLMISC::IStream &stream) throw (NLMISC::EStream) stream.serial(Lost); } +void CProjectOutput::CFileOutput::serial(NLMISC::IStream &stream) throw (NLMISC::EStream) +{ + uint version = stream.serialVersion(1); + stream.serial(CRC32); + stream.serial((uint8 &)Level); // test this :o) +} + +void CProjectOutput::serial(NLMISC::IStream &stream) throw (NLMISC::EStream) +{ + uint version = stream.serialVersion(1); + stream.serialCont(FilePaths); + stream.serialCont(FileOutputs); +} + CDatabaseStatus::CDatabaseStatus() { //CFile::createDirectoryTree(g_WorkspaceDirectory + PIPELINE_DATABASE_STATUS_SUBDIR); diff --git a/code/nel/tools/pipeline/service/database_status.h b/code/nel/tools/pipeline/service/database_status.h index e656bdc58..e688dc22b 100644 --- a/code/nel/tools/pipeline/service/database_status.h +++ b/code/nel/tools/pipeline/service/database_status.h @@ -64,6 +64,14 @@ std::string getMetaFilePath(const std::string &path, const std::string &dotSuffi // Status is generated CRC32 for reference. // Errors are errors caused by using this file as an input or output file. +enum TFileState +{ + Unknown = 0, + Success = 1, + Warning = 2, + Error = 3, + Removal = 4, +}; struct CFileError { @@ -102,6 +110,21 @@ public: void serial(NLMISC::IStream &stream) throw (NLMISC::EStream); }; +struct CProjectOutput +{ + std::vector FilePaths; + struct CFileOutput + { + uint32 CRC32; + TFileState Level; + + void serial(NLMISC::IStream &stream) throw (NLMISC::EStream); + }; + std::vector FileOutputs; + + void serial(NLMISC::IStream &stream) throw (NLMISC::EStream); +}; + typedef CCallback TFileStatusCallback; /**