CObjectManager Class Reference

Manages objects. More...

#include <class.objectmanager.hh>

List of all members.

Public Member Functions

 ~CObjectManager ()
void Cleanup ()
bool Frame (Uint8 *keystate, Uint32 iDeltaTime)
 Calls the 'Frame' function for each object.
bool TryInteract (CObject *pObj)
 Test an object for interactions with other objects.
void DrawAll (int x, int y)
 Draw all objects.
void DumpAll ()
void Add (CObject *pObj)
 Add an object to the object manager.
void Remove (CObject *pObj)
 Remove an object from the object manager.
void RemoveAndFree (CObject *pObj)
 Remove an object from the object manager and free it's memory.

Public Attributes

std::vector< CObject * > mpObjects


Detailed Description

Manages objects.

Constructor & Destructor Documentation

CObjectManager::~CObjectManager (  ) 


Member Function Documentation

void CObjectManager::Cleanup (  ) 

bool CObjectManager::Frame ( Uint8 *  keystate,
Uint32  iDeltaTime 
)

Calls the 'Frame' function for each object.

Remarks:
See the object CObject::Frame() function for more information. Returns 1 to indicate success. Returns 0 to indicate the game ends.

bool CObjectManager::TryInteract ( CObject pObj  ) 

Test an object for interactions with other objects.

Remarks:
This function will return a value of 1 if the object that is being tested for interactions removed itself. Otherwise, it will return a value of 0.
This is done to prevent errors such as accessing an object while it was already removed from the object list.

void CObjectManager::DrawAll ( int  x,
int  y 
)

Draw all objects.

void CObjectManager::DumpAll (  ) 

void CObjectManager::Add ( CObject pObj  ) 

Add an object to the object manager.

void CObjectManager::Remove ( CObject pObj  ) 

Remove an object from the object manager.

void CObjectManager::RemoveAndFree ( CObject pObj  ) 

Remove an object from the object manager and free it's memory.


Member Data Documentation


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

Generated on Fri Feb 22 09:36:53 2008 for Mega Maryo by  doxygen 1.5.5