NBDistrictCont.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // A container for districts
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef NBDistrictCont_h
00020 #define NBDistrictCont_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <map>
00033 #include <string>
00034 
00035 
00036 // ===========================================================================
00037 // class declarations
00038 // ===========================================================================
00039 class NBDistrict;
00040 class NBEdge;
00041 class NBNodeCont;
00042 class OutputDevice;
00043 
00044 
00045 // ===========================================================================
00046 // class definitions
00047 // ===========================================================================
00058 class NBDistrictCont {
00059 public:
00061     NBDistrictCont() throw();
00062 
00063 
00065     ~NBDistrictCont() throw();
00066 
00067 
00073     bool insert(NBDistrict * const district) throw();
00074 
00075 
00081     NBDistrict *retrieve(const std::string &id) const throw();
00082 
00083 
00092     void writeXML(OutputDevice &into) const throw();
00093 
00094 
00096     size_t size() const throw();
00097 
00098 
00111     bool addSource(const std::string &dist, NBEdge * const source,
00112                    SUMOReal weight) throw();
00113 
00114 
00127     bool addSink(const std::string &dist, NBEdge * const destination,
00128                  SUMOReal weight) throw();
00129 
00130 
00139     void removeFromSinksAndSources(NBEdge * const e) throw();
00140 
00141 
00151     void reshiftDistrictPositions(SUMOReal xoff, SUMOReal yoff) throw();
00152 
00153 
00154 private:
00156     typedef std::map<std::string, NBDistrict*> DistrictCont;
00157 
00159     DistrictCont myDistricts;
00160 
00161 
00162 private:
00164     NBDistrictCont(const NBDistrictCont &s);
00165 
00167     NBDistrictCont &operator=(const NBDistrictCont &s);
00168 
00169 
00170 };
00171 
00172 
00173 #endif
00174 
00175 /****************************************************************************/
00176 

Generated on Wed May 5 00:06:32 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6