Orfeo Toolbox  4.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
itk::SmartPointerForwardReference< T > Class Template Reference

Implements transparent reference counting in situations where forward references / cyclic include dependencies are a problem. More...

#include <itkSmartPointerForwardReference.h>

Public Member Functions

 SmartPointerForwardReference ()
 
 SmartPointerForwardReference (const SmartPointerForwardReference< T > &p)
 
 SmartPointerForwardReference (const WeakPointer< T > &p)
 
 SmartPointerForwardReference (T *p)
 
 ~SmartPointerForwardReference ()
 
T * GetPointer () const
 
 operator T * () const
 
T * operator-> () const
 
bool operator< (const SmartPointerForwardReference &r)
 
bool operator<= (const SmartPointerForwardReference &r)
 
SmartPointerForwardReferenceoperator= (const SmartPointerForwardReference &r)
 
SmartPointerForwardReferenceoperator= (const WeakPointer< T > &r)
 
SmartPointerForwardReferenceoperator= (T *r)
 
bool operator> (const SmartPointerForwardReference &r)
 
bool operator>= (const SmartPointerForwardReference &r)
 
T * Print (std::ostream &os) const
 

Private Member Functions

void Register ()
 
void UnRegister ()
 

Private Attributes

T * m_Pointer
 

Detailed Description

template<typename T>
class itk::SmartPointerForwardReference< T >

Implements transparent reference counting in situations where forward references / cyclic include dependencies are a problem.

SmartPointerForwardReference implements reference counting by overloading operator -> (and *) among others. This allows natural interface to the class referred to by the pointer without having to invoke special Register()/UnRegister() methods directly.

This class is nearly identical to itkSmartPointer except that is used in situations where forward references or cyclic include dependencies become a problem. This class requires that the .h file is included in the .h file of the class using it, and the .hxx file is included in the .cxx/.hxx file of the class using it. (Make sure that SmartPointerForwardReference.hxx is included last in the .cxx/.hxx list of includes.)

Definition at line 48 of file itkSmartPointerForwardReference.h.

Constructor & Destructor Documentation

template<typename T>
itk::SmartPointerForwardReference< T >::SmartPointerForwardReference ( )
inline

Constructor

Definition at line 52 of file itkSmartPointerForwardReference.h.

References itk::SmartPointerForwardReference< T >::m_Pointer.

Const constructor

Definition at line 28 of file itkSmartPointerForwardReference.hxx.

References itk::SmartPointerForwardReference< T >::m_Pointer.

template<typename T >
itk::SmartPointerForwardReference< T >::SmartPointerForwardReference ( const WeakPointer< T > &  p)

Construct from a WeakPointer

Definition at line 37 of file itkSmartPointerForwardReference.hxx.

References itk::WeakPointer< TObjectType >::GetPointer().

template<typename T >
itk::SmartPointerForwardReference< T >::SmartPointerForwardReference ( T *  p)

Constructor to pointer p

Definition at line 46 of file itkSmartPointerForwardReference.hxx.

Destructor

Definition at line 55 of file itkSmartPointerForwardReference.hxx.

Member Function Documentation

template<typename T >
T * itk::SmartPointerForwardReference< T >::GetPointer ( ) const

Access function to pointer.

Definition at line 81 of file itkSmartPointerForwardReference.hxx.

Referenced by itk::SmartPointerForwardReference< T >::operator=().

template<typename T >
itk::SmartPointerForwardReference< T >::operator T * ( ) const

Return pointer to object.

Definition at line 72 of file itkSmartPointerForwardReference.hxx.

template<typename T >
T * itk::SmartPointerForwardReference< T >::operator-> ( ) const

Overload operator ->

Definition at line 64 of file itkSmartPointerForwardReference.hxx.

template<typename T >
bool itk::SmartPointerForwardReference< T >::operator< ( const SmartPointerForwardReference< T > &  r)

Comparison of pointers. Less than comparison.

Definition at line 90 of file itkSmartPointerForwardReference.hxx.

References itk::SmartPointerForwardReference< T >::m_Pointer.

template<typename T >
bool itk::SmartPointerForwardReference< T >::operator<= ( const SmartPointerForwardReference< T > &  r)

Comparison of pointers. Less than or equal to comparison.

Definition at line 108 of file itkSmartPointerForwardReference.hxx.

References itk::SmartPointerForwardReference< T >::m_Pointer.

template<typename T >
SmartPointerForwardReference< T > & itk::SmartPointerForwardReference< T >::operator= ( const SmartPointerForwardReference< T > &  r)

Overload operator assignment.

Definition at line 126 of file itkSmartPointerForwardReference.hxx.

References itk::SmartPointerForwardReference< T >::GetPointer().

template<typename T >
SmartPointerForwardReference< T > & itk::SmartPointerForwardReference< T >::operator= ( const WeakPointer< T > &  r)

Overload operator assignment.

Definition at line 135 of file itkSmartPointerForwardReference.hxx.

References itk::WeakPointer< TObjectType >::GetPointer().

template<typename T >
SmartPointerForwardReference< T > & itk::SmartPointerForwardReference< T >::operator= ( T *  r)

Overload operator assignment.

Definition at line 144 of file itkSmartPointerForwardReference.hxx.

template<typename T >
bool itk::SmartPointerForwardReference< T >::operator> ( const SmartPointerForwardReference< T > &  r)

Comparison of pointers. Greater than comparison.

Definition at line 99 of file itkSmartPointerForwardReference.hxx.

References itk::SmartPointerForwardReference< T >::m_Pointer.

template<typename T >
bool itk::SmartPointerForwardReference< T >::operator>= ( const SmartPointerForwardReference< T > &  r)

Comparison of pointers. Greater than or equal to comparison.

Definition at line 117 of file itkSmartPointerForwardReference.hxx.

References itk::SmartPointerForwardReference< T >::m_Pointer.

template<typename T >
T * itk::SmartPointerForwardReference< T >::Print ( std::ostream &  os) const

Function to print object pointed to

Definition at line 163 of file itkSmartPointerForwardReference.hxx.

template<typename T >
void itk::SmartPointerForwardReference< T >::Register ( )
private

Definition at line 174 of file itkSmartPointerForwardReference.hxx.

template<typename T >
void itk::SmartPointerForwardReference< T >::UnRegister ( )
private

Definition at line 186 of file itkSmartPointerForwardReference.hxx.

Member Data Documentation

template<typename T>
T* itk::SmartPointerForwardReference< T >::m_Pointer
private

The documentation for this class was generated from the following files:

Generated at Sat Aug 23 2014 17:51:20 for Orfeo Toolbox with doxygen 1.8.3.1