#include <Teuchos_XMLObject.hpp>
Collaboration diagram for Teuchos::XMLObject:
Public Member Functions | |
Constructors | |
| XMLObject () | |
| Empty constructor. | |
| XMLObject (const string &tag) | |
| Construct using a node labeled by tag. | |
| XMLObject (XMLObjectImplem *ptr) | |
| Construct with a pointer to the low-level representation. | |
Copy methods | |
| XMLObject | deepCopy () const |
| Make a deep copy of this object. | |
Data Access methods | |
| const string & | getTag () const |
| Return the tag of the current node. | |
| bool | hasAttribute (const string &name) const |
| Find out if the current node has an attribute of the specified name. | |
| const string & | getAttribute (const string &name) const |
| Return the value of the attribute with the specified name. | |
| const string & | getRequired (const string &name) const |
| Get an attribute, throwing an exception if it is not found. | |
| double | getRequiredDouble (const string &name) const |
| Get a required attribute, returning it as a double. | |
| int | getRequiredInt (const string &name) const |
| Get a required attribute, returning it as an int. | |
| bool | getRequiredBool (const string &name) const |
| Get a required attribute, returning it as a bool. | |
| string | getWithDefault (const string &name, const string &defaultValue) const |
| Get an attribute, assigning a default value if the requested attribute does not exist. | |
| int | numChildren () const |
| Return the number of child nodes owned by this node. | |
| const XMLObject & | getChild (int i) const |
| Return the i-th child node. | |
| int | numContentLines () const |
| Return the number of lines of character content stored in this node. | |
| const string & | getContentLine (int i) const |
| Return the i-th line of character content stored in this node. | |
| string | toString () const |
| Represent this node and its children as a string. | |
| string | header () const |
| Write the header for this object to a string. | |
| string | footer () const |
| Write the footer for this object to a string. | |
| bool | isEmpty () const |
| Find out if a node is empty. | |
| void | checkTag (const string &expected) const |
| Check that a tag is equal to an expected string. | |
Tree-Assembly methods | |
| void | addAttribute (const string &name, const string &value) |
| Add an attribute to the current node's atribute list. | |
| void | addDouble (const string &name, double val) |
| Add a double as an attribute. | |
| void | addInt (const string &name, int val) |
| Add an int as an attribute. | |
| void | addBool (const string &name, bool val) |
| Add a bool as an attribute. | |
| void | addChild (const XMLObject &child) |
| Add a child node to the node. | |
| void | addContent (const string &contentLine) |
| Add a line of character content. | |
Private Attributes | |
| RefCountPtr< XMLObjectImplem > | ptr_ |
Related Functions | |
| (Note that these are not member functions.) | |
| ostream & | operator<< (ostream &os, const XMLObject &xml) |
Write XMLObject to os stream. | |
| string | toString (const XMLObject &xml) |
| Write XMLObject to string. | |
Definition at line 47 of file Teuchos_XMLObject.hpp.
|
|
Empty constructor.
Definition at line 54 of file Teuchos_XMLObject.hpp. |
|
|
Construct using a node labeled by tag.
Definition at line 36 of file Teuchos_XMLObject.cpp. |
|
|
Construct with a pointer to the low-level representation. This is used to allow construction of an XMLObject from the XMLObjectImplem* return value of ExceptionBase::toXML(). Definition at line 40 of file Teuchos_XMLObject.cpp. |
|
|
Make a deep copy of this object.
Definition at line 44 of file Teuchos_XMLObject.cpp. |
|
|
Return the tag of the current node.
Definition at line 79 of file Teuchos_XMLObject.hpp. |
|
|
Find out if the current node has an attribute of the specified name.
Definition at line 82 of file Teuchos_XMLObject.hpp. |
|
|
Return the value of the attribute with the specified name.
Definition at line 86 of file Teuchos_XMLObject.hpp. |
|
|
Get an attribute, throwing an exception if it is not found.
Definition at line 49 of file Teuchos_XMLObject.cpp. |
|
|
Get a required attribute, returning it as a double.
Definition at line 93 of file Teuchos_XMLObject.hpp. |
|
|
Get a required attribute, returning it as an int.
Definition at line 97 of file Teuchos_XMLObject.hpp. |
|
|
Get a required attribute, returning it as a bool.
Definition at line 64 of file Teuchos_XMLObject.cpp. |
|
||||||||||||
|
Get an attribute, assigning a default value if the requested attribute does not exist.
Definition at line 57 of file Teuchos_XMLObject.cpp. |
|
|
Return the number of child nodes owned by this node.
Definition at line 110 of file Teuchos_XMLObject.hpp. |
|
|
Return the i-th child node.
Definition at line 113 of file Teuchos_XMLObject.hpp. |
|
|
Return the number of lines of character content stored in this node.
Definition at line 116 of file Teuchos_XMLObject.hpp. |
|
|
Return the i-th line of character content stored in this node.
Definition at line 119 of file Teuchos_XMLObject.hpp. |
|
|
Represent this node and its children as a string.
Definition at line 122 of file Teuchos_XMLObject.hpp. |
|
|
Write the header for this object to a string.
Definition at line 125 of file Teuchos_XMLObject.hpp. |
|
|
Write the footer for this object to a string.
Definition at line 128 of file Teuchos_XMLObject.hpp. |
|
|
Find out if a node is empty.
Definition at line 131 of file Teuchos_XMLObject.hpp. |
|
|
Check that a tag is equal to an expected string.
Definition at line 88 of file Teuchos_XMLObject.cpp. |
|
||||||||||||
|
Add an attribute to the current node's atribute list.
Definition at line 141 of file Teuchos_XMLObject.hpp. |
|
||||||||||||
|
Add a double as an attribute.
Definition at line 145 of file Teuchos_XMLObject.hpp. |
|
||||||||||||
|
Add an int as an attribute.
Definition at line 149 of file Teuchos_XMLObject.hpp. |
|
||||||||||||
|
Add a bool as an attribute.
Definition at line 153 of file Teuchos_XMLObject.hpp. |
|
|
Add a child node to the node.
Definition at line 157 of file Teuchos_XMLObject.hpp. |
|
|
Add a line of character content.
Definition at line 161 of file Teuchos_XMLObject.hpp. |
|
||||||||||||
|
Write XMLObject to
Definition at line 172 of file Teuchos_XMLObject.hpp. |
|
|
Write XMLObject to string.
Definition at line 180 of file Teuchos_XMLObject.hpp. |
|
|
Definition at line 166 of file Teuchos_XMLObject.hpp. |
1.3.9.1