SUMO - Simulation of Urban MObility

NLEdgeControlBuilder.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Interface for building edges
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2011 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 NLEdgeControlBuilder_h
00020 #define NLEdgeControlBuilder_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 <string>
00033 #include <vector>
00034 #include <microsim/MSEdge.h>
00035 #include <utils/geom/PositionVector.h>
00036 
00037 
00038 // ===========================================================================
00039 // class declarations
00040 // ===========================================================================
00041 class MSEdgeControl;
00042 class MSLane;
00043 class MSNet;
00044 class OutputDevice;
00045 
00046 
00047 // ===========================================================================
00048 // class definitions
00049 // ===========================================================================
00061 class NLEdgeControlBuilder {
00062 public:
00064     typedef std::vector<MSEdge*> EdgeCont;
00065 
00066 public:
00068     NLEdgeControlBuilder();
00069 
00070 
00072     virtual ~NLEdgeControlBuilder();
00073 
00074 
00087     void beginEdgeParsing(const std::string& id, MSEdge::EdgeBasicFunction function,
00088                           const std::string& streetName);
00089 
00090 
00108     virtual MSLane* addLane(const std::string& id, SUMOReal maxSpeed,
00109                             SUMOReal length, const PositionVector& shape,
00110                             SUMOReal width, const SUMOVehicleClasses& allowed,
00111                             const SUMOVehicleClasses& disallowed);
00112 
00113 
00116     virtual MSEdge* closeEdge();
00117 
00119     MSEdgeControl* build();
00120 
00121 
00131     virtual MSEdge* buildEdge(const std::string& id, const std::string& streetName="") throw();
00132 
00133 
00134 protected:
00136     unsigned int myCurrentNumericalLaneID;
00137 
00139     unsigned int myCurrentNumericalEdgeID;
00140 
00142     EdgeCont myEdges;
00143 
00145     MSEdge* myActiveEdge;
00146 
00148     std::vector<MSLane*> *myLaneStorage;
00149 
00151     MSEdge::EdgeBasicFunction myFunction;
00152 
00153 private:
00155     NLEdgeControlBuilder(const NLEdgeControlBuilder& s);
00156 
00158     NLEdgeControlBuilder& operator=(const NLEdgeControlBuilder& s);
00159 
00160 };
00161 
00162 
00163 #endif
00164 
00165 /****************************************************************************/
00166 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines