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

NrroImageSP Class Reference

#include <nrroImage.h>

Inheritance diagram for NrroImageSP:

gutz::SmartPtr< NrroImage > gutz::Counted List of all members.

Detailed Description

the smart pointer, a new class just so we can do automatic casts to the parent class "Nrro"

Definition at line 86 of file nrroImage.h.

Public Types

typedef gutz::SmartPtr< NrroImagebtype
typedef NrroImage type

Public Member Functions

 NrroImageSP ()
 NrroImageSP (NrroImage *im)
 NrroImageSP (const NrroImageSP &im)
virtual ~NrroImageSP ()
NrroImageSPoperator= (const NrroImageSP &im)
 operator NrroSP ()
 auto conversion to NrroSP

 operator Nrro * ()
 auto conversion to Nrro*

NrroImagegetPtr ()
NrroImage *const getPtr () const
NrroImageoperator-> ()
NrroImage *const operator-> () const
NrroImageoperator * ()
NrroImageoperator * () const
 operator T *const () const
SmartPtr< CT > cast () const
 
         mySubClassSP  = myBaseClassSP.down_cast<MySubClassType>();
You don't need this for an "up-cast" since this thing automatically casts itself to a pointer which will then be up-casted by the compiler.

bool operator! () const
bool isNull () const
 just for convienence.


Protected Member Functions

void assign (NrroImage *const ref)
virtual void _incCount ()
 gutz::Counted interface, increment reference count by one.

virtual void _decCount ()
 gutz::Counted interface, decrement reference count by one.

virtual int _getCount () const
 gutz::Counted interface, get the current reference count.


Protected Attributes

NrroImage_ref
 The only data we have is this pointer, so we have the same memory foot print of a regular pointer.


Friends

class SmartPtr
class SmartPtrRef


Member Typedef Documentation

typedef gutz::SmartPtr<NrroImage> NrroImageSP::btype
 

Definition at line 89 of file nrroImage.h.

typedef NrroImage gutz::SmartPtr< NrroImage >::type [inherited]
 

Definition at line 183 of file smartptr.h.


Constructor & Destructor Documentation

NrroImageSP::NrroImageSP  )  [inline]
 

Definition at line 91 of file nrroImage.h.

NrroImageSP::NrroImageSP NrroImage im  )  [inline]
 

Definition at line 92 of file nrroImage.h.

NrroImageSP::NrroImageSP const NrroImageSP im  )  [inline]
 

Definition at line 93 of file nrroImage.h.

virtual NrroImageSP::~NrroImageSP  )  [inline, virtual]
 

Definition at line 94 of file nrroImage.h.


Member Function Documentation

virtual void gutz::Counted::_decCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, decrement reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 54 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual int gutz::Counted::_getCount  )  const [inline, protected, virtual, inherited]
 

gutz::Counted interface, get the current reference count.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr.

Definition at line 58 of file smartptr.h.

virtual void gutz::Counted::_incCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, increment reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 48 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

void gutz::SmartPtr< NrroImage >::assign NrroImage *const  ref  )  [inline, protected, inherited]
 

inc ref if non-zero

save off old reference

assign _ref = ref

delete the old reference

just a dec most of the time...

but if we hold the last reference, nuke it

Definition at line 285 of file smartptr.h.

Referenced by operator=().

SmartPtr<CT> gutz::SmartPtr< NrroImage >::cast  )  const [inline, inherited]
 

         mySubClassSP  = myBaseClassSP.down_cast<MySubClassType>();
You don't need this for an "up-cast" since this thing automatically casts itself to a pointer which will then be up-casted by the compiler.

Definition at line 249 of file smartptr.h.

NrroImage * const gutz::SmartPtr< NrroImage >::getPtr  )  const [inline, inherited]
 

Definition at line 194 of file smartptr.h.

NrroImage * gutz::SmartPtr< NrroImage >::getPtr  )  [inline, inherited]
 

Definition at line 193 of file smartptr.h.

Referenced by operator Nrro *(), and operator NrroSP().

bool gutz::SmartPtr< NrroImage >::isNull  )  const [inline, inherited]
 

just for convienence.

access via,

 mySp.isNull() 

Definition at line 276 of file smartptr.h.

Referenced by NrroImage::fBlendOverRGBA().

NrroImage & gutz::SmartPtr< NrroImage >::operator *  )  const [inline, inherited]
 

Definition at line 218 of file smartptr.h.

NrroImage & gutz::SmartPtr< NrroImage >::operator *  )  [inline, inherited]
 

Definition at line 217 of file smartptr.h.

NrroImageSP::operator Nrro *  )  [inline]
 

auto conversion to Nrro*

Definition at line 105 of file nrroImage.h.

References gutz::SmartPtr< NrroImage >::getPtr().

NrroImageSP::operator NrroSP  )  [inline]
 

auto conversion to NrroSP

Definition at line 103 of file nrroImage.h.

References gutz::SmartPtr< NrroImage >::getPtr(), and NrroSP.

gutz::SmartPtr< NrroImage >::operator NrroImage *const  )  const [inline, inherited]
 

Definition at line 234 of file smartptr.h.

bool gutz::SmartPtr< NrroImage >::operator!  )  const [inline, inherited]
 

Definition at line 261 of file smartptr.h.

NrroImage * const gutz::SmartPtr< NrroImage >::operator->  )  const [inline, inherited]
 

Definition at line 210 of file smartptr.h.

NrroImage * gutz::SmartPtr< NrroImage >::operator->  )  [inline, inherited]
 

Definition at line 209 of file smartptr.h.

NrroImageSP& NrroImageSP::operator= const NrroImageSP im  )  [inline]
 

Definition at line 96 of file nrroImage.h.

References gutz::SmartPtr< NrroImage >::_ref, and gutz::SmartPtr< NrroImage >::assign().


Friends And Related Function Documentation

friend class SmartPtr [friend, inherited]
 

Definition at line 40 of file smartptr.h.

Referenced by Nrro::NrroIter< T >::NrroIter().

friend class SmartPtrRef [friend, inherited]
 

Definition at line 41 of file smartptr.h.


Member Data Documentation

NrroImage * gutz::SmartPtr< NrroImage >::_ref [protected, inherited]
 

The only data we have is this pointer, so we have the same memory foot print of a regular pointer.

Definition at line 283 of file smartptr.h.

Referenced by operator=().


The documentation for this class was generated from the following file:
Send questions, comments, and bug reports to:
jmk