Teuchos - Trilinos Tools Package
Version of the Day
|
The XMLObjectImplem class takes care of the low-level implementation details of XMLObject. More...
#include <Teuchos_XMLObjectImplem.hpp>
Public Member Functions | |
XMLObjectImplem (const std::string &tag) | |
Construct with a 'tag'. More... | |
XMLObjectImplem * | deepCopy () const |
Deep copy. More... | |
void | addAttribute (const std::string &name, const std::string &value) |
Add a [name, value] attribute. More... | |
void | addChild (const XMLObject &child) |
Add a child XMLObject. More... | |
void | addContent (const std::string &contentLine) |
Add a content line. More... | |
const std::string & | getTag () const |
Return the tag std::string. More... | |
bool | hasAttribute (const std::string &name) const |
Determine whether an attribute exists. More... | |
const std::string & | getAttribute (const std::string &name) const |
Look up an attribute by name. More... | |
int | numChildren () const |
Return the number of children. More... | |
const XMLObject & | getChild (int i) const |
Look up a child by its index. More... | |
int | numContentLines () const |
Get the number of content lines. More... | |
const Map & | getAttributes () const |
Get all attributes. More... | |
const std::string & | getContentLine (int i) const |
Look up a content line by index. More... | |
void | appendContentLine (const size_t &i, const std::string &str) |
Add string at the the end of a content line. More... | |
void | removeContentLine (const size_t &i) |
Remove content line by index. More... | |
void | print (std::ostream &os, int indent) const |
Print to stream with the given indentation level. Output will be well-formed XML. More... | |
std::string | toString () const |
Write as a std::string. Output may be ill-formed XML. More... | |
std::string | header (bool strictXML=false) const |
Write the header. More... | |
std::string | terminatedHeader (bool strictXML=false) const |
Write the header terminated as <Header> More... | |
std::string | footer () const |
Write the footer. More... | |
The XMLObjectImplem class takes care of the low-level implementation details of XMLObject.
Definition at line 30 of file Teuchos_XMLObjectImplem.hpp.
XMLObjectImplem::XMLObjectImplem | ( | const std::string & | tag | ) |
Construct with a 'tag'.
Definition at line 17 of file Teuchos_XMLObjectImplem.cpp.
XMLObjectImplem * XMLObjectImplem::deepCopy | ( | ) | const |
Deep copy.
Definition at line 21 of file Teuchos_XMLObjectImplem.cpp.
void XMLObjectImplem::addAttribute | ( | const std::string & | name, |
const std::string & | value | ||
) |
Add a [name, value] attribute.
Definition at line 41 of file Teuchos_XMLObjectImplem.cpp.
void XMLObjectImplem::addChild | ( | const XMLObject & | child | ) |
Add a child XMLObject.
Definition at line 47 of file Teuchos_XMLObjectImplem.cpp.
void XMLObjectImplem::addContent | ( | const std::string & | contentLine | ) |
Add a content line.
Definition at line 52 of file Teuchos_XMLObjectImplem.cpp.
|
inline |
Return the tag std::string.
Definition at line 51 of file Teuchos_XMLObjectImplem.hpp.
|
inline |
Determine whether an attribute exists.
Definition at line 54 of file Teuchos_XMLObjectImplem.hpp.
|
inline |
Look up an attribute by name.
Definition at line 58 of file Teuchos_XMLObjectImplem.hpp.
int XMLObjectImplem::numChildren | ( | ) | const |
Return the number of children.
Definition at line 36 of file Teuchos_XMLObjectImplem.cpp.
const XMLObject & XMLObjectImplem::getChild | ( | int | i | ) | const |
Look up a child by its index.
Definition at line 64 of file Teuchos_XMLObjectImplem.cpp.
|
inline |
Get the number of content lines.
Definition at line 68 of file Teuchos_XMLObjectImplem.hpp.
|
inline |
Get all attributes.
Definition at line 71 of file Teuchos_XMLObjectImplem.hpp.
|
inline |
Look up a content line by index.
Definition at line 74 of file Teuchos_XMLObjectImplem.hpp.
|
inline |
Add string at the the end of a content line.
Definition at line 77 of file Teuchos_XMLObjectImplem.hpp.
void XMLObjectImplem::removeContentLine | ( | const size_t & | i | ) |
Remove content line by index.
Definition at line 57 of file Teuchos_XMLObjectImplem.cpp.
void XMLObjectImplem::print | ( | std::ostream & | os, |
int | indent | ||
) | const |
Print to stream with the given indentation level. Output will be well-formed XML.
Definition at line 212 of file Teuchos_XMLObjectImplem.cpp.
std::string XMLObjectImplem::toString | ( | ) | const |
Write as a std::string. Output may be ill-formed XML.
Definition at line 176 of file Teuchos_XMLObjectImplem.cpp.
std::string XMLObjectImplem::header | ( | bool | strictXML = false | ) | const |
Write the header.
Definition at line 69 of file Teuchos_XMLObjectImplem.cpp.
std::string XMLObjectImplem::terminatedHeader | ( | bool | strictXML = false | ) | const |
Write the header terminated as <Header>
Definition at line 154 of file Teuchos_XMLObjectImplem.cpp.
|
inline |
Write the footer.
Definition at line 97 of file Teuchos_XMLObjectImplem.hpp.