Base class for reference counted objects. Provides numerical object ids. More...
#include <Rep.h>
Public Member Functions | |
CountedRep () | |
CountedRep (const CountedRep &rhs) | |
CountedRep & | operator= (const CountedRep &rhs) |
virtual | ~CountedRep () |
unsigned | objectId () const |
virtual std::ostream & | dumpOn (std::ostream &str) const |
Static Public Member Functions | |
static unsigned | objectCount () |
Private Attributes | |
const unsigned | _objectId |
Static Private Attributes | |
static unsigned | _objectCount = 0 |
static unsigned | _objectIds = 0 |
Base class for reference counted objects. Provides numerical object ids.
Derived from Rep, CountedRep provides a numerical object id and
See class Rep.
CountedRep::CountedRep | ( | ) | [inline] |
Constructor.
References _objectCount.
CountedRep::CountedRep | ( | const CountedRep & | rhs | ) | [inline] |
CopyConstructor.
References _objectCount.
virtual CountedRep::~CountedRep | ( | ) | [inline, virtual] |
Destructor.
References _objectCount.
ostream & CountedRep::dumpOn | ( | std::ostream & | str | ) | const [virtual] |
static unsigned CountedRep::objectCount | ( | ) | [inline, static] |
The total ammount of CountedRep instances in memeory.
References _objectCount.
unsigned CountedRep::objectId | ( | ) | const [inline] |
CountedRep& CountedRep::operator= | ( | const CountedRep & | rhs | ) | [inline] |
Assignment. objectId remains untouched.
unsigned CountedRep::_objectCount = 0 [static, private] |
Counts total ammount of CountedRep instances in memeory.
Referenced by CountedRep(), objectCount(), and ~CountedRep().
const unsigned CountedRep::_objectId [private] |
This objects numerical id.
Referenced by objectId().
unsigned CountedRep::_objectIds = 0 [static, private] |
Provides numerical ids.