38 myColorMap(colorMap) {}
55 std::string colorName =
myRead(from);
57 NIImporter_Vissim::ColorMap::iterator i =
myColorMap.find(colorName);
69 if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) {
72 color =
RGBColor((
unsigned char)r, (
unsigned char)g, (
unsigned char)b, 255);
76 if (tag ==
"ANM_ID") {
80 std::vector<int> types;
85 }
while (tag !=
"DATAEND");
std::string readEndSecure(std::istream &from, const std::string &excl="")
as myRead, but returns "DATAEND" when the current field has ended
std::string readName(std::istream &from)
Reads the structures name We cannot use the "<<" operator, as names may contain more than one word wh...
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.
std::map< std::string, RGBColor > ColorMap
definition of a map from color names to color definitions
~NIVissimSingleTypeParser_Fahrzeugklassendefinition()
Destructor.
NIVissimSingleTypeParser_Fahrzeugklassendefinition(NIImporter_Vissim &parent, NIImporter_Vissim::ColorMap &colorMap)
Constructor.
NIImporter_Vissim::ColorMap & myColorMap
color definitions
bool parse(std::istream &from)
Parses the data type from the given stream.
static bool dictionary(int id, const std::string &name, const RGBColor &color, std::vector< int > &types)
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...