![]() |
SENSEI
A frame work for generic in situ analytics
|
a collection of functions for parsing XML. More...
Functions | |
| SENSEI_EXPORT int | RequireAttribute (const pugi::xml_node &node, const char *attributeName) |
| check that an attribute of the passed in name exists return of 0 indicates that it does. More... | |
| SENSEI_EXPORT int | RequireChild (const pugi::xml_node &node, const char *childName) |
| check that a child element of the passed in name exists return of 0 indicates that it does. More... | |
| SENSEI_EXPORT int | Parse (MPI_Comm comm, const std::string &filename, pugi::xml_document &doc) |
| Parallel collective read, parse, and distribute the XML file. More... | |
| template<typename num_t > | |
| int | ParseNumeric (const pugi::xml_node &node, std::vector< num_t > &numData) |
| parse text data in the node of unknown length, return in the vector. More... | |
| template<typename num_t , unsigned long n> | |
| int | ParseNumeric (const pugi::xml_node &node, std::array< num_t, n > &numData) |
| parse text data in the node of specific length More... | |
| int | ParseNameValuePairs (const pugi::xml_node &node, std::vector< std::string > &names, std::vector< std::string > &values) |
| process a sequence of "name = value" pairs in a node's text. More... | |
| int | ParseList (pugi::xml_node node, std::vector< std::string > &listOut) |
| process a list in a node's text. More... | |
a collection of functions for parsing XML.
| SENSEI_EXPORT int sensei::XMLUtils::Parse | ( | MPI_Comm | comm, |
| const std::string & | filename, | ||
| pugi::xml_document & | doc | ||
| ) |
Parallel collective read, parse, and distribute the XML file.
Rank 0 does the I/O and parse and will broadcast to the other ranks in the communicator. return of 0 indicates success.
| int sensei::XMLUtils::ParseList | ( | pugi::xml_node | node, |
| std::vector< std::string > & | listOut | ||
| ) |
process a list in a node's text.
List elements should be space or comma delimited. Give the following XML
extract list1 ... listN and return as a vector of strings. returns the number of elements found or < 0 on error.
| int sensei::XMLUtils::ParseNameValuePairs | ( | const pugi::xml_node & | node, |
| std::vector< std::string > & | names, | ||
| std::vector< std::string > & | values | ||
| ) |
process a sequence of "name = value" pairs in a node's text.
| int sensei::XMLUtils::ParseNumeric | ( | const pugi::xml_node & | node, |
| std::vector< num_t > & | numData | ||
| ) |
parse text data in the node of unknown length, return in the vector.
return 0 if successful
| int sensei::XMLUtils::ParseNumeric | ( | const pugi::xml_node & | node, |
| std::array< num_t, n > & | numData | ||
| ) |
parse text data in the node of specific length
| SENSEI_EXPORT int sensei::XMLUtils::RequireAttribute | ( | const pugi::xml_node & | node, |
| const char * | attributeName | ||
| ) |
check that an attribute of the passed in name exists return of 0 indicates that it does.
if not non-zero value is returned and an error message is sent to stderr.
| SENSEI_EXPORT int sensei::XMLUtils::RequireChild | ( | const pugi::xml_node & | node, |
| const char * | childName | ||
| ) |
check that a child element of the passed in name exists return of 0 indicates that it does.
if not non-zero value is returned and an error message is sent to stderr.