initial commit
This commit is contained in:
41
mapview/model/MMFloorBeacon.h
Normal file
41
mapview/model/MMFloorBeacon.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef MAPVIEWELEMENTIBEACON_H
|
||||
#define MAPVIEWELEMENTIBEACON_H
|
||||
|
||||
#include "MapModelElement.h"
|
||||
#include "IHasMAC.h"
|
||||
#include "IHasName.h"
|
||||
|
||||
#include "../elements/MV2DElementBeacon.h"
|
||||
|
||||
#include <Indoor/floorplan/v2/Floorplan.h>
|
||||
|
||||
class MMFloorBeacon : public MapModelElement, public IHasMAC, public IHasName {
|
||||
|
||||
private:
|
||||
|
||||
Floorplan::Floor* floor;
|
||||
Floorplan::Beacon* b;
|
||||
MV2DElementBeacon mv2d;
|
||||
|
||||
public:
|
||||
|
||||
MMFloorBeacon(MapLayer* parent, Floorplan::Floor* floor, Floorplan::Beacon* b) : MapModelElement(parent), floor(floor), b(b), mv2d(b) {
|
||||
|
||||
}
|
||||
|
||||
virtual void setMAC(const std::string& mac) override {b->mac = mac;}
|
||||
virtual const std::string& getMAC() const override {return b->mac;}
|
||||
|
||||
virtual void setName(const std::string& name) override {b->name = name;}
|
||||
virtual const std::string& getName() const override {return b->name;}
|
||||
|
||||
MV2DElement* getMV2D() const override {return (MV2DElement*) &mv2d;}
|
||||
|
||||
void deleteMe() const override {
|
||||
parent->removeElement(this);
|
||||
floor->beacons.erase(std::remove(floor->beacons.begin(), floor->beacons.end(), b), floor->beacons.end());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // MAPVIEWELEMENTIBEACON_H
|
||||
Reference in New Issue
Block a user