diff --git a/code/nel/tools/pipeline/plugin_library/pipeline_process.h b/code/nel/tools/pipeline/plugin_library/pipeline_process.h index 1a8c7b4c6..260225748 100644 --- a/code/nel/tools/pipeline/plugin_library/pipeline_process.h +++ b/code/nel/tools/pipeline/plugin_library/pipeline_process.h @@ -82,10 +82,24 @@ public: /// Get the temporary directory for the current process. The directory must be deleted when the process ends. May return random temporary directories if no process is running. virtual std::string getTempDirectory() = 0; - /// Get a value from the currently active project configuration + /// Get a value from the currently active project configuration. If false, don't use, no need to write warnings to service log, already written, set exit state and exit if necessary virtual bool getValue(std::string &result, const std::string &name) = 0; virtual bool getValues(std::vector &resultAppend, const std::string &name) = 0; virtual bool getValueNb(uint &result, const std::string &name) = 0; + + /// Find out if the plugin needs to rebuild. Input can be files or directories, output can only be files + virtual bool needsToBeRebuilt(const std::vector &inputPaths, const std::vector &outputPaths) = 0; + /// Find out if the plugin needs to rebuild. Input can only be files. Must request the service to write an .output metafile during depend log parsing. + virtual bool needsToBeRebuilt(const std::vector &inputPaths) = 0; + + /// Parse the depend and error logs. Only set writeOutputMeta true if the output is not known in advance by the plugin, see needsToBeRebuilt + virtual void parseToolLog(const std::string &dependLogFile, const std::string &errorLogFile, bool writeOutputMeta) = 0; + + /// Check if the plugin needs to exit, exit plugin immediately if true. + virtual bool needsExit() = 0; + /// Set the exit state, must exit the plugin immediately afterwards. Use for configuration mistakes, etc + virtual void setExit(const TProcessResult exitLevel, const std::string &exitMessage) = 0; + }; /* class IPipelineProcess */ } /* namespace PIPELINE */ diff --git a/code/nel/tools/pipeline/service/pipeline_process_impl.cpp b/code/nel/tools/pipeline/service/pipeline_process_impl.cpp index f785176f5..3bb52c3aa 100644 --- a/code/nel/tools/pipeline/service/pipeline_process_impl.cpp +++ b/code/nel/tools/pipeline/service/pipeline_process_impl.cpp @@ -135,6 +135,31 @@ bool CPipelineProcessImpl::getValueNb(uint &result, const std::string &name) } } +bool CPipelineProcessImpl::needsToBeRebuilt(const std::vector &inputPaths, const std::vector &outputPaths) +{ + return false; +} + +bool CPipelineProcessImpl::needsToBeRebuilt(const std::vector &inputPaths) +{ + return false; +} + +void CPipelineProcessImpl::parseToolLog(const std::string &dependLogFile, const std::string &errorLogFile, bool writeOutputMeta) +{ + +} + +bool CPipelineProcessImpl::needsExit() +{ + return true; +} + +void CPipelineProcessImpl::setExit(const TProcessResult exitLevel, const std::string &exitMessage) +{ + +} + } /* namespace PIPELINE */ /* end of file */ diff --git a/code/nel/tools/pipeline/service/pipeline_process_impl.h b/code/nel/tools/pipeline/service/pipeline_process_impl.h index 829dac5e7..7990e088c 100644 --- a/code/nel/tools/pipeline/service/pipeline_process_impl.h +++ b/code/nel/tools/pipeline/service/pipeline_process_impl.h @@ -60,6 +60,14 @@ public: virtual bool getValues(std::vector &resultAppend, const std::string &name); virtual bool getValueNb(uint &result, const std::string &name); + virtual bool needsToBeRebuilt(const std::vector &inputPaths, const std::vector &outputPaths); + virtual bool needsToBeRebuilt(const std::vector &inputPaths); + + virtual void parseToolLog(const std::string &dependLogFile, const std::string &errorLogFile, bool writeOutputMeta); + + virtual bool needsExit(); + virtual void setExit(const TProcessResult exitLevel, const std::string &exitMessage); + }; /* class CPipelineProcessImpl */ } /* namespace PIPELINE */