|
| | Config () |
| | Creates empty XML tree. More...
|
| |
| | Config (const NS &ns) |
| | Creates an empty configuration object with the given namespace. More...
|
| |
| | Config (const char *filename) |
| | Loads configuration document from file at filename. More...
|
| |
| | Config (const std::string &xml_str) |
| | Parse configuration document from string. More...
|
| |
| | Config (XMLNode xml) |
| | Acquire existing XML (sub)tree. More...
|
| |
| | Config (XMLNode xml, const std::string &filename) |
| | Acquire existing XML (sub)tree and set config file. More...
|
| |
| | Config (long cfg_ptr_addr) |
| | Copy constructor used by language bindings. More...
|
| |
| | Config (const Config &cfg) |
| | Copy constructor used by language bindings. More...
|
| |
| void | print (void) |
| | Print structure of document for debugging purposes. More...
|
| |
| bool | parse (const char *filename) |
| | Parse configuration document from file at filename. More...
|
| |
| const std::string & | getFileName (void) const |
| | Returns file name of config file or empty string if it was generated from the XMLNode subtree. More...
|
| |
| void | setFileName (const std::string &filename) |
| | Set the file name of config file. More...
|
| |
| void | save (const char *filename) |
| | Save config to file. More...
|
| |
| | XMLNode (void) |
| | Constructor of invalid node. More...
|
| |
| | XMLNode (const XMLNode &node) |
| | Copies existing instance. More...
|
| |
| | XMLNode (const std::string &xml) |
| | Creates XML document structure from textual representation of XML document. More...
|
| |
| | XMLNode (const char *xml, int len=-1) |
| | Creates XML document structure from textual representation of XML document. More...
|
| |
| | XMLNode (long ptr_addr) |
| | Copy constructor. Used by language bindings. More...
|
| |
| | XMLNode (const NS &ns, const char *name) |
| | Creates empty XML document structure with specified namespaces. More...
|
| |
| | ~XMLNode (void) |
| | Destructor. More...
|
| |
| void | New (XMLNode &node) const |
| | Creates a copy of XML (sub)tree. More...
|
| |
| void | Exchange (XMLNode &node) |
| | Exchanges XML (sub)trees. More...
|
| |
| void | Move (XMLNode &node) |
| | Moves content of this XML (sub)tree to node. More...
|
| |
| void | Swap (XMLNode &node) |
| | Swaps XML (sub)trees to which this and node refer. More...
|
| |
| | operator bool (void) const |
| | Returns true if instance points to XML element - valid instance. More...
|
| |
| bool | operator! (void) const |
| | Returns true if instance does not point to XML element - invalid instance. More...
|
| |
| bool | operator== (const XMLNode &node) |
| | Returns true if 'node' represents same XML element. More...
|
| |
| bool | operator!= (const XMLNode &node) |
| | Returns false if 'node' represents same XML element. More...
|
| |
| bool | Same (const XMLNode &node) |
| | Returns true if 'node' represents same XML element - for bindings. More...
|
| |
| bool | operator== (bool val) |
| | This operator is needed to avoid ambiguity. More...
|
| |
| bool | operator!= (bool val) |
| | This operator is needed to avoid ambiguity. More...
|
| |
| bool | operator== (const std::string &str) |
| | This operator is needed to avoid ambiguity. More...
|
| |
| bool | operator!= (const std::string &str) |
| | This operator is needed to avoid ambiguity. More...
|
| |
| bool | operator== (const char *str) |
| | This operator is needed to avoid ambiguity. More...
|
| |
| bool | operator!= (const char *str) |
| | This operator is needed to avoid ambiguity. More...
|
| |
| XMLNode | Child (int n=0) |
| | Returns XMLNode instance representing n-th child of XML element. More...
|
| |
| XMLNode | operator[] (const char *name) const |
| | Returns XMLNode instance representing first child element with specified name. More...
|
| |
| XMLNode | operator[] (const std::string &name) const |
| | Returns XMLNode instance representing first child element with specified name. More...
|
| |
| XMLNode | operator[] (int n) const |
| | Returns XMLNode instance representing n-th node in sequence of siblings of same name. More...
|
| |
| void | operator++ (void) |
| | Convenience operator to switch to next element of same name. More...
|
| |
| void | operator-- (void) |
| | Convenience operator to switch to previous element of same name. More...
|
| |
| int | Size (void) const |
| | Returns number of children nodes. More...
|
| |
| XMLNode | Get (const std::string &name) const |
| | Same as operator[](). More...
|
| |
| std::string | Name (void) const |
| | Returns name of XML node. More...
|
| |
| std::string | Prefix (void) const |
| | Returns namespace prefix of XML node. More...
|
| |
| std::string | FullName (void) const |
| | Returns prefix:name of XML node. More...
|
| |
| std::string | Namespace (void) const |
| | Returns namespace URI of XML node. More...
|
| |
| void | Prefix (const std::string &prefix, int recursion=0) |
| | Assigns namespace prefix to XML node(s). More...
|
| |
| void | StripNamespace (int recursion=0) |
| | Removes namespace prefix from XML node(s). More...
|
| |
| void | Name (const char *name) |
| | Assigns new name to XML node. More...
|
| |
| void | Name (const std::string &name) |
| | Assigns new name to XML node. More...
|
| |
| void | GetXML (std::string &out_xml_str, bool user_friendly=false) const |
| | Fills argument with this instance XML subtree textual representation. More...
|
| |
| void | GetXML (std::string &out_xml_str, const std::string &encoding, bool user_friendly=false) const |
| | Get string representation of XML subtree. More...
|
| |
| void | GetDoc (std::string &out_xml_str, bool user_friendly=false) const |
| | Fills out_xml_str with whole XML document textual representation. More...
|
| |
| | operator std::string (void) const |
| | Returns textual content of node excluding content of children nodes. More...
|
| |
| XMLNode & | operator= (const char *content) |
| | Sets textual content of node. All existing children nodes are discarded. More...
|
| |
| XMLNode & | operator= (const std::string &content) |
| | Sets textual content of node. All existing children nodes are discarded. More...
|
| |
| void | Set (const std::string &content) |
| | Same as operator=. Used for bindings. More...
|
| |
| XMLNode & | operator= (const XMLNode &node) |
| | Make instance refer to another XML node. Ownership is not inherited. More...
|
| |
| XMLNode | Attribute (int n=0) |
| | Returns XMLNode instance reresenting n-th attribute of node. More...
|
| |
| XMLNode | Attribute (const char *name) |
| | Returns XMLNode instance representing first attribute of node with specified by name. More...
|
| |
| XMLNode | Attribute (const std::string &name) |
| | Returns XMLNode instance representing first attribute of node with specified by name. More...
|
| |
| XMLNode | NewAttribute (const char *name) |
| | Creates new attribute with specified name. More...
|
| |
| XMLNode | NewAttribute (const std::string &name) |
| | Creates new attribute with specified name. More...
|
| |
| int | AttributesSize (void) const |
| | Returns number of attributes of node. More...
|
| |
| void | Namespaces (const NS &namespaces, bool keep=false, int recursion=-1) |
| | Assigns namespaces of XML document at point specified by this instance. More...
|
| |
| NS | Namespaces (void) |
| | Returns namespaces known at this node. More...
|
| |
| std::string | NamespacePrefix (const char *urn) |
| | Returns prefix of specified namespace or empty string if no such namespace. More...
|
| |
| XMLNode | NewChild (const char *name, int n=-1, bool global_order=false) |
| | Creates new child XML element at specified position with specified name. More...
|
| |
| XMLNode | NewChild (const std::string &name, int n=-1, bool global_order=false) |
| | Same as NewChild(const char*,int,bool). More...
|
| |
| XMLNode | NewChild (const char *name, const NS &namespaces, int n=-1, bool global_order=false) |
| | Creates new child XML element at specified position with specified name and namespaces. More...
|
| |
| XMLNode | NewChild (const std::string &name, const NS &namespaces, int n=-1, bool global_order=false) |
| | Same as NewChild(const char*,const NS&,int,bool). More...
|
| |
| XMLNode | NewChild (const XMLNode &node, int n=-1, bool global_order=false) |
| | Link a copy of supplied XML node as child. More...
|
| |
| void | Replace (const XMLNode &node) |
| | Makes a copy of supplied XML node and makes this instance refer to it. More...
|
| |
| void | Destroy (void) |
| | Destroys underlying XML element. More...
|
| |
| XMLNodeList | Path (const std::string &path) |
| | Collects nodes corresponding to specified path. More...
|
| |
| XMLNodeList | XPathLookup (const std::string &xpathExpr, const NS &nsList) |
| | Uses xPath to look up the whole xml structure,. More...
|
| |
| XMLNode | GetRoot (void) |
| | Get the root node from any child node of the tree. More...
|
| |
| XMLNode | Parent (void) |
| | Get the parent node from any child node of the tree. More...
|
| |
| bool | SaveToFile (const std::string &file_name) const |
| | Save string representation of node to file. More...
|
| |
| bool | SaveToStream (std::ostream &out) const |
| | Save string representation of node to stream. More...
|
| |
| bool | ReadFromFile (const std::string &file_name) |
| | Read XML document from file and associate it with this node. More...
|
| |
| bool | ReadFromStream (std::istream &in) |
| | Read XML document from stream and associate it with this node. More...
|
| |
| bool | Validate (const std::string &schema_file, std::string &err_msg) |
| | XML schema validation against the schema file defined as argument. More...
|
| |
| bool | Validate (XMLNode schema_doc, std::string &err_msg) |
| |
Configuration element - represents (sub)tree of ARC XML configuration.
This class is intended to be used to pass configuration details to various parts of HED and external modules. Currently it's just a wrapper over XML tree. But that may change in the future, although the interface should be preserved. Currently it is capable of loading an XML configuration document from a file. In future it will be capable of loading a more user-readable format and processing it into a tree-like structure convenient for machine processing (XML-like). So far there are no schema and/or namespaces assigned.