Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::TreeNode< TValueType > Class Template Reference
[Data Representation Objects]

TreeNode class. More...

#include <itkTreeNode.h>

Inheritance diagram for itk::TreeNode< TValueType >:

Inheritance graph
[legend]
Collaboration diagram for itk::TreeNode< TValueType >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Object Superclass
typedef TreeNode< TValueType > Self
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef std::vector< PointerChildrenListType

Public Member Functions

virtual const char * GetNameOfClass () const
const TValueType & Get () const
TValueType Set (const TValueType data)
TreeNode< TValueType > * GetChild (int number) const
TreeNode< TValueType > * GetParent () const
bool HasChildren () const
bool HasParent () const
void SetParent (TreeNode< TValueType > *n)
int CountChildren () const
bool Remove (TreeNode< TValueType > *n)
unsigned int GetNumberOfChildren (unsigned int depth=0, char *name=NULL) const
bool ReplaceChild (TreeNode< TValueType > *oldChild, TreeNode< TValueType > *newChild)
int ChildPosition (const TreeNode< TValueType > *node) const
int ChildPosition (TValueType node) const
void AddChild (TreeNode< TValueType > *node)
virtual void AddChild (int number, TreeNode< TValueType > *node)
virtual ChildrenListTypeGetChildren (unsigned int depth=0, char *name=NULL) const
virtual ChildrenListTypeGetChildrenList ()

Static Public Member Functions

Pointer New ()

Protected Member Functions

 TreeNode ()
virtual ~TreeNode ()

Protected Attributes

TValueType m_Data
Selfm_Parent
ChildrenListType m_Children

Detailed Description

template<class TValueType>
class itk::TreeNode< TValueType >

TreeNode class.

This class derives from the Object class.

The class is templated over the type of the elements.

Template parameters for class TreeNode:

Definition at line 41 of file itkTreeNode.h.


Member Typedef Documentation

template<class TValueType>
typedef std::vector<Pointer> itk::TreeNode< TValueType >::ChildrenListType
 

Reimplemented in itk::SpatialObjectTreeNode< TDimension >.

Definition at line 51 of file itkTreeNode.h.

template<class TValueType>
typedef SmartPointer<const Self> itk::TreeNode< TValueType >::ConstPointer
 

Reimplemented from itk::Object.

Reimplemented in itk::SpatialObjectTreeNode< TDimension >.

Definition at line 50 of file itkTreeNode.h.

template<class TValueType>
typedef SmartPointer<Self> itk::TreeNode< TValueType >::Pointer
 

Reimplemented from itk::Object.

Reimplemented in itk::SpatialObjectTreeNode< TDimension >.

Definition at line 49 of file itkTreeNode.h.

template<class TValueType>
typedef TreeNode<TValueType> itk::TreeNode< TValueType >::Self
 

Smart pointer typedef support.

Reimplemented from itk::Object.

Reimplemented in itk::SpatialObjectTreeNode< TDimension >.

Definition at line 48 of file itkTreeNode.h.

template<class TValueType>
typedef Object itk::TreeNode< TValueType >::Superclass
 

Standard typedefs

Reimplemented from itk::Object.

Reimplemented in itk::SpatialObjectTreeNode< TDimension >.

Definition at line 47 of file itkTreeNode.h.


Constructor & Destructor Documentation

template<class TValueType>
itk::TreeNode< TValueType >::TreeNode  )  [protected]
 

Set the data of the node

template<class TValueType>
virtual itk::TreeNode< TValueType >::~TreeNode  )  [protected, virtual]
 


Member Function Documentation

template<class TValueType>
virtual void itk::TreeNode< TValueType >::AddChild int  number,
TreeNode< TValueType > *  node
[virtual]
 

Add a child to the node and specify the number in the children list

template<class TValueType>
void itk::TreeNode< TValueType >::AddChild TreeNode< TValueType > *  node  ) 
 

Add a child to the node

template<class TValueType>
int itk::TreeNode< TValueType >::ChildPosition TValueType  node  )  const
 

Return the child position given a value

template<class TValueType>
int itk::TreeNode< TValueType >::ChildPosition const TreeNode< TValueType > *  node  )  const
 

Return the child position given a node

template<class TValueType>
int itk::TreeNode< TValueType >::CountChildren  )  const
 

Return the number of children

template<class TValueType>
const TValueType& itk::TreeNode< TValueType >::Get  )  const
 

Get the value of the node

template<class TValueType>
TreeNode<TValueType>* itk::TreeNode< TValueType >::GetChild int  number  )  const
 

Get the child node

template<class TValueType>
virtual ChildrenListType* itk::TreeNode< TValueType >::GetChildren unsigned int  depth = 0,
char *  name = NULL
const [virtual]
 

Get the children list

Reimplemented in itk::SpatialObjectTreeNode< TDimension >.

template<class TValueType>
virtual ChildrenListType& itk::TreeNode< TValueType >::GetChildrenList  )  [inline, virtual]
 

Get the internal list of children

Definition at line 108 of file itkTreeNode.h.

template<class TValueType>
virtual const char* itk::TreeNode< TValueType >::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::Object.

Reimplemented in itk::SpatialObjectTreeNode< TDimension >.

template<class TValueType>
unsigned int itk::TreeNode< TValueType >::GetNumberOfChildren unsigned int  depth = 0,
char *  name = NULL
const
 

Get the number of children given a name and depth

template<class TValueType>
TreeNode<TValueType>* itk::TreeNode< TValueType >::GetParent  )  const
 

Get the parent node

template<class TValueType>
bool itk::TreeNode< TValueType >::HasChildren  )  const
 

Return true if the node has children

template<class TValueType>
bool itk::TreeNode< TValueType >::HasParent  )  const
 

Return true if the node has a parent

template<class TValueType>
Pointer itk::TreeNode< TValueType >::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

Reimplemented in itk::SpatialObjectTreeNode< TDimension >.

template<class TValueType>
bool itk::TreeNode< TValueType >::Remove TreeNode< TValueType > *  n  ) 
 

Remove a node from the node

template<class TValueType>
bool itk::TreeNode< TValueType >::ReplaceChild TreeNode< TValueType > *  oldChild,
TreeNode< TValueType > *  newChild
 

Replace a given child by a new one

template<class TValueType>
TValueType itk::TreeNode< TValueType >::Set const TValueType  data  ) 
 

Set the current value of the node

template<class TValueType>
void itk::TreeNode< TValueType >::SetParent TreeNode< TValueType > *  n  ) 
 

Set the parent of the node


Member Data Documentation

template<class TValueType>
ChildrenListType itk::TreeNode< TValueType >::m_Children [protected]
 

Definition at line 119 of file itkTreeNode.h.

template<class TValueType>
TValueType itk::TreeNode< TValueType >::m_Data [protected]
 

Definition at line 117 of file itkTreeNode.h.

template<class TValueType>
Self* itk::TreeNode< TValueType >::m_Parent [protected]
 

Definition at line 118 of file itkTreeNode.h.


The documentation for this class was generated from the following file:
Generated at Thu May 25 02:31:30 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000