SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ODDistrictCont.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // A container for districts
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2002-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef ODDistrictCont_h
23 #define ODDistrictCont_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include "ODDistrict.h"
37 
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
49 class ODDistrictCont : public NamedObjectCont<ODDistrict*> {
50 public:
53 
54 
57 
58 
73  std::string getRandomSourceFromDistrict(const std::string& name) const;
74 
75 
90  std::string getRandomSinkFromDistrict(const std::string& name) const;
91 
93  void loadDistricts(std::vector<std::string> files);
94 
96  void makeDistricts(const std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >& districts);
97 
98 private:
100  ODDistrictCont(const ODDistrictCont& s);
101 
104 
105 
106 };
107 
108 
109 #endif
110 
111 /****************************************************************************/
112 
void makeDistricts(const std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > &districts)
create districts from description
A map of named object pointers.
~ODDistrictCont()
Destructor.
std::string getRandomSourceFromDistrict(const std::string &name) const
Returns the id of a random source from the named district.
ODDistrictCont()
Constructor.
A container for districts.
void loadDistricts(std::vector< std::string > files)
load districts from files
ODDistrictCont & operator=(const ODDistrictCont &s)
invalidated assignment operator
std::string getRandomSinkFromDistrict(const std::string &name) const
Returns the id of a random sink from the named district.