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

itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType > Class Template Reference

#include <itkVisitorDispatcher.h>

Collaboration diagram for itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >:

Collaboration graph
[legend]
List of all members.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
class itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >


Public Types

typedef int ClassIDType
typedef TVisitedClass VisitedClass
typedef VisitedClass::ConstPointer VisitedClassConstPointer
typedef VisitedClass::Pointer VisitedClassPointer
typedef TVisitFunctionPointerType VisitFunctionPointerType
typedef TVisitorBase VisitorBase
typedef VisitorBase::Pointer VisitorBasePointer
typedef VisitorsArrayType::value_type VisitorsArray_value_type
typedef std::map< ClassIDType,
VisitFunctionPointerType
VisitorsArrayType

Public Member Functions

*Adds function visitor_function
to the VisitorDispatcher class
and *associates this function
with the class TVisitorClass::This
means *that when member function
the fucntion *visitor_function
will be if object pointed
to by l *is of class TVisitorClass
**To automatically register
visitor on library you *would
call this function immediatly
after defining an *implementation
function class **Visitor class
must define a static member
function int 
CLID ()" that * returns the class ID and a virtual member int ClassID() that does * the same. * * bool Dummy
*Adds function visitor_function
to the VisitorDispatcher class
and *associates this function
with the class TVisitorClass::This
means *that when member function 
Visit (e, l) is called
**param visitor_function Pointer
to a visitor function **note
Dummy class pointer must be
passed as a first parameter
to *automatically deduct the
correct template parameter
TVisitorClass *Technically
we would like to call the
this function as * 
VisitorDispatcher (...)

Static Public Member Functions

template<class TVisitorClass>
**param visitor_function Pointer
to a visitor function **note
Dummy class pointer must be
passed as a first parameter
to *automatically deduct the
correct template parameter
TVisitorClass *Technically
we would like to call the
this function as **but MS
C compiler crashes if we do
this This is a work around
*You should pass null pointer
casted to the TVisitorClass
when *calling this function
**sa Visit *static bool 
RegisterVisitor (TVisitorClass *, VisitFunctionPointerType visitor_function)
static VisitFunctionPointerType Visit (VisitorBasePointer l)

Public Attributes

*Adds function visitor_function
to the VisitorDispatcher class
and *associates this function
with the class TVisitorClass::This
means *that when member function
the fucntion *visitor_function
will be 
called
*Adds function visitor_function
to the VisitorDispatcher class
and *associates this function
with the class TVisitorClass::This
means *that when member function
the fucntion *visitor_function
will be if object pointed
to by l *is of class TVisitorClass
**To automatically register
visitor on library 
initialization

Member Typedef Documentation

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef int itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::ClassIDType
 

Type that holds class IDs.

Definition at line 167 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef TVisitedClass itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitedClass
 

TVisitedClass is class to which visitor functions will be applied.

Definition at line 142 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef VisitedClass::ConstPointer itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitedClassConstPointer
 

Definition at line 154 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef VisitedClass::Pointer itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitedClassPointer
 

Definition at line 153 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef TVisitFunctionPointerType itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitFunctionPointerType
 

Type that holds pointers to visit functions

Definition at line 162 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef TVisitorBase itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitorBase
 

TVisitorBase is base class for visitor objects. Any class derived from TVisitorBase could in general be applied to TVisitedClass.

Definition at line 148 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef VisitorBase::Pointer itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitorBasePointer
 

Definition at line 155 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef VisitorsArrayType::value_type itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitorsArray_value_type
 

Definition at line 177 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
typedef std::map<ClassIDType, VisitFunctionPointerType> itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitorsArrayType
 

Type that holds array of pairs of class ID and pointer to visit functions.

FIXME: Maybe std::map is not the most efficient way of storing these pointers.

Definition at line 176 of file itkVisitorDispatcher.h.


Constructor & Destructor Documentation

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
* * param visitor_function Pointer to a visitor function* * note Dummy class pointer must be passed as a first parameter to* automatically deduct the correct template parameter TVisitorClass* Technically we would like to call the this function as* itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitorDispatcher   ...  ) 
 


Member Function Documentation

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
* Adds function visitor_function to the VisitorDispatcher class and* associates this function with the class TVisitorClass:: This means* that when member function the fucntion* visitor_function will be if object pointed to by l* is of class TVisitorClass* * To automatically register visitor on library you* would call this function immediatly after defining an* implementation function class* * Visitor class must define a static member function int itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::CLID  ) 
 

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
template<class TVisitorClass>
* * param visitor_function Pointer to a visitor function* * note Dummy class pointer must be passed as a first parameter to* automatically deduct the correct template parameter TVisitorClass* Technically we would like to call the this function as* * but MS C compiler crashes if we do this This is a work around* You should pass null pointer casted to the TVisitorClass when* calling this function* * sa Visit* static bool itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::RegisterVisitor TVisitorClass *  ,
VisitFunctionPointerType  visitor_function
[inline, static]
 

Definition at line 209 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType>
VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::VisitFunctionPointerType itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::Visit VisitorBasePointer  l  )  [static]
 

Returns the pointer to the correct implementation of the visit function. based on the class of object passed in l.

Before this function can be called, the visitor functions must be added to the VisitorDispatcher class for visitor class that is derived from TVisitorBase.

Parameters:
l Pointer to an object. Class of this object determines which pointer to visit function will be returned.
See also:
RegisterVisitor

Definition at line 309 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
* Adds function visitor_function to the VisitorDispatcher class and* associates this function with the class TVisitorClass:: This means* that when member function itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::Visit ,
 


Member Data Documentation

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
* Adds function visitor_function to the VisitorDispatcher class and* associates this function with the class TVisitorClass:: This means* that when member function the fucntion* visitor_function will be itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::called
 

Definition at line 183 of file itkVisitorDispatcher.h.

template<class TVisitedClass, class TVisitorBase, class TVisitFunctionPointerType = typename VisitorDispatcherTemplateHelper<TVisitedClass, TVisitorBase>::FunctionPointerType>
* Adds function visitor_function to the VisitorDispatcher class and* associates this function with the class TVisitorClass:: This means* that when member function the fucntion* visitor_function will be if object pointed to by l* is of class TVisitorClass* * To automatically register visitor on library itk::fem::VisitorDispatcher< TVisitedClass, TVisitorBase, TVisitFunctionPointerType >::initialization
 

Definition at line 184 of file itkVisitorDispatcher.h.


The documentation for this class was generated from the following file:
Generated at Mon Jul 10 00:19:46 2006 for ITK by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2000