#include <PP.h>
Inheritance diagram for PLearn::PP< T >:
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 |
|
empty constructor
|
|
copie constructor with ordinary ptr
|
|
copie constructor with same type PP
|
|
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). |
|
|
|
|
|
Definition at line 149 of file PP.h. Referenced by PLearn::KNNVMatrix::build_(), PLearn::ObjectGenerator::generateAllObjects(), and PLearn::operator>>(). |
|
access to the pointed object
|
|
conversion to ordinary ptr
|
|
access to PPointable methods
|
|
affectation operator to same type PP
|
|
affectation operator to ordinary ptr
|
|
|