Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Comment Class Reference

#include <elm/xom/Comment.h>

+ Inheritance diagram for Comment:

Public Member Functions

 Comment (const Comment *comment)
 
 Comment (String data)
 
void setValue (String data)
 
String getText (void)
 
virtual Nodecopy (void)
 
virtual NodegetChild (int index)
 
virtual int getChildCount (void)
 
virtual String getValue (void)
 
virtual String toXML (void)
 
- Public Member Functions inherited from Node
virtual ~Node (void)
 
voidgetNode (void) const
 
kind_t kind (void) const
 
void detach (void)
 
bool equals (const Node *node) const
 
virtual String getBaseURI (void)
 
virtual DocumentgetDocument (void)
 
virtual ParentNodegetParent (void)
 
virtual Nodesquery (const String &xpath)
 
virtual Nodesquery (const String &xpath, XPathContext *context)
 
int line (void) const
 

Protected Member Functions

 Comment (void *node)
 
- Protected Member Functions inherited from Node
 Node (void *_node)
 
void setNode (void *_node)
 
Nodemake (void *node)
 
Nodeget (void *node)
 
NodeinternCopy (void)
 
NodeinternGetChild (int index)
 
int internGetChildCount (void)
 
String internGetValue (void)
 
String internToXML (void)
 

Additional Inherited Members

- Public Types inherited from Node
enum  kind_t {
  NONE = 0, ELEMENT, DOCUMENT, TEXT,
  COMMENT, ATTRIBUTE, PROCESSING_INSTRUCTION, DOCTYPE,
  NAMESPACE
}
 
typedef enum elm::xom::Node::kind_t kind_t
 
- Static Protected Member Functions inherited from Node
static void freeNode (void *node)
 
- Protected Attributes inherited from Node
voidnode
 

Detailed Description

Node containing simple comment.

Constructor & Destructor Documentation

◆ Comment() [1/3]

Comment ( void node)
protected

Make a comment from an existing XML node.

Parameters
nodeXML node.

Referenced by Comment::copy().

◆ Comment() [2/3]

Comment ( const Comment comment)

Build a new text node by cloning an existing one.

Parameters
textText node to clone.

References Node::node.

◆ Comment() [3/3]

Comment ( String  data)

Build a new comment node.

Parameters
dataContent of the text node.

References Node::node.

Member Function Documentation

◆ copy()

Node * copy ( void  )
virtual

Implements Node.

References Comment::Comment().

◆ getChild()

Node * getChild ( int  index)
virtual

Returns the child of this node at the specified position.

Parameters
positionthe index of the child node to return
Returns
the positionth child node of this node

Implements Node.

References Node::internGetChild().

◆ getChildCount()

int getChildCount ( void  )
virtual

Implements Node.

References Node::internGetChildCount().

◆ getText()

String getText ( void  )

Get the text of this node.

Returns
Node text.

References Node::node.

Referenced by Serializer::write().

◆ getValue()

String getValue ( void  )
virtual

Get the node as a string with markup removed.

Returns
Text value of the node. The returned string must be fried by the caller.

Implements Node.

◆ setValue()

void setValue ( String  data)

Set the content of the text.

Parameters
dataText to put in.

References Node::node.

◆ toXML()

String toXML ( void  )
virtual

Implements Node.

References Node::internToXML().


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