AI_Referenced Class Reference
[Utilities]

#include <AI_Referenced.h>

Inheritance diagram for AI_Referenced:

AI_Agent AI_Obstacle AI_Actor

List of all members.


Detailed Description

Provides simple reference counting as well as tracking references to self. Never destroy AI_Referenced objects through delete.

Public Member Functions

 AI_Referenced ()
virtual bool Release ()
 release object (USE INSTEAD OF DESTRUCTOR!)
int AddRef ()
 increment ref count of object
int GetRefCount () const
 get refcount of object
void AddObjectRef (AI_Ref< AI_Referenced > *)
 add external object reference
void RemObjectRef (AI_Ref< AI_Referenced > *)
 remove external object reference
AI_ListGetRefs ()
 get list of refs pointing to me

Protected Member Functions

virtual ~AI_Referenced ()
 destructor (DONT CALL DIRECTLY, USE Release() INSTEAD)
void InvalidateAllRefs ()
 invalidate all references

Protected Attributes

AI_List refList
int refCount

Constructor & Destructor Documentation

AI_Referenced::AI_Referenced (  ) 

AI_Referenced::~AI_Referenced (  )  [protected, virtual]

destructor (DONT CALL DIRECTLY, USE Release() INSTEAD)


Member Function Documentation

bool AI_Referenced::Release (  )  [virtual]

release object (USE INSTEAD OF DESTRUCTOR!)

int AI_Referenced::AddRef (  )  [inline]

increment ref count of object

int AI_Referenced::GetRefCount (  )  const [inline]

get refcount of object

void AI_Referenced::AddObjectRef ( AI_Ref< AI_Referenced > *  r  )  [inline]

add external object reference

Hang the reference to an object on refList.

void AI_Referenced::RemObjectRef ( AI_Ref< AI_Referenced > *  r  )  [inline]

remove external object reference

Remove the reference to r from the refList.

AI_List * AI_Referenced::GetRefs (  )  [inline]

get list of refs pointing to me

void AI_Referenced::InvalidateAllRefs (  )  [protected]

invalidate all references


Member Data Documentation

int AI_Referenced::refCount [protected]


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