SUMO - Simulation of Urban MObility
NIVissimSingleTypeParser_Stopschilddefinition.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 //
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #ifdef _MSC_VER
26 #include <windows_config.h>
27 #else
28 #include <config.h>
29 #endif
30 
31 #include <iostream>
33 #include "../NIImporter_Vissim.h"
35 
36 
37 // ===========================================================================
38 // method definitions
39 // ===========================================================================
41  : NIImporter_Vissim::VissimSingleTypeParser(parent) {}
42 
43 
45 
46 
47 bool
49  readUntil(from, "strecke");
50  std::string tag;
51  from >> tag; // edge name
52  from >> tag; // "spur"
53  from >> tag; // lane no
54  from >> tag; // "bei"
55  from >> tag; // pos
56  from >> tag;
57  if (tag == "RTOR") {
58  from >> tag; // "lsa"
59  from >> tag; // lsa id
60  from >> tag; // "gruppe"
61  from >> tag; // gruppe id
62  } else {
63  while (tag == "fahrzeugklasse") {
64  from >> tag; // class no
65  from >> tag; // "zeiten"
66  from >> tag; // times no
67  tag = readEndSecure(from, "fahrzeugklasse");
68  }
69  }
70  return true;
71 }
72 
73 
74 
75 /****************************************************************************/
76 
void readUntil(std::istream &from, const std::string &name)
Reads from the stream until the keywor occurs.
bool parse(std::istream &from)
Parses the data type from the given stream.
std::string readEndSecure(std::istream &from, const std::string &excl="")
as myRead, but returns "DATAEND" when the current field has ended
Importer for networks stored in Vissim format.
NIVissimSingleTypeParser_Stopschilddefinition(NIImporter_Vissim &parent)
Constructor.