Simbody
|
A comment contains only uninterpreted text. More...
#include <Xml.h>
Public Member Functions | |
Comment () | |
Create an empty Comment node handle, suitable only for holding references to other Comment nodes. | |
Comment (const String &text) | |
Create a new Comment node with the given text; the node is not yet owned by any XML document. | |
Comment | clone () const |
The clone() method makes a deep copy of this Comment node and returns a new orphan Comment node with the same contents; ordinary assignment and copy construction are shallow. | |
Static Public Member Functions | |
Conversion to Comment 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 a Comment node and if so cast it to one. | |
static bool | isA (const Node &) |
Test whether a given Node is an Comment node. | |
static const Comment & | getAs (const Node &node) |
Recast a Node to a const Comment, throwing an error if the Node is not actually an Comment node. | |
static Comment & | getAs (Node &node) |
Recast a writable Node to a writable Comment, throwing an error if the Node is not actually an Comment node. |
A comment contains only uninterpreted text.
SimTK::Xml::Comment::Comment | ( | ) | [inline] |
SimTK::Xml::Comment::Comment | ( | const String & | text | ) | [explicit] |
Create a new Comment node with the given text; the node is not yet owned by any XML document.
Don't include the comment delimiters "<!--" and "-->" in the text; those will be added automatically if the document is serialized to a file or string.
Comment SimTK::Xml::Comment::clone | ( | ) | const |
The clone() method makes a deep copy of this Comment node and returns a new orphan Comment node with the same contents; ordinary assignment and copy construction are shallow.
Reimplemented from SimTK::Xml::Node.
static bool SimTK::Xml::Comment::isA | ( | const Node & | ) | [static] |