illumina::interop::xml Namespace Reference

Classes

struct  bad_xml_format_exception
 
struct  empty_xml_format_exception
 
struct  missing_xml_element_exception
 
class  xml_document
 
struct  xml_file_not_found_exception
 
struct  xml_format_exception
 
struct  xml_parse_exception
 

Typedefs

typedef rapidxml::xml_node * xml_node_ptr
 
typedef rapidxml::xml_attribute * xml_attr_ptr
 

Functions

template<class T >
bool set_data_with_default (xml_node_ptr p_node, const char *target, T &val, const T default_val)
 
template<class T >
void set_data_for_target (xml_node_ptr p_node, const std::string &target, T &val)
 
template<class T >
void set_data_for_target (xml_node_ptr p_node, const std::string &target, T &val, const T default_val)
 
template<class T >
bool set_data (xml_node_ptr p_node, const std::string &target, T &val)
 
template<class T >
void set_data (xml_node_ptr p_attr, T &val)
 
template<class T >
bool set_data (xml_attr_ptr p_attr, const std::string &target, T &val)
 
template<class T >
void set_data_from_attribute (xml_node_ptr p_node, const char *target, T &val)
 
template<class T >
bool set_data (xml_node_ptr p_node, const std::string &target, const std::string &child, std::vector< T > &val)
 

Typedef Documentation

typedef rapidxml::xml_attribute* xml_attr_ptr

XML attribute pointer type

typedef rapidxml::xml_node* xml_node_ptr

XML node pointer type

Function Documentation

bool illumina::interop::xml::set_data ( xml_node_ptr  p_node,
const std::string &  target,
T &  val 
)

Check if the xml node matches the target, and, if so, set the value

Parameters
p_nodecurrent node
targettarget string
valdestination value
Returns
true if the target was found
void illumina::interop::xml::set_data ( xml_node_ptr  p_attr,
T &  val 
)

Convert the value of the node to the destination type

Parameters
p_attrcurrent node
valdestination value
bool illumina::interop::xml::set_data ( xml_attr_ptr  p_attr,
const std::string &  target,
T &  val 
)

Check if the xml attributes matches the target, and, if so, set the value

Parameters
p_attrcurrent attribute
targettarget string
valdestination value
Returns
true if the target was found
bool illumina::interop::xml::set_data ( xml_node_ptr  p_node,
const std::string &  target,
const std::string &  child,
std::vector< T > &  val 
)

Check if the xml node matches the target, and, if so, save the children to the vector

Parameters
p_nodecurrent node
targettarget string
childchild node name
valdestination vector
Returns
true if the target was found
void illumina::interop::xml::set_data_for_target ( xml_node_ptr  p_node,
const std::string &  target,
T &  val 
)

Find the target node and set the value

Parameters
p_nodecurrent node
targettarget string
valdestination value
Returns
true if the target was found
void illumina::interop::xml::set_data_for_target ( xml_node_ptr  p_node,
const std::string &  target,
T &  val,
const T  default_val 
)

Find the target node and set the value

Parameters
p_nodecurrent node
targettarget string
valdestination value
default_valdefault value if the tag is not found
Returns
true if the target was found
void illumina::interop::xml::set_data_from_attribute ( xml_node_ptr  p_node,
const char *  target,
T &  val 
)

Convert the value of the attribute to the destination type

Parameters
p_nodecurrent node
targettarget string
valdestination value
bool illumina::interop::xml::set_data_with_default ( xml_node_ptr  p_node,
const char *  target,
T &  val,
const T  default_val 
)

Check if the xml node matches the target, and, if so, set the value

Parameters
p_nodecurrent node
targettarget string
valdestination value
default_valdefault value if the tag is not found
Returns
true if the target was found