// ProcessJobCreator.h #ifndef dial__ProcessJobCreator_H #define dial__ProcessJobCreator_H // David Adams // July 2003 // // Factory to create a ProcessJob. // // The constructor takes a string and executable that will be // given the run script as an argument and is expected to // return after the script returns. // // XML // ProcessJobCreator // runcom = /bin/sh #include #include "dataset_util/Text.h" #include "dial_job/JobCreator.h" class XmlElement; namespace dial { class ProcessJobCreator : public JobCreator { private: // data // Run command. std::string m_runcom; public: // static functions // XML name. static std::string xml_name() { return "ProcessJobCreator"; } // DTD. static const Text& dtd(); public: // functions // Constructor. explicit ProcessJobCreator(std::string runcom ="/bin/bash"); // Validity. bool is_valid() const; // Create a new local job. Job* create_local_job( JobId jid, const Application& app, const Task& tsk, const dset::Dataset& dst, const JobPreferences& prf, std::string rundir, std::string runfile) const; // Convert. Job* convert(const Job& job) const; // Return the run command. std::string run_command() const; // XML. const XmlElement* xml() const; // Output stream. std::ostream& ostr(std::ostream& lhs) const; }; } // end namespace dial #endif