BoB robotics
The Brains on Board robotics library
Object Class Referenceabstract

Reference counted object base class. More...

#include <object.h>

Public Member Functions

 Object ()
 Default constructor.
 
 Object (const Object &)
 Copy constructor.
 
int getRefCount () const
 Return the current reference count.
 
void incRef () const
 Increase the object's reference count by one.
 
void decRef (bool dealloc=true) const
 Decrease the reference count of the object and possibly deallocate it. More...
 
virtual std::string toString () const =0
 

Protected Member Functions

virtual ~Object ()
 Virtual protected deconstructor. (Will only be called by ref)
 

Detailed Description

Reference counted object base class.

Member Function Documentation

◆ decRef()

void Object::decRef ( bool  dealloc = true) const
inline

Decrease the reference count of the object and possibly deallocate it.

The object will automatically be deallocated once the reference count reaches zero.


The documentation for this class was generated from the following file: