diff options
author | neoraider <devnull@localhost> | 2008-04-13 03:59:01 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-04-13 03:59:01 +0200 |
commit | 184c6305a677d968e60eb6cba9b29dd840cdce3c (patch) | |
tree | 9e0eaab4cf21c1e9717e29a79a9010678eccfc0b /src/Data/Level.h | |
parent | 7fa8e4b4faf6dca308607977d2c2aaa5428ca60d (diff) | |
download | zoomedit-184c6305a677d968e60eb6cba9b29dd840cdce3c.tar zoomedit-184c6305a677d968e60eb6cba9b29dd840cdce3c.zip |
zoomedit:
* New data interfaces, yay! Levels should now be completely editable
* Fixed some -Wextra warnings
Diffstat (limited to 'src/Data/Level.h')
-rw-r--r-- | src/Data/Level.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/Data/Level.h b/src/Data/Level.h index c72b503..34b5b1a 100644 --- a/src/Data/Level.h +++ b/src/Data/Level.h @@ -21,54 +21,56 @@ #define ZOOMEDIT_DATA_LEVEL_H_ #include "Info.h" -#include "Room.h" -#include "Gate.h" -#include "Texture.h" #include <list> -#include <map> namespace ZoomEdit { namespace Data { +class Room; +class Gate; +class Texture; + class Level { private: Info info; - std::map<Glib::ustring,Room> rooms; + std::list<Room*> rooms; xmlpp::Element *roomsNode; - std::map<Glib::ustring,Gate> gates; + std::list<Gate*> gates; xmlpp::Element *gatesNode; - std::map<Glib::ustring,Texture> textures; + std::list<Texture*> textures; xmlpp::Element *texturesNode; + // Prevent shallow copy + Level(const Level &o); + Level& operator=(const Level &o); + public: Level(xmlpp::Element *levelNode); + virtual ~Level(); - const std::map<Glib::ustring,Room>& getRooms() const {return rooms;} + const std::list<Room*>& getRooms() const {return rooms;} - Room* getRoom(const Glib::ustring &id); - const Room* getRoom(const Glib::ustring &id) const; + Room* getRoom(const Glib::ustring &id) const; Room* addRoom(const Glib::ustring &id); - void removeRoom(const Glib::ustring &id); + void removeRoom(Room *room); - const std::map<Glib::ustring,Gate>& getGates() const {return gates;} + const std::list<Gate*>& getGates() const {return gates;} - Gate* getGate(const Glib::ustring &id); - const Gate* getGate(const Glib::ustring &id) const; + Gate* getGate(const Glib::ustring &id) const; Gate* addGate(const Glib::ustring &id); - void removeGate(const Glib::ustring &id); + void removeGate(Gate *gate); - const std::map<Glib::ustring,Texture>& getTextures() const {return textures;} + const std::list<Texture*>& getTextures() const {return textures;} - Texture* getTexture(const Glib::ustring &id); - const Texture* getTexture(const Glib::ustring &id) const; + Texture* getTexture(const Glib::ustring &id) const; Texture* addTexture(const Glib::ustring &id); - void removeTexture(const Glib::ustring &id); + void removeTexture(Texture *tex); }; } |