#ifndef MMFLOORPOIS_H #define MMFLOORPOIS_H #include "MapLayer.h" #include "MMFloorPOI.h" #include /** * layer that contains all of one floor's POIs */ class MMFloorPOIs : public MapLayer { Floorplan::Floor* floor; public: /** ctor with the floor */ MMFloorPOIs(MapLayer* parent, Floorplan::Floor* floor) : MapLayer(parent, MapLayerType::FLOOR_POIS), floor(floor) { // the POIs for (Floorplan::POI* poi : floor->pois) { elements.push_back(new MMFloorPOI(this, floor, poi)); } } /** get the corresponding floor from the underlying model */ Floorplan::Floor* getFloor() {return floor;} //TODO: check void createPOI(Floorplan::POI* poi) { // add to underlying model floor->pois.push_back(poi); // add to myself as element elements.push_back(new MMFloorPOI(this, floor, poi)); } std::string getLayerName() const override {return "POIs";} }; #endif // MMFLOORPOIS_H