Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ODDistrictCont.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2002-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20// A container for districts
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
25#include "ODDistrict.h"
27
28
29// ===========================================================================
30// class definitions
31// ===========================================================================
39class ODDistrictCont : public NamedObjectCont<ODDistrict*> {
40public:
43
44
47
48
63 std::string getRandomSourceFromDistrict(const std::string& name) const;
64
65
80 std::string getRandomSinkFromDistrict(const std::string& name) const;
81
83 void loadDistricts(std::vector<std::string> files);
84
86 void makeDistricts(const std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >& districts);
87
88private:
91
94
95
96};
A map of named object pointers.
A container for districts.
ODDistrictCont & operator=(const ODDistrictCont &s)
invalidated assignment operator
void makeDistricts(const std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > &districts)
create districts from description
std::string getRandomSourceFromDistrict(const std::string &name) const
Returns the id of a random source from the named district.
std::string getRandomSinkFromDistrict(const std::string &name) const
Returns the id of a random sink from the named district.
~ODDistrictCont()
Destructor.
ODDistrictCont(const ODDistrictCont &s)
invalidated copy constructor
void loadDistricts(std::vector< std::string > files)
load districts from files
ODDistrictCont()
Constructor.