Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::PP< T > Class Template Reference

#include <PP.h>

Inheritance diagram for PLearn::PP< T >:

Inheritance graph
[legend]
Collaboration diagram for PLearn::PP< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PP ()
 empty constructor

 PP (const T *the_ptr)
 copie constructor with ordinary ptr

 PP (const PP< T > &other)
 copie constructor with same type PP

template<class U>  PP (const PP< U > &other)
 copie constructor with other type PP

bool isNull () const
bool isNotNull () const
 operator T * () const
 conversion to ordinary ptr

T * operator-> () const
 access to PPointable methods

T & operator * () const
 access to the pointed object

PP< T > & operator= (const T *otherptr)
 affectation operator to ordinary ptr

PP< T > & operator= (const PP< T > &other)
 affectation operator to same type PP

 ~PP ()

Protected Attributes

T * ptr

template<class T>
class PLearn::PP< T >


Constructor & Destructor Documentation

template<class T>
PLearn::PP< T >::PP  )  [inline]
 

empty constructor

template<class T>
PLearn::PP< T >::PP const T *  the_ptr  )  [inline]
 

copie constructor with ordinary ptr

template<class T>
PLearn::PP< T >::PP const PP< T > &  other  )  [inline]
 

copie constructor with same type PP

template<class T>
template<class U>
PLearn::PP< T >::PP const PP< U > &  other  )  [inline, explicit]
 

copie constructor with other type PP

this line is to make sure at compile time that U and T are compatible (one is a subclass of the other)

this line is to make sure at execution time that the true class of other.ptr is compatible with T, i.e. other.ptr is a T or a subclass of (otherwise return ptr = 0).

Note that dynamic_cast<T*>(const_cast<T*>(static_cast<const T*>((U*)other))) does not work properly (the dynamic_cast returns non-null when it should return 0, when the dynamic type is not correct).

template<class T>
PLearn::PP< T >::~PP  )  [inline]
 

Definition at line 185 of file PP.h.


Member Function Documentation

template<class T>
bool PLearn::PP< T >::isNotNull  )  const [inline]
 

Definition at line 152 of file PP.h.

template<class T>
bool PLearn::PP< T >::isNull  )  const [inline]
 

Definition at line 149 of file PP.h.

Referenced by PLearn::KNNVMatrix::build_(), PLearn::ObjectGenerator::generateAllObjects(), and PLearn::operator>>().

template<class T>
T& PLearn::PP< T >::operator *  )  const [inline]
 

access to the pointed object

Definition at line 164 of file PP.h.

template<class T>
PLearn::PP< T >::operator T *  )  const [inline]
 

conversion to ordinary ptr

Definition at line 156 of file PP.h.

template<class T>
T* PLearn::PP< T >::operator->  )  const [inline]
 

access to PPointable methods

Definition at line 160 of file PP.h.

template<class T>
PP<T>& PLearn::PP< T >::operator= const PP< T > &  other  )  [inline]
 

affectation operator to same type PP

Definition at line 182 of file PP.h.

template<class T>
PP<T>& PLearn::PP< T >::operator= const T *  otherptr  )  [inline]
 

affectation operator to ordinary ptr

Definition at line 168 of file PP.h.


Member Data Documentation

template<class T>
T* PLearn::PP< T >::ptr [protected]
 

Definition at line 93 of file PP.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 17 16:22:40 2004 for PLearn by doxygen 1.3.7