ITK
4.9.0
Insight Segmentation and Registration Toolkit
|
#include <itkFEMP.h>
Pointer used to store polymorphic elements in STL arrays.
FEMP holds a pointer to objects of typename 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.
Public Member Functions | |
FEMP () | |
FEMP (typename T::Pointer x) | |
bool | IsNULL () const |
operator T * () const | |
T::Pointer | operator-> () const |
~FEMP () | |
FEMP (const FEMP &x) | |
const FEMP< T > & | operator= (const FEMP< T > &rhs) |
Private Attributes | |
T::Pointer | m_Data |
|
inline |
|
inline |
Copy constructor. Clone() method is called to duplicate the existing object.
Definition at line 66 of file itkFEMP.h.
References itk::fem::FEMP< T >::m_Data.
|
inlineexplicit |
|
inline |
Destructor of a special pointer class also destroys the actual object.
Definition at line 97 of file itkFEMP.h.
References itk::fem::FEMP< T >::m_Data.
|
inline |
Return true if special pointer actually points to a valid object and false otherwise.
Definition at line 128 of file itkFEMP.h.
References itk::fem::FEMP< T >::m_Data.
|
inline |
Dereferencing operator provides automatic conversion from special to standard pointer to object
Definition at line 119 of file itkFEMP.h.
References itk::fem::FEMP< T >::m_Data.
|
inline |
Easy access to members of stored object
Definition at line 110 of file itkFEMP.h.
References itk::fem::FEMP< T >::m_Data.
const FEMP< T > & itk::fem::FEMP< T >::operator= | ( | const FEMP< T > & | rhs | ) |
Asignment operator
Self assignments don't make sense.
First destroy the existing object on the left hand side
Then clone the one on the right hand side of the expression (if not ITK_NULLPTR).
Definition at line 142 of file itkFEMP.h.
References itk::fem::FEMP< T >::m_Data.
|
private |
Pointer to actual object. Note that this could be a SmartPointer.
Definition at line 138 of file itkFEMP.h.
Referenced by itk::fem::FEMP< T >::FEMP(), itk::fem::FEMP< T >::IsNULL(), itk::fem::FEMP< T >::operator T *(), itk::fem::FEMP< T >::operator->(), itk::fem::FEMP< T >::operator=(), and itk::fem::FEMP< T >::~FEMP().