#ifndef WORLD_H #define WORLD_H class World; #include #ifndef WX_PRECOMP #include #endif #include #include #include #include "map.h" #include class MapeditFrame; class World { public: World(); World(std::string filename); std::shared_ptr newMap(); std::shared_ptr getMap(int id) const; void setDirty(bool dirty); bool getDirty() const; std::string getFilename() const; void setParent(MapeditFrame* parent); void save(std::string filename, wxTreeCtrl* mapTree); Map* getLastMap() const; std::list> getRootMaps() const; const std::map> getMaps() const; private: MapeditFrame* parent; std::map> maps; int nextMapID = 0; bool dirty = false; std::string filename; int lastmap = 0; std::list rootChildren; }; #endif