From e54956bf0fe058c9f886c069a34cbda33a0e1301 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 30 Jul 2012 17:34:37 +0200 Subject: [PATCH] Changed: #1440 Some comments and naming --HG-- branch : build_pipeline_v3 --- .../pipeline/service/metadata_storage.cpp | 6 ++--- .../tools/pipeline/service/metadata_storage.h | 27 +++++++++++-------- .../pipeline/service/workspace_storage.h | 3 +++ 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/code/nel/tools/pipeline/service/metadata_storage.cpp b/code/nel/tools/pipeline/service/metadata_storage.cpp index 61c02818b..40541ce27 100644 --- a/code/nel/tools/pipeline/service/metadata_storage.cpp +++ b/code/nel/tools/pipeline/service/metadata_storage.cpp @@ -72,18 +72,18 @@ void CFileRemove::serial(NLMISC::IStream &stream) throw (NLMISC::EStream) stream.serial(Lost); } -void CProjectOutput::CFileOutput::serial(NLMISC::IStream &stream) throw (NLMISC::EStream) +void CProjectResult::CFileResult::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) +void CProjectResult::serial(NLMISC::IStream &stream) throw (NLMISC::EStream) { uint version = stream.serialVersion(1); stream.serialCont(FilePaths); - stream.serialCont(FileOutputs); + stream.serialCont(FileResults); } /////////////////////////////////////////////////////////////////////// diff --git a/code/nel/tools/pipeline/service/metadata_storage.h b/code/nel/tools/pipeline/service/metadata_storage.h index 6328f4c69..b090075f9 100644 --- a/code/nel/tools/pipeline/service/metadata_storage.h +++ b/code/nel/tools/pipeline/service/metadata_storage.h @@ -102,19 +102,19 @@ public: #define PIPELINE_DATABASE_DEPEND_SUFFIX ".depend" // ....................... -/// Suffix for metafiles that contain the output of the last build of a project -#define PIPELINE_DATABASE_OUTPUT_SUFFIX ".output" -struct CProjectOutput +/// Suffix for metafiles that contain the result of the last build of a project +#define PIPELINE_DATABASE_RESULT_SUFFIX ".result" +struct CProjectResult { std::vector FilePaths; - struct CFileOutput + struct CFileResult { uint32 CRC32; TFileState Level; void serial(NLMISC::IStream &stream) throw (NLMISC::EStream); }; - std::vector FileOutputs; + std::vector FileResults; void serial(NLMISC::IStream &stream) throw (NLMISC::EStream); }; @@ -129,16 +129,21 @@ class CMetadataStorage { public: - /// Note: Use the functions provided by CDatabaseStatus for manipulating status files. + // Note: Use the functions provided by CDatabaseStatus for manipulating status files. + /// Format like .../something.somedirectory.meta/path/file.status static std::string getStatusPath(const std::string &file); static bool readStatus(CFileStatus &status, const std::string &path); static void writeStatus(const CFileStatus &status, const std::string &path); static void eraseStatus(const std::string &path); - - static std::string getRemovePath(const std::string &file); - static bool readRemove(CFileRemove &remove, const std::string & path); - static void createRemove(const CFileRemove &remove, const std::string &path); // Remove cannot be modified after creation, only erased. - static void eraseRemove(const std::string &path); + + /// Format like .../something.somedirectory.meta/path/file.remove + // static std::string getRemovePath(const std::string &file); + // static bool readRemove(CFileRemove &remove, const std::string & path); + // static void createRemove(const CFileRemove &remove, const std::string &path); // Remove cannot be modified after creation, only erased. + // static void eraseRemove(const std::string &path); + + // Pathname for result metadata is like .../project.projectname.meta/pluginname.result + // static std::string getResultPath(const std::string &projectName, const std::string &pluginName); }; /* class CMetadataStorage */ diff --git a/code/nel/tools/pipeline/service/workspace_storage.h b/code/nel/tools/pipeline/service/workspace_storage.h index aa53d53f8..47c5d9cce 100644 --- a/code/nel/tools/pipeline/service/workspace_storage.h +++ b/code/nel/tools/pipeline/service/workspace_storage.h @@ -50,11 +50,14 @@ class CWorkspaceStorage { public: /// Get the path for a metadata file, based on a filepath it represents, and the suffix of it's contents + /// Format like .../root.somedirectory.meta/path/file.suffix, or .../pipeline..., or .../project.common.meta/... static std::string getMetaFilePath(const std::string &path, const std::string &dotSuffix); /// Get the directory where metadata files are stored, based on the filepath containing the files which the containing metadata represents static std::string getMetaDirectoryPath(const std::string &path); + // TODO: getProjectDirectory /// Format like .../project.common/ + }; /* class CWorkspaceStorage */ } /* namespace PIPELINE */