MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Base class providing intrusive reference counting model. More...
#include <mdsObject.h>
Public Types | |
enum | { CLASS_OBJECT } |
Templates that require members of the CObject class can use this enum to check the existence. More... | |
enum | { HEAP_OBJECT = 0x70616568 } |
Signature used to recognize objects on the heap. More... | |
Public Member Functions | |
int | getReferencesCount () const |
Returns the number of references. | |
bool | isOnHeap () const |
Returns true if the object is allocated on the heap. | |
virtual | ~CObject () |
Destructor. | |
Static Public Member Functions | |
static void * | operator new (std::size_t Size) |
Allocates a new object on the heap. | |
Protected Member Functions | |
void | addReference () const |
Increase the reference counter. | |
CObject () | |
Protected default constructor. | |
CObject (const CObject &) | |
Protected copy constructor. | |
bool | delReference () const |
Decrease the reference counter. | |
CObject & | operator= (const CObject &) |
Protected assignment operator. | |
Protected Attributes | |
int | m_iHeapObject |
Flag initialized if the object is on the heap. | |
int | m_iReferences |
The number of references to the object. |
Base class providing intrusive reference counting model.
anonymous enum |
Templates that require members of the CObject class can use this enum to check the existence.
virtual mds::base::CObject::~CObject | ( | ) | [virtual] |
Destructor.
mds::base::CObject::CObject | ( | ) | [protected] |
Protected default constructor.
mds::base::CObject::CObject | ( | const CObject & | ) | [protected] |
Protected copy constructor.
void mds::base::CObject::addReference | ( | ) | const [protected] |
Increase the reference counter.
bool mds::base::CObject::delReference | ( | ) | const [protected] |
Decrease the reference counter.
int mds::base::CObject::getReferencesCount | ( | ) | const |
Returns the number of references.
bool mds::base::CObject::isOnHeap | ( | ) | const |
Returns true if the object is allocated on the heap.
static void* mds::base::CObject::operator new | ( | std::size_t | Size | ) | [static] |
Allocates a new object on the heap.
Protected assignment operator.
int mds::base::CObject::m_iHeapObject [mutable, protected] |
Flag initialized if the object is on the heap.
int mds::base::CObject::m_iReferences [mutable, protected] |
The number of references to the object.