#include <refcounter.hpp>
Inherited by GameObject.
Public Member Functions | |
RefCounter () | |
void | ref () |
increases reference count | |
void | unref () |
decreases reference count. | |
Protected Member Functions | |
virtual | ~RefCounter () |
Private Attributes | |
int | refcount |
Definition at line 25 of file refcounter.hpp.
RefCounter::RefCounter | ( | ) | [inline] |
virtual RefCounter::~RefCounter | ( | ) | [inline, protected, virtual] |
Definition at line 49 of file refcounter.hpp.
References refcount.
00050 { 00051 assert(refcount == 0); 00052 }
void RefCounter::ref | ( | ) | [inline] |
increases reference count
Definition at line 33 of file refcounter.hpp.
References refcount.
Referenced by worldmap::WorldMap::add_object(), and Sector::add_object().
00034 { 00035 refcount++; 00036 }
void RefCounter::unref | ( | ) | [inline] |
decreases reference count.
Destroys the object if the reference count reaches 0
Definition at line 40 of file refcounter.hpp.
References refcount.
int RefCounter::refcount [private] |