Added: #1440 Base for plugin interface to the new functions

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent c9d3d4acce
commit 56cb277921

@ -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. /// 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; 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 getValue(std::string &result, const std::string &name) = 0;
virtual bool getValues(std::vector<std::string> &resultAppend, const std::string &name) = 0; virtual bool getValues(std::vector<std::string> &resultAppend, const std::string &name) = 0;
virtual bool getValueNb(uint &result, 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<std::string> &inputPaths, const std::vector<std::string> &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<std::string> &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 */ }; /* class IPipelineProcess */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

@ -135,6 +135,31 @@ bool CPipelineProcessImpl::getValueNb(uint &result, const std::string &name)
} }
} }
bool CPipelineProcessImpl::needsToBeRebuilt(const std::vector<std::string> &inputPaths, const std::vector<std::string> &outputPaths)
{
return false;
}
bool CPipelineProcessImpl::needsToBeRebuilt(const std::vector<std::string> &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 */ } /* namespace PIPELINE */
/* end of file */ /* end of file */

@ -60,6 +60,14 @@ public:
virtual bool getValues(std::vector<std::string> &resultAppend, const std::string &name); virtual bool getValues(std::vector<std::string> &resultAppend, const std::string &name);
virtual bool getValueNb(uint &result, const std::string &name); virtual bool getValueNb(uint &result, const std::string &name);
virtual bool needsToBeRebuilt(const std::vector<std::string> &inputPaths, const std::vector<std::string> &outputPaths);
virtual bool needsToBeRebuilt(const std::vector<std::string> &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 */ }; /* class CPipelineProcessImpl */
} /* namespace PIPELINE */ } /* namespace PIPELINE */

Loading…
Cancel
Save