SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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-sim.org/
12 // Copyright (C) 2002-2014 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 
92  // @brief load districts from FILE
93  void loadDistricts(std::string districtfile);
94 
95 private:
98 
101 
102 
103 };
104 
105 
106 #endif
107 
108 /****************************************************************************/
109 
A map of named object pointers.
void loadDistricts(std::string districtfile)
~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.
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.