initial commit
This commit is contained in:
56
mapview/model/MMFloor.h
Normal file
56
mapview/model/MMFloor.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#ifndef MMFLOOR_H
|
||||
#define MMFLOOR_H
|
||||
|
||||
#include "MapLayer.h"
|
||||
#include "MMFloorOutline.h"
|
||||
#include "MMFloorObstacles.h"
|
||||
#include "MMFloorAccessPoints.h"
|
||||
#include "MMFloorBeacons.h"
|
||||
#include "MMFloorUnderlay.h"
|
||||
|
||||
|
||||
#include <Indoor/floorplan/v2/Floorplan.h>
|
||||
|
||||
|
||||
/**
|
||||
* floor-layer containing one floor
|
||||
* and its outline, obstacles, access-points, ...
|
||||
*/
|
||||
class MMFloor : public MapLayer, public IHasName {
|
||||
|
||||
private:
|
||||
|
||||
/** the underlying data-structure */
|
||||
Floorplan::Floor* floor;
|
||||
|
||||
public:
|
||||
|
||||
/** ctor. existing floor */
|
||||
MMFloor(MapLayer* parent, Floorplan::Floor* floor) : MapLayer(parent, MapLayerType::FLOOR), floor(floor) {
|
||||
|
||||
new MMFloorOutline(this, floor);
|
||||
new MMFloorObstacles(this, floor);
|
||||
new MMFloorAccessPoints(this, floor);
|
||||
new MMFloorBeacons(this, floor);
|
||||
new MMFloorUnderlay(this, floor);
|
||||
|
||||
}
|
||||
|
||||
/** ctor. new floor. */
|
||||
MMFloor(MapLayer* parent) : MapLayer(parent), floor(nullptr) {
|
||||
throw "not yet implemented";
|
||||
}
|
||||
|
||||
/** get the underlying model */
|
||||
Floorplan::Floor& getFloor() {return *floor;}
|
||||
|
||||
|
||||
std::string getLayerName() const override {return floor->name;}
|
||||
|
||||
|
||||
virtual void setName(const std::string& name) {this->floor->name = name;}
|
||||
virtual const std::string& getName() const {return this->floor->name;}
|
||||
|
||||
};
|
||||
|
||||
#endif // MMFLOOR_H
|
||||
Reference in New Issue
Block a user