Simbody
Public Member Functions

SimTK::Xml::Unknown Class Reference

This is something we don't understand but can carry around. More...

#include <Xml.h>

Inheritance diagram for SimTK::Xml::Unknown:

List of all members.

Public Member Functions

 Unknown ()
 Create an empty Unknown node handle, suitable only for holding references to other Unknown nodes.
 Unknown (const String &contents)
 Create a new Unknown node with the given contents; the node is not yet owned by any XML document.
 Unknown (Element &element, const String &contents)
 Create a new Unknown node and append it to the list of nodes that are children of the given Element.
Unknown clone () const
 The clone() method makes a deep copy of this Unknown node and returns a new orphan Unknown node with the same contents; ordinary assignment and copy construction are shallow.
const StringgetContents () const
 Obtain the contents of this Unknown node.
void setContents (const String &contents)
 Change the contents of this Unknown node.

Static Public Member Functions

Conversion to Unknown from Node

If you have a handle to a Node, such as would be returned by a node_iterator, you can check whether that Node is an Unknown node and if so cast it to one.

static bool isA (const Node &)
 Test whether a given Node is an Unknown node.
static const UnknowngetAs (const Node &node)
 Recast a Node to a const Unknown, throwing an error if the Node is not actually an Unknown node.
static UnknowngetAs (Node &node)
 Recast a writable Node to a writable Unknown, throwing an error if the Node is not actually an Unknown node.

Detailed Description

This is something we don't understand but can carry around.


Constructor & Destructor Documentation

SimTK::Xml::Unknown::Unknown ( ) [inline]

Create an empty Unknown node handle, suitable only for holding references to other Unknown nodes.

SimTK::Xml::Unknown::Unknown ( const String contents) [explicit]

Create a new Unknown node with the given contents; the node is not yet owned by any XML document.

Don't include the tag delimiters "<" and ">" in the contents; those will be added automatically if the document is serialized to a file or string. That is, if you want "<!SOMETHING blah blah>", the contents you provide should be "!SOMETHING blah blah".

SimTK::Xml::Unknown::Unknown ( Element element,
const String contents 
) [inline]

Create a new Unknown node and append it to the list of nodes that are children of the given Element.

The Element becomes the owner of the new Unknown node although the handle retains a reference to it.


Member Function Documentation

Unknown SimTK::Xml::Unknown::clone ( ) const

The clone() method makes a deep copy of this Unknown node and returns a new orphan Unknown node with the same contents; ordinary assignment and copy construction are shallow.

Reimplemented from SimTK::Xml::Node.

const String& SimTK::Xml::Unknown::getContents ( ) const

Obtain the contents of this Unknown node.

This is everything that would be between the "<" and ">" in the XML document.

void SimTK::Xml::Unknown::setContents ( const String contents)

Change the contents of this Unknown node.

This is everything that would be between the "<" and ">" in the XML document.

static bool SimTK::Xml::Unknown::isA ( const Node ) [static]

Test whether a given Node is an Unknown node.

static const Unknown& SimTK::Xml::Unknown::getAs ( const Node node) [static]

Recast a Node to a const Unknown, throwing an error if the Node is not actually an Unknown node.

See also:
isA()
static Unknown& SimTK::Xml::Unknown::getAs ( Node node) [static]

Recast a writable Node to a writable Unknown, throwing an error if the Node is not actually an Unknown node.

See also:
isA()

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines