The VgReferenced class owns the number of references of an object. More...
Public Member Functions | |
VgReferenced () | |
Constructor. | |
VgReferenced (const VgReferenced &pThis) | |
Copy constructor. | |
virtual | ~VgReferenced () |
Destructor. | |
VgReferenced & | operator= (const VgReferenced &pThis) |
Assignment operator. | |
void | ref () const |
This method is used to add a reference to this object. | |
void | unref () const |
This method is used to remove a reference to this object. | |
int | getNbReferences () const |
Retrieves the number of references to this object. | |
Protected Attributes | |
int | mNbReferences |
The number of references to this object. |
The VgReferenced class owns the number of references of an object.
It is in charge of deleting the object when there is not more references. To learn more about its usage look at the VgRefPtr documentation.
VgEngine::VgReferenced::VgReferenced | ( | ) |
Constructor.
VgEngine::VgReferenced::VgReferenced | ( | const VgReferenced & | pThis ) |
Copy constructor.
virtual VgEngine::VgReferenced::~VgReferenced | ( | ) | [virtual] |
Destructor.
int VgEngine::VgReferenced::getNbReferences | ( | ) | const |
Retrieves the number of references to this object.
VgReferenced& VgEngine::VgReferenced::operator= | ( | const VgReferenced & | pThis ) |
Assignment operator.
void VgEngine::VgReferenced::ref | ( | ) | const |
This method is used to add a reference to this object.
Only VgRefPtr should call this method unless the caller exactly know what he is doing.
void VgEngine::VgReferenced::unref | ( | ) | const |
This method is used to remove a reference to this object.
When the object has no more references it is deleted. Only VgRefPtr should call this method unless the caller exactly know what he is doing.
int VgEngine::VgReferenced::mNbReferences [mutable, protected] |
The number of references to this object.