Comment Class Reference

A comment contains only uninterpreted text. More...

#include <Xml.h>

Inheritance diagram for Comment:
Node

List of all members.

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.

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 CommentgetAs (const Node &node)
 Recast a Node to a const Comment, throwing an error if the Node is not actually an Comment node.
static CommentgetAs (Node &node)
 Recast a writable Node to a writable Comment, throwing an error if the Node is not actually an Comment node.

Detailed Description

A comment contains only uninterpreted text.


Constructor & Destructor Documentation

Comment (  )  [inline]

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

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.


Member Function Documentation

static Comment& getAs ( Node node  )  [static]

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

See also:
isA()
static const Comment& getAs ( const Node node  )  [static]

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

See also:
isA()
static bool isA ( const Node  )  [static]

Test whether a given Node is an Comment node.


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

Generated on Thu Aug 12 16:38:33 2010 for SimTKcore by  doxygen 1.6.1