#include <node.h>
Inheritance diagram for RootNode:
Public Types | |
typedef size_t | size_type |
typedef ptrdiff_t | difference_type |
typedef Node< _TContent > & | reference |
typedef const Node< _TContent > & | const_reference |
typedef _TContent | value_type |
typedef Node< _TContent > * | pointer |
typedef const Node< _TContent > * | const_pointer |
Public Methods | |
RootNode () | |
Constructor. | |
virtual RootNode< _TContent > * | construct () const |
virtual default constructor | |
virtual RootNode< _TContent > * | cloneTree () const |
Simulated Copy Constructor for the tree. | |
virtual RootNode< _TContent > * | cloneNode () const |
Simulated Copy Constructor for the Node, pointer to root, parent and children are preserved, but the children are not duplicated. | |
virtual const std::list< Node< _TContent > * > * | getLeaves () const |
Get a list of leaves of this node. | |
virtual size_type | getNumDescendants () const |
Get the number of descendants of this node. | |
virtual void | recalcLeaves () |
Update the list of leaves of this node. | |
virtual void | acceptVisitor (NodeVisitorBase< Node< _TContent >, NormalNode< _TContent >, RootNode< _TContent > > *visitor) |
Accept a visitor. | |
virtual void | acceptVisitor (NodeVisitorBase< const Node< _TContent >, const NormalNode< _TContent >, const RootNode< _TContent > > *visitor) const |
Accept a const visitor. | |
virtual bool | isRootNode () const |
Return true is the node is a RootNode This method is nescessary to distinguisch normal and super nodes inside node. | |
Protected Types | |
typedef std::map< const Node< _TContent > *, Node< _TContent > * > | OldNewMap |
Protected Methods | |
virtual Node< _TContent > * | copy (OldNewMap &nodeMap) const |
Copy Node and its children recursively (is used by cloneTree). | |
virtual void | deleteParent () |
Delete the nodes parent. | |
virtual void | setProtected (bool b) |
Make the RootNode a unit in the enclosing tree Is automatically called with parameter 'true' if the node is added to another. | |
Protected Attributes | |
std::list< Node< _TContent > * > | m_leaves |
Definition at line 310 of file node.h.
|
Reimplemented from Node. |
|
Reimplemented from Node. |
|
Reimplemented from Node. |
|
Reimplemented from Node. Definition at line 349 of file node.h. Referenced by RootNode::cloneTree(). |
|
Reimplemented from Node. |
|
Reimplemented from Node. |
|
Reimplemented from Node. |
|
Reimplemented from Node. |
|
Constructor.
Definition at line 860 of file node.h. References Node::m_root. |
|
Accept a const visitor. Calls the visitors visitRootNode method with this node.
Implements Node. |
|
Accept a visitor. Calls the visitors visitRootNode method with this node.
Implements Node. |
|
Simulated Copy Constructor for the Node, pointer to root, parent and children are preserved, but the children are not duplicated.
Implements Node. Definition at line 896 of file node.h. References Node::m_content. |
|
Simulated Copy Constructor for the tree. All children are duplicated, pointers to root and parent are preserved Implements Node. Definition at line 871 of file node.h. References Node::linkSiblings(), Node::m_children, Node::m_root, and RootNode::OldNewMap. |
|
virtual default constructor
Implements Node. |
|
Copy Node and its children recursively (is used by cloneTree).
Implements Node. Definition at line 909 of file node.h. References Node::linkSiblings(), Node::m_children, Node::m_parent, and Node::m_root. |
|
Delete the nodes parent. This method is called if the node as child is removed. Reimplemented from Node. Definition at line 998 of file node.h. References Node::m_parent, and Node::m_root. |
|
Get a list of leaves of this node. The list differs from the list obtained by 'getChildren()' only if the node is root of a (sub-) tree (= RootNode). Reimplemented from Node. Definition at line 337 of file node.h. References RootNode::m_leaves. |
|
Get the number of descendants of this node.
Reimplemented from Node. |
|
Return true is the node is a RootNode This method is nescessary to distinguisch normal and super nodes inside node.
Reimplemented from Node. |
|
Update the list of leaves of this node. Call this function after building a subtree that should later be recognized as such. Is automatically called if the node is added to another Reimplemented from Node. Definition at line 975 of file node.h. References RootNode::m_leaves. |
|
Make the RootNode a unit in the enclosing tree Is automatically called with parameter 'true' if the node is added to another.
Reimplemented from Node. Definition at line 988 of file node.h. References Node::m_protected. |
|
Definition at line 355 of file node.h. Referenced by RootNode::getLeaves(), and RootNode::recalcLeaves(). |