00001
#ifndef DEF_OBJECTPOOLS_H
00002
#define DEF_OBJECTPOOLS_H 1
00003
00004
struct Compare {
00005
bool operator()(
const Object*,
const Object*);
00006 };
00007
00017 class ObjectsPool {
00018
public:
00019
ObjectsPool();
00020 ~
ObjectsPool();
00022
void setDefaultObjParam();
00024
const ParameterMap&
getDefaultObjParambyName(
const string& obj);
00026
bool empty();
00039
Object*
addObjectbyName(
const string& obj, Sint16 x=0, Sint16 y=0,
const ParameterMap& param=ParameterMap(),
bool outside=
false);
00042
Object*
addObject(
Object* object,
bool outside=
false);
00046
Object*
getObject(
const string& oname);
00048 string
getNextObjectName(
const string& basename);
00050
00051
00052 object_iterator
removeObject(object_iterator it);
00055 object_iterator
removeObject(
Object* object);
00058
Object*
moveObject(
Object* object);
00060
00061
Player*
switchPlayer();
00062
00064
00065
00066
00067 std::set<Object *,Compare>
objectspool;
00071 std::set<Character *,Compare>
characterspool;
00075 std::set<Player *,Compare>
playerspool;
00079 std::set<Monster *,Compare>
monsterspool;
00081
private:
00082
00083 player_iterator currentplayer;
00084 Mix_Chunk* au_switch;
00085
const ParameterMap empty_parameter;
00086 };
00087
00088
#endif