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

itk::fem::FEMP< T > Class Template Reference

Pointer used to store polymorphic elements in STL arrays. More...

#include <itkFEMP.h>

List of all members.

Public Member Functions

 FEMP ()
 FEMP (typename T::Pointer x)
 ~FEMP ()
const FEMPoperator= (const FEMP &rhs)
T::Pointer operator-> () const
 operator T * () const
bool IsNULL () const
 FEMP (const FEMP &x)


Detailed Description

template<class T>
class itk::fem::FEMP< T >

Pointer used to store polymorphic elements in STL arrays.

FEMP holds a pointer to objects of class T and its derived classes. it behaves like a special kind of pointer. Special pointers to object can be used to store polymorphic arrays in STL. The basic idea of the special pointer is: whatever you do to the pointer (object of class FEMP), is also reflected on the object within (pointed to by m_Data member). For example: if you copy the special pointer, an object within is also copied.

Class T should have a member Clone() which produces a copy of an object. This is important in polymorphic classes, where object of the derived class should be created when copying an existing object.

Class T should also include typedefs T::Pointer and T::ConstPointer that define standard pointers to the class. Note that these could be SmartPointer classes.

Definition at line 46 of file itkFEMP.h.


Constructor & Destructor Documentation

template<class T>
itk::fem::FEMP< T >::FEMP  )  [inline]
 

Default constructor makes sure that m_Data is 0, to prevent problems when deleting m_Data object on destruction. Definition at line 55 of file itkFEMP.h.

template<class T>
itk::fem::FEMP< T >::FEMP const FEMP< T > &  x  )  [inline]
 

Copy constructor. Clone() method is called to duplicate the existing object. Definition at line 63 of file itkFEMP.h.

References itk::fem::FEMP< T >::m_Data.

template<class T>
itk::fem::FEMP< T >::FEMP typename T::Pointer  x  )  [inline, explicit]
 

Conversion constructor from T::Pointer to FEMP<T>. The object T* must exist and we take ownership of object T*. If you want to create a copy of object and take ownership of that, use: FEMP(x->Clone()) instead of FEMP(x). Definition at line 76 of file itkFEMP.h.

template<class T>
itk::fem::FEMP< T >::~FEMP  )  [inline]
 

Destructor of a special pointer class also destroys the actual object. Definition at line 83 of file itkFEMP.h.


Member Function Documentation

template<class T>
bool itk::fem::FEMP< T >::IsNULL  )  const [inline]
 

Return true if special pointer actually points to a valid object and false otherwise. Definition at line 113 of file itkFEMP.h.

template<class T>
itk::fem::FEMP< T >::operator T *  )  const [inline]
 

Dereferencing operator provides automatic conversion from special to standard pointer to object Definition at line 104 of file itkFEMP.h.

template<class T>
T::Pointer itk::fem::FEMP< T >::operator->  )  const [inline]
 

Easy access to members of stored object Definition at line 98 of file itkFEMP.h.

template<class T>
const FEMP< T > & itk::fem::FEMP< T >::operator= const FEMP< T > &  rhs  ) 
 

Asignment operator Definition at line 131 of file itkFEMP.h.


The documentation for this class was generated from the following file:
Generated at Sun Apr 1 03:23:41 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000