Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

NormalNode Class Template Reference
[Node]

#include <node.h>

Inheritance diagram for NormalNode:

Inheritance graph
[legend]
Collaboration diagram for NormalNode:

Collaboration graph
[legend]
List of all members.

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

virtual ~NormalNode ()
virtual NormalNode< _TContent > * construct () const
 virtual default constructor

virtual NormalNode< _TContent > * cloneTree () const
 Simulated Copy Constructor All children are duplicated, pointers to root and parent are preserved.

virtual NormalNode< _TContent > * cloneNode () const
 Simulated Copy Constructor for the Node, pointer to root, parent and children are preserved, but the children are not duplicated.

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.


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).


Detailed Description

template<class _TContent>
class treecomp::NormalNode< _TContent >

This class is the basic part of the tree (see Node class).

Definition at line 255 of file node.h.


Member Typedef Documentation

typedef const Node<_TContent>* const_pointer
 

Reimplemented from Node.

Definition at line 270 of file node.h.

typedef const Node<_TContent>& const_reference
 

Reimplemented from Node.

Definition at line 267 of file node.h.

typedef ptrdiff_t difference_type
 

Reimplemented from Node.

Definition at line 265 of file node.h.

typedef std::map<const Node<_TContent>*, Node<_TContent>*> OldNewMap [protected]
 

Reimplemented from Node.

Definition at line 290 of file node.h.

Referenced by NormalNode::cloneTree().

typedef Node<_TContent>* pointer
 

Reimplemented from Node.

Definition at line 269 of file node.h.

typedef Node<_TContent>& reference
 

Reimplemented from Node.

Definition at line 266 of file node.h.

typedef size_t size_type
 

Reimplemented from Node.

Definition at line 264 of file node.h.

typedef _TContent value_type
 

Reimplemented from Node.

Definition at line 268 of file node.h.


Constructor & Destructor Documentation

virtual ~NormalNode   [inline, virtual]
 

Definition at line 275 of file node.h.


Member Function Documentation

void acceptVisitor NodeVisitorBase< const Node< _TContent >, const NormalNode< _TContent >, const RootNode< _TContent > > *    visitor const [virtual]
 

Accept a const visitor.

Calls the visitors visitNormalNode method with this node.

Parameters:
visitor  The visitor to visit

Implements Node.

Definition at line 844 of file node.h.

void acceptVisitor NodeVisitorBase< Node< _TContent >, NormalNode< _TContent >, RootNode< _TContent > > *    visitor [virtual]
 

Accept a visitor.

Calls the visitors visitNormalNode method with this node.

Parameters:
visitor  The visitor to visit

Implements Node.

Definition at line 830 of file node.h.

NormalNode< _TContent > * cloneNode   const [virtual]
 

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 793 of file node.h.

NormalNode< _TContent > * cloneTree   const [virtual]
 

Simulated Copy Constructor All children are duplicated, pointers to root and parent are preserved.

Implements Node.

Definition at line 769 of file node.h.

References Node::linkSiblings(), Node::m_children, and NormalNode::OldNewMap.

virtual NormalNode<_TContent>* construct   const [inline, virtual]
 

virtual default constructor

Implements Node.

Definition at line 278 of file node.h.

Node< _TContent > * copy OldNewMap   nodeMap const [protected, virtual]
 

Copy Node and its children recursively (is used by cloneTree).

Parameters:
nodeMap  This map holds old-new node pairs of the ancestors of this

Implements Node.

Definition at line 806 of file node.h.

References Node::linkSiblings(), Node::m_children, Node::m_parent, and Node::m_root.


The documentation for this class was generated from the following file:
Generated on Mon Jan 6 12:02:25 2003 for TreeComp by doxygen1.2.17