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

gutz::Counted Class Reference

#include <smartptr.h>

Inheritance diagram for gutz::Counted:

basic_kokobuf< _Elem, _Traits, _Alloc > CanvasItemBase CompositeItem Constraint DataObjIF glift::GenDrawAttrib< AT > glift::GenDrawAttrib< UIntV2A > glift::GenDrawAttrib< VAT > glift::StateGLI gutz::BaseManip gutz::CameraEvent gutz::EventKeyMap gutz::EventParamMap gutz::ManipEventBase< MT > gutz::ManipEventBase< Manip > gutz::SmartPtr< T > gutz::SmartPtr< NrroImage > gutz::SmartPtr< TFImage > Key KeyCmdQt< T > MetaProg Nrro Renderable SimModObjIF Tape TFElement TFElementList TFEltView TFEval TFGeneric TFManager VolField VolSlicer Volume Volytope WidgetFactory WidgetState List of all members.

Detailed Description

Counted, Derive your class from it if you want SmartPtr s to it.

    class CMyObject : public Counted { ... };
Remember, never create a counted object on the stack! (unless you never have SmartPtr s to it)

TODO: add stack-heap check using operator new and a a static pointer map.

Definition at line 33 of file smartptr.h.

Public Member Functions

virtual ~Counted ()

Protected Member Functions

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.

 Counted (const Counted &c)
 protected constructor since this class does nothing by itself

Countedoperator= (const Counted &c)
 need to handle this correctly

 Counted ()
 default constructor, protected!


Friends

class SmartPtr
class SmartPtrRef


Constructor & Destructor Documentation

virtual gutz::Counted::~Counted  )  [inline, virtual]
 

Definition at line 36 of file smartptr.h.

gutz::Counted::Counted const Counted c  )  [inline, protected]
 

protected constructor since this class does nothing by itself

Definition at line 61 of file smartptr.h.

Referenced by DataObjIF::DataObjIF().

gutz::Counted::Counted  )  [inline, protected]
 

default constructor, protected!

Definition at line 65 of file smartptr.h.


Member Function Documentation

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

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]
 

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]
 

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().

Counted& gutz::Counted::operator= const Counted c  )  [inline, protected]
 

need to handle this correctly

Definition at line 63 of file smartptr.h.


Friends And Related Function Documentation

friend class SmartPtr [friend]
 

Definition at line 40 of file smartptr.h.

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

friend class SmartPtrRef [friend]
 

Definition at line 41 of file smartptr.h.


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