Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
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
template<>
bool getRequired (const std::string &name) const
 
template<>
int getRequired (const std::string &name) const
 
template<>
double getRequired (const std::string &name) const
 
template<>
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT bool getRequired (const std::string &name) const
 
template<>
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT int getRequired (const std::string &name) const
 
template<>
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT double getRequired (const std::string &name) const
 
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.
 
void appendContentLine (const size_t &i, const std::string &str)
 
void removeContentLine (const size_t &i)
 
 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.
 

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

◆ XMLTestNode() [1/4]

Teuchos::XMLTestNode::XMLTestNode ( )

Definition at line 119 of file Teuchos_XMLPerfTestArchive.cpp.

◆ XMLTestNode() [2/4]

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

Definition at line 121 of file Teuchos_XMLPerfTestArchive.cpp.

◆ XMLTestNode() [3/4]

Teuchos::XMLTestNode::XMLTestNode ( XMLObjectImplem * ptr)

Definition at line 123 of file Teuchos_XMLPerfTestArchive.cpp.

◆ XMLTestNode() [4/4]

Teuchos::XMLTestNode::XMLTestNode ( XMLObject obj)

Definition at line 125 of file Teuchos_XMLPerfTestArchive.cpp.

Member Function Documentation

◆ addDouble()

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

Definition at line 127 of file Teuchos_XMLPerfTestArchive.cpp.

◆ addInt()

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

Definition at line 131 of file Teuchos_XMLPerfTestArchive.cpp.

◆ addBool()

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

Definition at line 135 of file Teuchos_XMLPerfTestArchive.cpp.

◆ addValueTolerance()

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

Definition at line 139 of file Teuchos_XMLPerfTestArchive.cpp.

◆ addString()

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

Definition at line 143 of file Teuchos_XMLPerfTestArchive.cpp.

◆ addAttribute()

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

Definition at line 172 of file Teuchos_XMLPerfTestArchive.hpp.

◆ hasChild()

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

Definition at line 147 of file Teuchos_XMLPerfTestArchive.cpp.

◆ appendContentLine()

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

Definition at line 158 of file Teuchos_XMLPerfTestArchive.cpp.

◆ getChild() [1/2]

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

Definition at line 162 of file Teuchos_XMLPerfTestArchive.cpp.

◆ getChild() [2/2]

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

Definition at line 171 of file Teuchos_XMLPerfTestArchive.cpp.

◆ xml_object()

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

Definition at line 175 of file Teuchos_XMLPerfTestArchive.cpp.

◆ hasSameElements()

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: