#include <Launcher_XML_Persistence.hxx>
|
static std::list< Job * > | loadJobs (const char *jobs_file) |
| Load the jobs from the XML file "jobs_file". More...
|
|
static void | saveJobs (const char *jobs_file, const std::list< const Job * > &jobs_list) |
| Save the jobs in the list "jobs_list" to the XML file "jobs_file". More...
|
|
|
static void | addJobToXmlDocument (xmlNodePtr root_node, const Job &job) |
|
static Job * | createJobFromXmlNode (xmlNodePtr job_node) |
|
static void | parseUserNode (Job *new_job, xmlNodePtr user_node) |
|
static void | parseRunNode (Job *new_job, xmlNodePtr run_node) |
|
static void | parseResourceNode (Job *new_job, xmlNodePtr res_node) |
|
static std::string | getAttrValue (xmlNodePtr node, const std::string &attrName) |
|
static std::string | xmlStrToString (const xmlChar *xmlStr) |
|
static std::string | getNodeContent (xmlNodePtr node) |
|
template<typename T > |
static T | getNumericalNodeContent (xmlNodePtr node) |
|
static xmlNodePtr | addNode (xmlNodePtr father, const std::string &name, const std::string &content) |
|
template<typename T > |
static xmlNodePtr | addNumericalNode (xmlNodePtr father, const std::string &name, T content) |
|
static void | addAttr (xmlNodePtr node, const std::string &name, const std::string &value) |
|
virtual Launcher::XML_Persistence::~XML_Persistence |
( |
| ) |
|
|
virtual |
Launcher::XML_Persistence::XML_Persistence |
( |
| ) |
|
|
private |
void Launcher::XML_Persistence::addAttr |
( |
xmlNodePtr |
node, |
|
|
const std::string & |
name, |
|
|
const std::string & |
value |
|
) |
| |
|
staticprivate |
void Launcher::XML_Persistence::addJobToXmlDocument |
( |
xmlNodePtr |
root_node, |
|
|
const Job & |
job |
|
) |
| |
|
staticprivate |
References resourceParams::cpu_clock, Launcher::Job::get_in_files(), Launcher::Job::get_out_files(), Launcher::Job::getEnvFile(), Launcher::Job::getExclusive(), Launcher::Job::getExclusiveStr(), Launcher::Job::getExtraParams(), Launcher::Job::getJobFile(), Launcher::Job::getJobName(), Launcher::Job::getJobType(), Launcher::Job::getLauncherArgs(), Launcher::Job::getLauncherFile(), Launcher::Job::getLocalDirectory(), Launcher::Job::getMaximumDuration(), Launcher::Job::getMemPerCpu(), Launcher::Job::getQueue(), Launcher::Job::getReference(), Launcher::Job::getResourceRequiredParams(), Launcher::Job::getResultDirectory(), Launcher::Job::getSpecificParameters(), Launcher::Job::getState(), Launcher::Job::getWCKey(), Launcher::Job::getWorkDirectory(), resourceParams::hostname, resourceParams::mem_mb, resourceParams::name, resourceParams::nb_node, resourceParams::nb_proc, resourceParams::nb_proc_per_node, and resourceParams::OS.
xmlNodePtr Launcher::XML_Persistence::addNode |
( |
xmlNodePtr |
father, |
|
|
const std::string & |
name, |
|
|
const std::string & |
content |
|
) |
| |
|
staticprivate |
template<typename T >
static xmlNodePtr Launcher::XML_Persistence::addNumericalNode |
( |
xmlNodePtr |
father, |
|
|
const std::string & |
name, |
|
|
T |
content |
|
) |
| |
|
staticprivate |
template<typename T >
xmlNodePtr Launcher::XML_Persistence::addNumericalNode |
( |
xmlNodePtr |
father, |
|
|
const string & |
name, |
|
|
T |
content |
|
) |
| |
Job * Launcher::XML_Persistence::createJobFromXmlNode |
( |
xmlNodePtr |
job_node | ) |
|
|
staticprivate |
string Launcher::XML_Persistence::getAttrValue |
( |
xmlNodePtr |
node, |
|
|
const std::string & |
attrName |
|
) |
| |
|
staticprivate |
string Launcher::XML_Persistence::getNodeContent |
( |
xmlNodePtr |
node | ) |
|
|
staticprivate |
template<typename T >
static T Launcher::XML_Persistence::getNumericalNodeContent |
( |
xmlNodePtr |
node | ) |
|
|
staticprivate |
template<typename T >
T Launcher::XML_Persistence::getNumericalNodeContent |
( |
xmlNodePtr |
node | ) |
|
list< Job * > Launcher::XML_Persistence::loadJobs |
( |
const char * |
jobs_file | ) |
|
|
static |
Load the jobs from the XML file "jobs_file".
Return a list with the jobs that were successfully loaded. The ownership of the created jobs is transferred to the caller.
References LAUNCHER_INFOS.
Referenced by Launcher_cpp::loadJobs().
void Launcher::XML_Persistence::parseResourceNode |
( |
Job * |
new_job, |
|
|
xmlNodePtr |
res_node |
|
) |
| |
|
staticprivate |
void Launcher::XML_Persistence::parseRunNode |
( |
Job * |
new_job, |
|
|
xmlNodePtr |
run_node |
|
) |
| |
|
staticprivate |
void Launcher::XML_Persistence::parseUserNode |
( |
Job * |
new_job, |
|
|
xmlNodePtr |
user_node |
|
) |
| |
|
staticprivate |
References Launcher::Job::add_in_file(), Launcher::Job::add_out_file(), Launcher::Job::addSpecificParameter(), Launcher::Job::setEnvFile(), Launcher::Job::setExclusiveStr(), Launcher::Job::setExtraParams(), Launcher::Job::setJobFile(), Launcher::Job::setLauncherArgs(), Launcher::Job::setLauncherFile(), Launcher::Job::setLocalDirectory(), Launcher::Job::setMaximumDuration(), Launcher::Job::setMemPerCpu(), Launcher::Job::setQueue(), Launcher::Job::setResultDirectory(), Launcher::Job::setWCKey(), and Launcher::Job::setWorkDirectory().
void Launcher::XML_Persistence::saveJobs |
( |
const char * |
jobs_file, |
|
|
const std::list< const Job * > & |
jobs_list |
|
) |
| |
|
static |
string Launcher::XML_Persistence::xmlStrToString |
( |
const xmlChar * |
xmlStr | ) |
|
|
staticprivate |