Version: 8.3.0
Launcher::XML_Persistence Class Reference

#include <Launcher_XML_Persistence.hxx>

Public Member Functions

virtual ~XML_Persistence ()
 
template<typename T >
getNumericalNodeContent (xmlNodePtr node)
 
template<typename T >
xmlNodePtr addNumericalNode (xmlNodePtr father, const string &name, T content)
 

Static Public Member Functions

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...
 

Private Member Functions

 XML_Persistence ()
 

Static Private Member Functions

static void addJobToXmlDocument (xmlNodePtr root_node, const Job &job)
 
static JobcreateJobFromXmlNode (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)
 

Constructor & Destructor Documentation

virtual Launcher::XML_Persistence::~XML_Persistence ( )
virtual
Launcher::XML_Persistence::XML_Persistence ( )
private

Member Function Documentation

void Launcher::XML_Persistence::addAttr ( xmlNodePtr  node,
const std::string &  name,
const std::string &  value 
)
staticprivate
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,
content 
)
staticprivate
template<typename T >
xmlNodePtr Launcher::XML_Persistence::addNumericalNode ( xmlNodePtr  father,
const string &  name,
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::parseRunNode ( Job new_job,
xmlNodePtr  run_node 
)
staticprivate
void Launcher::XML_Persistence::saveJobs ( const char jobs_file,
const std::list< const Job * > &  jobs_list 
)
static

Save the jobs in the list "jobs_list" to the XML file "jobs_file".

References LAUNCHER_INFOS, and LAUNCHER_MESSAGE.

Referenced by Launcher_cpp::saveJobs().

string Launcher::XML_Persistence::xmlStrToString ( const xmlChar xmlStr)
staticprivate