40 #ifdef CHECK_MEMORY_LEAKS 42 #endif // CHECK_MEMORY_LEAKS 72 DistrictCont::const_iterator i =
myDistricts.find(
id);
104 return o->
addSink(destination, weight);
111 (*i).second->removeFromSinksAndSources(e);
bool addSource(NBEdge *const source, SUMOReal weight)
Adds a source.
The representation of a single edge during network building.
bool addSink(const std::string &dist, NBEdge *const destination, SUMOReal weight)
Adds a sink to the named district.
DistrictCont myDistricts
The instance of the dictionary.
A class representing a single district.
const std::string & getID() const
Returns the id.
~NBDistrictCont()
Destructor.
bool insert(NBDistrict *const district)
Adds a district to the dictionary.
bool addSink(NBEdge *const sink, SUMOReal weight)
Adds a sink.
bool addSource(const std::string &dist, NBEdge *const source, SUMOReal weight)
Adds a source to the named district.
NBDistrictCont()
Constructor.
void removeFromSinksAndSources(NBEdge *const e)
Removes the given edge from the lists of sources and sinks in all stored districts.
int size() const
Returns the number of districts inside the container.
NBDistrict * retrieve(const std::string &id) const
Returns the districts with the given id.