 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
35 bool operator()(
const T*
const a,
const T*
const b)
const {
36 return a->getID() < b->getID();
44 bool operator()(
const T*
const a,
const T*
const b)
const {
45 return a->getNumericalID() < b->getNumericalID();
70 static std::string
getIDSecure(
const T* obj,
const std::string& fallBack =
"NULL") {
71 return obj == 0 ? fallBack : obj->getID();
77 const std::string&
getID()
const {
85 void setID(
const std::string& newID) {
std::set< std::string > * myIDs
The container.
Base class for objects which have an id.
bool operator()(const T *const a, const T *const b) const
virtual ~Named()
Destructor.
Allows to store the object; used as context while traveling the rtree in TraCI.
Named(const std::string &id)
Constructor.
bool operator()(const T *const a, const T *const b) const
~StoringVisitor()
Destructor.
Function-object for stable sorting of objects acting like Named without being derived (SUMOVehicle)
std::set< const Named * > * myObjects
StoringVisitor(std::set< std::string > &objects)
void addTo(const StoringVisitor &cont) const
Adds this object to the given container.
StoringVisitor & operator=(const StoringVisitor &src)
invalidated assignment operator
Function-object for stable sorting of objects with numerical ids.
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
void add(const Named *const o) const
Adds the given object to the container.
std::string myID
The name of the object.
const std::string & getID() const
Returns the id.
StoringVisitor(std::set< const Named * > &objects)
Contructor.
void setID(const std::string &newID)
resets the id