SUMO - Simulation of Urban MObility

NLEdgeControlBuilder.h

Go to the documentation of this file.
00001 /****************************************************************************/
00009 // Interface for building edges
00010 /****************************************************************************/
00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00013 /****************************************************************************/
00014 //
00015 //   This file is part of SUMO.
00016 //   SUMO is free software: you can redistribute it and/or modify
00017 //   it under the terms of the GNU General Public License as published by
00018 //   the Free Software Foundation, either version 3 of the License, or
00019 //   (at your option) any later version.
00020 //
00021 /****************************************************************************/
00022 #ifndef NLEdgeControlBuilder_h
00023 #define NLEdgeControlBuilder_h
00024 
00025 
00026 // ===========================================================================
00027 // included modules
00028 // ===========================================================================
00029 #ifdef _MSC_VER
00030 #include <windows_config.h>
00031 #else
00032 #include <config.h>
00033 #endif
00034 
00035 #include <string>
00036 #include <vector>
00037 #include <microsim/MSEdge.h>
00038 #include <utils/geom/PositionVector.h>
00039 
00040 
00041 // ===========================================================================
00042 // class declarations
00043 // ===========================================================================
00044 class MSEdgeControl;
00045 class MSLane;
00046 class MSNet;
00047 class OutputDevice;
00048 
00049 
00050 // ===========================================================================
00051 // class definitions
00052 // ===========================================================================
00064 class NLEdgeControlBuilder {
00065 public:
00067     typedef std::vector<MSEdge*> EdgeCont;
00068 
00069 public:
00071     NLEdgeControlBuilder();
00072 
00073 
00075     virtual ~NLEdgeControlBuilder();
00076 
00077 
00090     void beginEdgeParsing(const std::string& id, MSEdge::EdgeBasicFunction function,
00091                           const std::string& streetName);
00092 
00093 
00111     virtual MSLane* addLane(const std::string& id, SUMOReal maxSpeed,
00112                             SUMOReal length, const PositionVector& shape,
00113                             SUMOReal width, const SUMOVehicleClasses& allowed,
00114                             const SUMOVehicleClasses& disallowed);
00115 
00116 
00119     virtual MSEdge* closeEdge();
00120 
00122     MSEdgeControl* build();
00123 
00124 
00134     virtual MSEdge* buildEdge(const std::string& id, const std::string& streetName = "") ;
00135 
00136 
00137 protected:
00139     unsigned int myCurrentNumericalLaneID;
00140 
00142     unsigned int myCurrentNumericalEdgeID;
00143 
00145     EdgeCont myEdges;
00146 
00148     MSEdge* myActiveEdge;
00149 
00151     std::vector<MSLane*> *myLaneStorage;
00152 
00154     MSEdge::EdgeBasicFunction myFunction;
00155 
00156 private:
00158     NLEdgeControlBuilder(const NLEdgeControlBuilder& s);
00159 
00161     NLEdgeControlBuilder& operator=(const NLEdgeControlBuilder& s);
00162 
00163 };
00164 
00165 
00166 #endif
00167 
00168 /****************************************************************************/
00169 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines