Class Tree::Node#

Nested Relationships#

This class is a nested type of Class Tree.

Inheritance Relationships#

Derived Type#

Class Documentation#

class Node

A tree node has a pointer for the incoming (parent) node, a list of outgoing (children) nodes and links for different traversal orders.

Subclassed by DomTree::Node

Public Functions

inline Node()
inline virtual Node *new_copy()
inline virtual ~Node()
inline Node *parent() const
inline Node *child(int i) const
inline Edge *in_edge() const
inline Edge *out_edge(int i) const
inline int num_children() const
inline virtual void dump(std::ostream &os)

Protected Functions

inline void copy(Node *n)

Protected Attributes

Edge *incoming
std::deque<Edge*> outgoing
Node *next_preorder
Node *next_postorder
Node *prev_postorder
bool in_use

Friends

friend class Tree
friend class Tree::PreOrderIterator
friend class Tree::PostOrderIterator
friend class Tree::ReversePostOrderIterator
friend class Tree::OutEdgesIterator
friend class Tree::ChildNodesIterator