Changed: #1440 Some comments and naming

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 13 years ago
parent aae321f9e7
commit e54956bf0f

@ -72,18 +72,18 @@ void CFileRemove::serial(NLMISC::IStream &stream) throw (NLMISC::EStream)
stream.serial(Lost); 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); uint version = stream.serialVersion(1);
stream.serial(CRC32); stream.serial(CRC32);
stream.serial((uint8 &)Level); // test this :o) 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); uint version = stream.serialVersion(1);
stream.serialCont(FilePaths); stream.serialCont(FilePaths);
stream.serialCont(FileOutputs); stream.serialCont(FileResults);
} }
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////

@ -102,19 +102,19 @@ public:
#define PIPELINE_DATABASE_DEPEND_SUFFIX ".depend" #define PIPELINE_DATABASE_DEPEND_SUFFIX ".depend"
// ....................... // .......................
/// Suffix for metafiles that contain the output of the last build of a project /// Suffix for metafiles that contain the result of the last build of a project
#define PIPELINE_DATABASE_OUTPUT_SUFFIX ".output" #define PIPELINE_DATABASE_RESULT_SUFFIX ".result"
struct CProjectOutput struct CProjectResult
{ {
std::vector<std::string> FilePaths; std::vector<std::string> FilePaths;
struct CFileOutput struct CFileResult
{ {
uint32 CRC32; uint32 CRC32;
TFileState Level; TFileState Level;
void serial(NLMISC::IStream &stream) throw (NLMISC::EStream); void serial(NLMISC::IStream &stream) throw (NLMISC::EStream);
}; };
std::vector<CFileOutput> FileOutputs; std::vector<CFileResult> FileResults;
void serial(NLMISC::IStream &stream) throw (NLMISC::EStream); void serial(NLMISC::IStream &stream) throw (NLMISC::EStream);
}; };
@ -129,16 +129,21 @@ class CMetadataStorage
{ {
public: 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 std::string getStatusPath(const std::string &file);
static bool readStatus(CFileStatus &status, const std::string &path); static bool readStatus(CFileStatus &status, const std::string &path);
static void writeStatus(const CFileStatus &status, const std::string &path); static void writeStatus(const CFileStatus &status, const std::string &path);
static void eraseStatus(const std::string &path); static void eraseStatus(const std::string &path);
static std::string getRemovePath(const std::string &file); /// Format like .../something.somedirectory.meta/path/file.remove
static bool readRemove(CFileRemove &remove, const std::string & path); // static std::string getRemovePath(const std::string &file);
static void createRemove(const CFileRemove &remove, const std::string &path); // Remove cannot be modified after creation, only erased. // static bool readRemove(CFileRemove &remove, const std::string & path);
static void eraseRemove(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 */ }; /* class CMetadataStorage */

@ -50,11 +50,14 @@ class CWorkspaceStorage
{ {
public: public:
/// Get the path for a metadata file, based on a filepath it represents, and the suffix of it's contents /// 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); 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 /// 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); static std::string getMetaDirectoryPath(const std::string &path);
// TODO: getProjectDirectory /// Format like .../project.common/
}; /* class CWorkspaceStorage */ }; /* class CWorkspaceStorage */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

Loading…
Cancel
Save