37 myColorMap(colorMap) {}
59 while (tag !=
"laenge") {
61 std::string colorName =
myRead(from);
62 NIImporter_Vissim::ColorMap::iterator i =
myColorMap.find(colorName);
74 if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) {
77 color =
RGBColor((
unsigned char)r, (
unsigned char)g, (
unsigned char)b, 255);
85 while (tag !=
"maxbeschleunigung") {
91 while (tag !=
"maxverzoegerung") {
96 while (tag !=
"besetzungsgrad") {
99 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_Fahrzeugtypdefinition()
Destructor.
NIImporter_Vissim::ColorMap & myColorMap
The color map to use.
bool parse(std::istream &from)
Parses the data type from the given stream.
NIVissimSingleTypeParser_Fahrzeugtypdefinition(NIImporter_Vissim &parent, NIImporter_Vissim::ColorMap &colorMap)
Constructor.
static bool dictionary(int id, const std::string &name, const std::string &category, const RGBColor &color)
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...