RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
#include <cobject.h>
Public Member Functions | |
CObject () | |
CObject (const CObject &object) | |
CObject & | operator= (const CObject &object) |
CObject * | retain () |
unsigned int | release () const |
CObject * | autorelease () |
unsigned int | retainCount () const |
bool | isValidCObject () const |
virtual | ~CObject () |
Static Public Member Functions | |
static void | safeRetain (void *pointer) |
template<class T > | |
static void | safeRelease (T *pointer) |
template<class T > | |
static void | safeReleaseArray (T *array) |
static void | safeRelease (const char *pointer) |
Protected Member Functions | |
virtual void | copyValuesFromObject (const CObject &object) |
CObject is the base class for every custom type in RioEngine
You should never call 'delete' on any CObject because another object might be referencing it. By convention you should always release a CObject by calling its release() method or using the 'SAFE_RELEASE(x)' macro.
CObject::CObject | ( | ) |
Default constructor. Don't forget to call it when subclassing!.
Definition at line 37 of file cobject.cpp.
|
explicit |
Copy constructor. Don't forget to call it when subclassing!.
Definition at line 44 of file cobject.cpp.
|
virtual |
Destructor declared as virtual in order to force it to be called when deallocating any subclass of CObject.
Definition at line 134 of file cobject.cpp.
CObject * CObject::autorelease | ( | ) |
By calling this method the object will be added to the current CAutoreleasePool and will be released in a later time.
Definition at line 87 of file cobject.cpp.
|
protectedvirtual |
Self-explanatory. Don't forget to override it! (if needed)
Definition at line 60 of file cobject.cpp.
bool CObject::isValidCObject | ( | ) | const |
Returns true only if this object inherits from CObject.
Definition at line 100 of file cobject.cpp.
Definition at line 51 of file cobject.cpp.
unsigned int CObject::release | ( | ) | const |
Decrements the object's reference count by 1
Definition at line 74 of file cobject.cpp.
CObject * CObject::retain | ( | ) |
Increments the object's reference count by 1
Definition at line 66 of file cobject.cpp.
unsigned int CObject::retainCount | ( | ) | const |
Returns the number that indicates how many times the object has been referenced by other objects.
Definition at line 94 of file cobject.cpp.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |