generate-shapes/src/pfaedle/router/NodePL.h

41 lines
878 B
C
Raw Normal View History

2018-06-09 17:14:08 +02:00
// Copyright 2018, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Authors: Patrick Brosi <brosi@informatik.uni-freiburg.de>
#ifndef PFAEDLE_ROUTER_NODEPL_H_
#define PFAEDLE_ROUTER_NODEPL_H_
#include <map>
#include <string>
#include "pfaedle/trgraph/Graph.h"
#include "util/geo/GeoGraph.h"
#include "util/geo/Geo.h"
#include "pfaedle/Def.h"
2018-06-09 17:14:08 +02:00
using util::geograph::GeoNodePL;
2018-06-09 17:14:08 +02:00
namespace pfaedle {
namespace router {
class NodePL {
2018-06-09 17:14:08 +02:00
public:
NodePL() : _n(0) {}
NodePL(const pfaedle::trgraph::Node* n) : _n(n) {} // NOLINT
const POINT* getGeom() const {
2018-06-09 17:14:08 +02:00
return !_n ? 0 : _n->pl().getGeom();
}
2018-08-01 14:25:54 +02:00
util::json::Dict getAttrs() const {
if (_n) return _n->pl().getAttrs();
return util::json::Dict();
2018-06-09 17:14:08 +02:00
}
private:
const pfaedle::trgraph::Node* _n;
};
} // namespace router
} // namespace pfaedle
#endif // PFAEDLE_ROUTER_NODEPL_H_