CIvfPointerRefBase< T, R > Class Template Reference

#include <ivfdef/IvfPointer.h>

List of all members.

Public Member Functions

 CIvfPointerRefBase (T *object=0)
 CIvfPointerRefBase (const CIvfPointerRefBase &ivfObject)
virtual ~CIvfPointerRefBase ()
 operator T * () const
T & operator * () const
T * operator-> () const
CIvfPointerRefBaseoperator= (const CIvfPointerRefBase &IvfPointerRefBase)
CIvfPointerRefBaseoperator= (T *ivfObject)
bool operator== (T *ivfObject) const
bool operator!= (T *ivfObject) const
bool operator== (const CIvfPointerRefBase &IvfPointerRefBase) const
bool operator!= (const CIvfPointerRefBase &IvfPointerRefBase) const


Detailed Description

template<class T, class R>
class CIvfPointerRefBase< T, R >

Smart pointer class

CIvfPointer handles the Ivf++ reference counting scheme of the CIvfBase class. To declare a Ivf++ smart pointer use the IvfSmartPointer() macro. See the following example:

 int main()
 {
    CIvfPointer<CIvfMaterial> material = new CIvfMaterial(); // addReference() called.
    CIvfPointer<CIvfMaterial> material2;
    material2 = material; // addReference() called 
    .
    .
    
    return 0;
 } 
 // material calls deleteReference()
 // material2 calls deleteRefernce() and deletes CIvfMaterial object

Definition at line 53 of file IvfPointer.h.


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 15:36:55 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO