Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Teuchos::XMLObjectImplem Class Reference

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...
 
XMLObjectImplemdeepCopy () 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 XMLObjectgetChild (int i) const
 Look up a child by its index. More...
 
int numContentLines () const
 Get the number of content lines. More...
 
const MapgetAttributes () 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...
 

Detailed Description

The XMLObjectImplem class takes care of the low-level implementation details of XMLObject.

Definition at line 30 of file Teuchos_XMLObjectImplem.hpp.

Constructor & Destructor Documentation

XMLObjectImplem::XMLObjectImplem ( const std::string &  tag)

Construct with a 'tag'.

Definition at line 17 of file Teuchos_XMLObjectImplem.cpp.

Member Function Documentation

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.

const std::string& Teuchos::XMLObjectImplem::getTag ( ) const
inline

Return the tag std::string.

Definition at line 51 of file Teuchos_XMLObjectImplem.hpp.

bool Teuchos::XMLObjectImplem::hasAttribute ( const std::string &  name) const
inline

Determine whether an attribute exists.

Definition at line 54 of file Teuchos_XMLObjectImplem.hpp.

const std::string& Teuchos::XMLObjectImplem::getAttribute ( const std::string &  name) const
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.

int Teuchos::XMLObjectImplem::numContentLines ( ) const
inline

Get the number of content lines.

Definition at line 68 of file Teuchos_XMLObjectImplem.hpp.

const Map& Teuchos::XMLObjectImplem::getAttributes ( ) const
inline

Get all attributes.

Definition at line 71 of file Teuchos_XMLObjectImplem.hpp.

const std::string& Teuchos::XMLObjectImplem::getContentLine ( int  i) const
inline

Look up a content line by index.

Definition at line 74 of file Teuchos_XMLObjectImplem.hpp.

void Teuchos::XMLObjectImplem::appendContentLine ( const size_t &  i,
const std::string &  str 
)
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.

std::string Teuchos::XMLObjectImplem::footer ( ) const
inline

Write the footer.

Definition at line 97 of file Teuchos_XMLObjectImplem.hpp.


The documentation for this class was generated from the following files: