Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
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:
Teuchos::XMLObject

Additional Inherited Members

- Public Member Functions inherited from Teuchos::XMLObject
 XMLObject ()
 Empty constructor.
 
 XMLObject (const std::string &tag)
 Construct using a node labeled by tag.
 
 XMLObject (XMLObjectImplem *ptr)
 Construct with a pointer to the low-level representation.
 
XMLObject deepCopy () const
 Make a deep copy of this object.
 
const std::string & getTag () const
 Return the tag of the current node.
 
bool hasAttribute (const std::string &name) const
 Find out if the current node has an attribute of the specified name.
 
const std::string & getAttribute (const std::string &name) const
 Return the value of the attribute with the specified name.
 
const std::string & getRequired (const std::string &name) const
 Get an attribute, throwing an std::exception if it is not found.
 
double getRequiredDouble (const std::string &name) const
 Get a required attribute, returning it as a double.
 
int getRequiredInt (const std::string &name) const
 Get a required attribute, returning it as an int.
 
template<class T >
T getRequired (const std::string &name) const
 Get a required attribute, returning it as T.
 
bool getRequiredBool (const std::string &name) const
 Get a required attribute, returning it as a bool.
 
template<class T >
T getWithDefault (const std::string &name, const T &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 XMLObjectgetChild (int i) const
 Return the i-th child node.
 
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.
 
int numContentLines () const
 Return the number of lines of character content stored in this node.
 
const std::string & getContentLine (int i) const
 Return the i-th line of character content stored in this node.
 
std::string toString () const
 Represent this node and its children as a std::string.
 
void print (std::ostream &os, int indent) const
 Print this node and its children to stream with the given indentation.
 
std::string header () const
 Write the header for this object to a std::string.
 
std::string terminatedHeader () const
 Write the header for this object to a std::string.
 
std::string footer () const
 Write the footer for this object to a std::string.
 
bool isEmpty () const
 Find out if a node is empty.
 
void checkTag (const std::string &expected) const
 Check that a tag is equal to an expected std::string.
 
void addDouble (const std::string &name, double val)
 Add a double as an attribute.
 
void addInt (const std::string &name, int val)
 Add an int as an attribute.
 
void addBool (const std::string &name, bool val)
 Add a bool as an attribute.
 
template<class T >
void addAttribute (const std::string &name, T value)
 Lookup whether or not Doubles are allowed.
 
void addChild (const XMLObject &child)
 Add a child node to the node.
 
void addContent (const std::string &contentLine)
 Add a line of character content.
 
- Protected Attributes inherited from Teuchos::XMLObject

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.


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