SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ODDistrict.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A district (origin/destination)
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
10 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef ODDistrict_h
21 #define ODDistrict_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <vector>
34 #include <string>
35 #include <utility>
36 #include <utils/common/Named.h>
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
51 class ODDistrict : public Named {
52 public:
57  ODDistrict(const std::string& id) ;
58 
59 
61  ~ODDistrict() ;
62 
63 
77  void addSource(const std::string& id, SUMOReal weight) ;
78 
79 
93  void addSink(const std::string& id, SUMOReal weight) ;
94 
95 
104  std::string getRandomSource() const throw(OutOfBoundsException);
105 
106 
115  std::string getRandomSink() const throw(OutOfBoundsException);
116 
117 
122  unsigned int sinkNumber() const;
123 
124 
129  unsigned int sourceNumber() const;
130 
131 
132 private:
135 
138 
139 
140 private:
142  ODDistrict(const ODDistrict& s);
143 
145  ODDistrict& operator=(const ODDistrict& s);
146 
147 
148 };
149 
150 
151 #endif
152 
153 /****************************************************************************/
154