Teuchos Package Browser (Single Doxygen Collection)  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::XMLTestNode Class Reference

Subclass of XMLObject used by the performance archive. More...

#include <Teuchos_XMLPerfTestArchive.hpp>

Inheritance diagram for Teuchos::XMLTestNode:
Inheritance graph
[legend]

Public Member Functions

 XMLTestNode ()
 
 XMLTestNode (const std::string &tag)
 
 XMLTestNode (XMLObjectImplem *ptr)
 
 XMLTestNode (XMLObject obj)
 
void addDouble (const std::string &name, double val)
 
void addInt (const std::string &name, int val)
 
void addBool (const std::string &name, bool val)
 
void addValueTolerance (const std::string &name, ValueTolerance val)
 
void addString (const std::string &name, std::string val)
 
template<class T >
void addAttribute (const std::string &name, T val)
 
bool hasChild (const std::string &name) const
 
void appendContentLine (const size_t &i, const std::string &str)
 
XMLTestNode getChild (const std::string &name) const
 
XMLTestNode getChild (const int &i) const
 
const XMLObjectxml_object () const
 
bool hasSameElements (XMLTestNode const &lhs) const
 
- Public Member Functions inherited from Teuchos::XMLObject
void appendContentLine (const size_t &i, const std::string &str)
 
void removeContentLine (const size_t &i)
 
 XMLObject ()
 Empty constructor. More...
 
 XMLObject (const std::string &tag)
 Construct using a node labeled by tag. More...
 
 XMLObject (XMLObjectImplem *ptr)
 Construct with a pointer to the low-level representation. More...
 
XMLObject deepCopy () const
 Make a deep copy of this object. More...
 
const std::string & getTag () const
 Return the tag of the current node. More...
 
bool hasAttribute (const std::string &name) const
 Find out if the current node has an attribute of the specified name. More...
 
const std::string & getAttribute (const std::string &name) const
 Return the value of the attribute with the specified name. More...
 
const std::string & getRequired (const std::string &name) const
 Get an attribute, throwing an std::exception if it is not found. More...
 
double getRequiredDouble (const std::string &name) const
 Get a required attribute, returning it as a double. More...
 
int getRequiredInt (const std::string &name) const
 Get a required attribute, returning it as an int. More...
 
template<class T >
getRequired (const std::string &name) const
 Get a required attribute, returning it as T. More...
 
bool getRequiredBool (const std::string &name) const
 Get a required attribute, returning it as a bool. More...
 
template<class T >
getWithDefault (const std::string &name, const T &defaultValue) const
 Get an attribute, assigning a default value if the requested attribute does not exist. More...
 
int numChildren () const
 Return the number of child nodes owned by this node. More...
 
const XMLObjectgetChild (int i) const
 Return the i-th child node. More...
 
int findFirstChild (std::string tagName) const
 Returns the index of the first child found with the given tag name. Returns -1 if no child is found. More...
 
int numContentLines () const
 Return the number of lines of character content stored in this node. More...
 
const std::string & getContentLine (int i) const
 Return the i-th line of character content stored in this node. More...
 
std::string toString () const
 Represent this node and its children as a std::string. More...
 
void print (std::ostream &os, int indent) const
 Print this node and its children to stream with the given indentation. More...
 
std::string header () const
 Write the header for this object to a std::string. More...
 
std::string terminatedHeader () const
 Write the header for this object to a std::string. More...
 
std::string footer () const
 Write the footer for this object to a std::string. More...
 
bool isEmpty () const
 Find out if a node is empty. More...
 
void checkTag (const std::string &expected) const
 Check that a tag is equal to an expected std::string. More...
 
void addDouble (const std::string &name, double val)
 Add a double as an attribute. More...
 
void addInt (const std::string &name, int val)
 Add an int as an attribute. More...
 
void addBool (const std::string &name, bool val)
 Add a bool as an attribute. More...
 
template<class T >
void addAttribute (const std::string &name, T value)
 Lookup whether or not Doubles are allowed. More...
 
void addChild (const XMLObject &child)
 Add a child node to the node. More...
 
void addContent (const std::string &contentLine)
 Add a line of character content. More...
 

Additional Inherited Members

- Protected Attributes inherited from Teuchos::XMLObject
RCP< XMLObjectImplemptr_
 

Detailed Description

Subclass of XMLObject used by the performance archive.

This subclass of XMLObject generates an XML list in a style more suitable for a performance test archive. It also provides a number of convenience functions helpful for working with a test archive.

Definition at line 159 of file Teuchos_XMLPerfTestArchive.hpp.

Constructor & Destructor Documentation

Teuchos::XMLTestNode::XMLTestNode ( )

Definition at line 119 of file Teuchos_XMLPerfTestArchive.cpp.

Teuchos::XMLTestNode::XMLTestNode ( const std::string &  tag)

Definition at line 121 of file Teuchos_XMLPerfTestArchive.cpp.

Teuchos::XMLTestNode::XMLTestNode ( XMLObjectImplem ptr)

Definition at line 123 of file Teuchos_XMLPerfTestArchive.cpp.

Teuchos::XMLTestNode::XMLTestNode ( XMLObject  obj)

Definition at line 125 of file Teuchos_XMLPerfTestArchive.cpp.

Member Function Documentation

void Teuchos::XMLTestNode::addDouble ( const std::string &  name,
double  val 
)

Definition at line 127 of file Teuchos_XMLPerfTestArchive.cpp.

void Teuchos::XMLTestNode::addInt ( const std::string &  name,
int  val 
)

Definition at line 131 of file Teuchos_XMLPerfTestArchive.cpp.

void Teuchos::XMLTestNode::addBool ( const std::string &  name,
bool  val 
)

Definition at line 135 of file Teuchos_XMLPerfTestArchive.cpp.

void Teuchos::XMLTestNode::addValueTolerance ( const std::string &  name,
ValueTolerance  val 
)

Definition at line 139 of file Teuchos_XMLPerfTestArchive.cpp.

void Teuchos::XMLTestNode::addString ( const std::string &  name,
std::string  val 
)

Definition at line 143 of file Teuchos_XMLPerfTestArchive.cpp.

template<class T >
void Teuchos::XMLTestNode::addAttribute ( const std::string &  name,
val 
)
inline

Definition at line 172 of file Teuchos_XMLPerfTestArchive.hpp.

bool Teuchos::XMLTestNode::hasChild ( const std::string &  name) const

Definition at line 147 of file Teuchos_XMLPerfTestArchive.cpp.

void Teuchos::XMLTestNode::appendContentLine ( const size_t &  i,
const std::string &  str 
)

Definition at line 158 of file Teuchos_XMLPerfTestArchive.cpp.

XMLTestNode Teuchos::XMLTestNode::getChild ( const std::string &  name) const

Definition at line 162 of file Teuchos_XMLPerfTestArchive.cpp.

XMLTestNode Teuchos::XMLTestNode::getChild ( const int &  i) const

Definition at line 171 of file Teuchos_XMLPerfTestArchive.cpp.

const XMLObject * Teuchos::XMLTestNode::xml_object ( ) const

Definition at line 175 of file Teuchos_XMLPerfTestArchive.cpp.

bool Teuchos::XMLTestNode::hasSameElements ( XMLTestNode const &  lhs) const

Definition at line 179 of file Teuchos_XMLPerfTestArchive.cpp.


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