39 #include "../NIImporter_Vissim.h" 40 #include "../tempstructs/NIVissimTL.h" 43 #ifdef CHECK_MEMORY_LEAKS 45 #endif // CHECK_MEMORY_LEAKS 76 WRITE_ERROR(
"A traffic light group with an unknown traffic light occured.\n Group-ID: " + toString<int>(
id)
77 +
"\n TrafficLight-ID: " + toString<int>(lsaid));
80 std::string type = tl->
getType();
81 if (type ==
"festzeit") {
84 if (type ==
"festzeit_fake") {
89 return parseVAS(
id, name, lsaid, from);
91 if (type ==
"vsplus") {
94 if (type ==
"trends") {
98 return parseVAP(
id, name, lsaid, from);
101 return parseTL(
id, name, lsaid, from);
104 return parsePOS(
id, name, lsaid, from);
106 WRITE_WARNING(
"Unsupported LSA-Type '" + type +
"' occured.");
113 int id,
const std::string& name,
int lsaid, std::istream& from) {
116 std::vector<SUMOReal> times;
117 std::string tag =
myRead(from);
118 if (tag ==
"dauergruen") {
121 }
else if (tag ==
"dauerrot") {
122 isGreenBegin =
false;
127 while (tag ==
"rotende" || tag ==
"gruenanfang") {
130 times.push_back(point);
133 times.push_back(point);
154 int ,
const std::string& ,
int lsaid, std::istream& from) {
155 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
157 while (tag !=
"detektoren") {
166 int ,
const std::string&,
int lsaid, std::istream&) {
167 WRITE_WARNING(
"VSPLUS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
174 int ,
const std::string&,
int lsaid, std::istream&) {
175 WRITE_WARNING(
"TRENDS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
182 int ,
const std::string&,
int lsaid, std::istream&) {
183 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
190 int ,
const std::string&,
int lsaid, std::istream&) {
191 WRITE_WARNING(
"TL traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
198 int ,
const std::string&,
int lsaid, std::istream&) {
199 WRITE_WARNING(
"POS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
206 int ,
const std::string&,
int lsaid, std::istream&) {
207 WRITE_WARNING(
"externally defined traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
bool parseTRENDS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a TRENDS traffic light.
~NIVissimSingleTypeParser_Signalgruppendefinition()
Destructor.
std::string getType() const
std::string myRead(std::istream &from)
reads from the stream and returns the lower case version of the read value
Importer for networks stored in Vissim format.
bool parseVAP(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VAStraffic light.
bool parseFixedTime(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a fixed time traffic light.
bool parsePOS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a POS traffic light.
#define WRITE_WARNING(msg)
bool parseExternFixedTime(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs fixed time traffic light with an extern definition...
bool parseVSPLUS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VSPLUS traffic light.
static bool dictionary(int id, const std::string &type, const std::string &name, SUMOTime absdur, SUMOTime offset)
static bool dictionary(int lsaid, int id, NIVissimTLSignalGroup *o)
bool parseTL(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a TL traffic light.
NIVissimSingleTypeParser_Signalgruppendefinition(NIImporter_Vissim &parent)
Constructor.
std::string readName(std::istream &from)
Reads the structures name We cannot use the "<<" operator, as names may contain more than one word wh...
bool parseVAS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VAS traffic light.
bool parse(std::istream &from)
Parses the data type from the given stream.