#include <objectpools.h>
Public Member Functions | |
void | setDefaultObjParam () |
sets the static default_parameters variable of all objects | |
const ParameterMap & | getDefaultObjParambyName (const string &obj) |
Returns the default_parameters of the corresponding obj or an empty map. | |
bool | empty () |
Returns true if no objects were loaded so far... | |
Object * | addObjectbyName (const string &obj, Sint16 x=0, Sint16 y=0, const ParameterMap ¶m=ParameterMap(), bool outside=false) |
Object * | addObject (Object *object, bool outside=false) |
Object * | getObject (const string &oname) |
string | getNextObjectName (const string &basename) |
Helper function to return the next available object name corresponding to the given base name. | |
Player * | switchPlayer () |
Selects a new current player (circular from left to right) if possible. | |
object_iterator | removeObject (object_iterator it) |
object_iterator | removeObject (Object *object) |
Object * | moveObject (Object *object) |
Public Attributes | |
std::set< Object *, Compare > | objectspool |
Object pool. | |
std::set< Character *, Compare > | characterspool |
Character pool. | |
std::set< Player *, Compare > | playerspool |
Player pool. | |
std::set< Monster *, Compare > | monsterspool |
Monster pool. |
Contains a pool for each important derived object class, manages adding/deleting objects and switching players. Each derived type is contained in all it's super type pools.
Cleanup the whole mess.
|
|
|
Add an Object to all corresponding pools
|
|
Gets an object by it's name
|
|
Remove an Object (using an object_iterator) from all pools it belongs to
|
|
Remove an Object (using a pointer to it)
|
|
Detaches an Object from the objectspool
|
|
Object pool. Contains all objects managed by the ObjectsPool |
|
Character pool. Contains all characters managed by the ObjectsPool |
|
Player pool. Contains all players managed by the ObjectsPool |
|
Monster pool. Contains all monsters managed by the ObjectsPool |