ObjectManager Class Reference

#include <objectmanager.h>

List of all members.

Public Member Functions

 ~ObjectManager ()
void AddObject (char *name, Object *ptr)
ObjectGetObject (char *name)
void CheckCollisions ()
void Draw (SDL_Surface *screen)
void Update ()
void Clear ()

Private Member Functions

bool IsColliding (Object *obj1, Object *obj2)
void Bounce (Object *obj1, Object *obj2)

Private Attributes

std::map< char *, Object * > m_list
std::map< char *, Object
* >::iterator 
m_iter


Detailed Description

This class should manage all the objects that are used


Constructor & Destructor Documentation

ObjectManager::~ObjectManager (  ) 


Member Function Documentation

void ObjectManager::AddObject ( char *  name,
Object ptr 
)

Adds an Object to the manager

Parameters:
name the name of the object(only once)
ptr the pointer to the object

Object * ObjectManager::GetObject ( char *  name  ) 

returns a pointer to an Object of the manager

Parameters:
name the name of the object

void ObjectManager::CheckCollisions (  ) 

Checks if there are any collisions between objects //TODO also reacts should be replaced by an function of objects

void ObjectManager::Draw ( SDL_Surface *  screen  ) 

Calls to the draw function of the objects

Parameters:
screen the surface to which the objects will be drawn

void ObjectManager::Update (  ) 

Updates all objects

void ObjectManager::Clear (  ) 

Clears all objects

bool ObjectManager::IsColliding ( Object obj1,
Object obj2 
) [private]

void ObjectManager::Bounce ( Object obj1,
Object obj2 
) [private]


Member Data Documentation

std::map<char*, Object*> ObjectManager::m_list [private]

std::map<char*, Object*>::iterator ObjectManager::m_iter [private]


The documentation for this class was generated from the following files:
Generated on Wed Feb 21 21:50:47 2007 for Minup by  doxygen 1.5.1-p1