Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

SSD::Node Class Reference

Class encapsulating a single node this is an abstraction layer away from the libxml data structure while allowing at the same time storage of additional information. More...

#include <node.h>

Collaboration diagram for SSD::Node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Node (ustring l, ustring c, Node *par, void *d)
 make a new node from given data
void addChild (Node *node)
 add a child to the nodes child list
 ~Node ()
 free node structure

Public Attributes

ustring label
 node label (for elements and attributes)
ustring content
 node content (for text nodes and attributes)
NodeVecrelup
 nodes related to this in "upward" direction
NodeVecreldown
 nodes related to this in "down" direction
NodeVecchildren
 document tree children of this node
Nodeparent
 document tree parent of this node
void * data
 additional data (for example underlying libxml node)

Friends

ostream & operator<< (ostream &st, const Node &n)
 print node information to stream

Detailed Description

Class encapsulating a single node this is an abstraction layer away from the libxml data structure while allowing at the same time storage of additional information.

Definition at line 37 of file node.h.


Constructor & Destructor Documentation

SSD::Node::Node ustring  l,
ustring  c,
Node par,
void *  d
[inline]
 

make a new node from given data

Parameters:
l Label of the node
c Text content of the node
par Parent node
d Additional data (for example underlying libxml node)

Definition at line 59 of file node.h.

SSD::Node::~Node  ) 
 

free node structure

Definition at line 25 of file node.cc.

References children, reldown, and relup.


Member Function Documentation

void SSD::Node::addChild Node node  ) 
 

add a child to the nodes child list

Definition at line 18 of file node.cc.

References children.

Referenced by SSD::Doc::appendNodeAttribute(), SSD::Doc::appendNodeElement(), and SSD::Doc::appendNodeText().


Friends And Related Function Documentation

ostream& operator<< ostream &  st,
const Node n
[friend]
 

print node information to stream

Parameters:
st stream to append to
n node to append to stream
Returns:
stream with output appended


Member Data Documentation

NodeVec* SSD::Node::children
 

document tree children of this node

Definition at line 48 of file node.h.

Referenced by addChild(), SSD::Doc::walkTree(), SSD::Doc::walkTreeXPath(), and ~Node().

ustring SSD::Node::content
 

node content (for text nodes and attributes)

Definition at line 42 of file node.h.

Referenced by SSD::operator<<().

void* SSD::Node::data
 

additional data (for example underlying libxml node)

Definition at line 53 of file node.h.

Referenced by SSD::Doc::walkTreeXPath().

ustring SSD::Node::label
 

node label (for elements and attributes)

Definition at line 40 of file node.h.

Referenced by SSD::operator<<().

Node* SSD::Node::parent
 

document tree parent of this node

Definition at line 50 of file node.h.

NodeVec* SSD::Node::reldown
 

nodes related to this in "down" direction

Definition at line 46 of file node.h.

Referenced by SSD::process_relations(), SSD::Doc::walkTreeXPath(), and ~Node().

NodeVec* SSD::Node::relup
 

nodes related to this in "upward" direction

Definition at line 44 of file node.h.

Referenced by SSD::process_relations(), SSD::Doc::walkTreeXPath(), and ~Node().


The documentation for this class was generated from the following files:
Generated on Thu Aug 4 17:59:02 2005 for SSDDiff by  doxygen 1.4.3-20050530