SUMO - Simulation of Urban MObility
ODDistrictCont.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2002-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // A container for districts
20 /****************************************************************************/
21 #ifndef ODDistrictCont_h
22 #define ODDistrictCont_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include "ODDistrict.h"
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
48 class ODDistrictCont : public NamedObjectCont<ODDistrict*> {
49 public:
52 
53 
56 
57 
72  std::string getRandomSourceFromDistrict(const std::string& name) const;
73 
74 
89  std::string getRandomSinkFromDistrict(const std::string& name) const;
90 
92  void loadDistricts(std::vector<std::string> files);
93 
95  void makeDistricts(const std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >& districts);
96 
97 private:
100 
103 
104 
105 };
106 
107 
108 #endif
109 
110 /****************************************************************************/
111 
void makeDistricts(const std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > &districts)
create districts from description
std::string getRandomSinkFromDistrict(const std::string &name) const
Returns the id of a random sink from the named district.
A map of named object pointers.
~ODDistrictCont()
Destructor.
ODDistrictCont()
Constructor.
A container for districts.
std::string getRandomSourceFromDistrict(const std::string &name) const
Returns the id of a random source from the named district.
void loadDistricts(std::vector< std::string > files)
load districts from files
ODDistrictCont & operator=(const ODDistrictCont &s)
invalidated assignment operator