75 typedef std::map<std::string, std::list<std::string> >
nodeMap;
495 virtual bool parse(std::istream& from) = 0;
499 std::string
myRead(std::istream& from);
503 const std::string& excl =
"");
506 const std::vector<std::string>& excl);
510 const std::string& tag =
"");
518 const std::string& next);
525 std::string
readName(std::istream& from);
529 bool skipOverreading(std::istream& from,
const std::string& name =
"");
532 void readUntil(std::istream& from,
const std::string& name);
566 typedef std::map<NIVissimElement, VissimSingleTypeParser*>
ToParserMap;
A handler which converts occurring elements and attributes into enums.
Instance responsible for building networks.
~NIVissimXMLHandler_ConflictArea()
Destructor.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
NIVissimXMLHandler_ConflictArea()
Constructor.
NIVissimXMLHandler_ConflictArea(const NIVissimXMLHandler_ConflictArea &c)
invalidated copy constructor
NIVissimXMLHandler_ConflictArea & operator=(const NIVissimXMLHandler_ConflictArea &c)
invalidated assignment operator
int myHierarchyLevel
The current hierarchy level.
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
~NIVissimXMLHandler_Fahrzeugklassendefinition()
Destructor.
NIVissimXMLHandler_Fahrzeugklassendefinition(const NIVissimXMLHandler_Fahrzeugklassendefinition &f)
invalidated copy constructor
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
NIVissimXMLHandler_Fahrzeugklassendefinition & operator=(const NIVissimXMLHandler_Fahrzeugklassendefinition &f)
invalidated assignment operator
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
int myHierarchyLevel
The current hierarchy level.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
~NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition()
Destructor.
NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition & operator=(const NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition &vW)
invalidated assignment operator
NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition(const NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition &vW)
invalidated copy constructor
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
~NIVissimXMLHandler_Parkplatzdefinition()
Destructor.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
NIVissimXMLHandler_Parkplatzdefinition(const NIVissimXMLHandler_Parkplatzdefinition &z)
invalidated copy constructor
NIVissimXMLHandler_Parkplatzdefinition & operator=(const NIVissimXMLHandler_Parkplatzdefinition &z)
invalidated assignment operator
NIVissimXMLHandler_Parkplatzdefinition()
Constructor.
A class which extracts VISSIM-Routes from a parsed VISSIM-file.
NIVissimXMLHandler_Routenentscheidungsdefinition & operator=(const NIVissimXMLHandler_Routenentscheidungsdefinition &r)
invalidated assignment operator
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
~NIVissimXMLHandler_Routenentscheidungsdefinition()
Destructor.
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
NIVissimXMLHandler_Routenentscheidungsdefinition(const NIVissimXMLHandler_Routenentscheidungsdefinition &r)
invalidated copy constructor
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
int myHierarchyLevel
The current hierarchy level.
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
bool isConnector
check if the link is a connector
int myHierarchyLevel
The current hierarchy level.
~NIVissimXMLHandler_Streckendefinition()
Destructor.
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
NIVissimXMLHandler_Streckendefinition & operator=(const NIVissimXMLHandler_Streckendefinition &s)
invalidated assignment operator
NIVissimXMLHandler_Streckendefinition(const NIVissimXMLHandler_Streckendefinition &s)
invalidated copy constructor
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
NIVissimXMLHandler_VWunschentscheidungsdefinition(const NIVissimXMLHandler_VWunschentscheidungsdefinition &vW)
invalidated copy constructor
NIVissimXMLHandler_VWunschentscheidungsdefinition & operator=(const NIVissimXMLHandler_VWunschentscheidungsdefinition &vW)
invalidated assignment operator
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
int myHierarchyLevel
The current hierarchy level.
~NIVissimXMLHandler_VWunschentscheidungsdefinition()
Destructor.
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
NIVissimXMLHandler_Zuflussdefinition(const NIVissimXMLHandler_Zuflussdefinition &z)
invalidated copy constructor
~NIVissimXMLHandler_Zuflussdefinition()
Destructor.
NIVissimXMLHandler_Zuflussdefinition & operator=(const NIVissimXMLHandler_Zuflussdefinition &z)
invalidated assignment operator
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
NIVissimXMLHandler_Zuflussdefinition()
Constructor.
Position getPosition(std::istream &from)
returns the 2d-position saved as next within the stream
VissimSingleTypeParser & operator=(const VissimSingleTypeParser &)
Invalidated assignment operator.
std::string readEndSecure(std::istream &from, const std::string &excl="")
as myRead, but returns "DATAEND" when the current field has ended
NIVissimExtendedEdgePoint readExtEdgePointDef(std::istream &from)
std::vector< int > parseAssignedVehicleTypes(std::istream &from, const std::string &next)
parses a listof vehicle types assigned to the current data field One should remeber,...
NIImporter_Vissim & myVissimParent
std::string readName(std::istream &from)
Reads the structures name We cannot use the "<<" operator, as names may contain more than one word wh...
virtual ~VissimSingleTypeParser()
Destructor.
virtual bool parse(std::istream &from)=0
Parses a single data type. Returns whether no error occurred.
void readUntil(std::istream &from, const std::string &name)
Reads from the stream until the keywor occurs.
bool skipOverreading(std::istream &from, const std::string &name="")
Overreads the named parameter (if) given and skips the rest until "DATAEND".
std::string overrideOptionalLabel(std::istream &from, const std::string &tag="")
overrides the optional label definition; returns the next tag as done by readEndSecure
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, NIVissimElement > ToElemIDMap
Definition of a map from element names to their numerical representation.
NIImporter_Vissim & operator=(const NIImporter_Vissim &)
Invalidated assignment operator.
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads network definition from the assigned option and stores it in the given network builder.
~NIImporter_Vissim()
destructor
static SequentialStringBijection::Entry vissimAttrs[]
The names of VISSIM-XML attributes (for passing to GenericSAXHandler)
std::map< std::string, std::list< std::string > > nodeMap
void buildParsers()
adds id-to-parser - relationships of elements to parse into myParsers
static SequentialStringBijection::Entry vissimTags[]
The names of VISSIM-XML elements (for passing to GenericSAXHandler)
VissimXMLAttr
Numbers representing VISSIM-XML - attributes.
@ VISSIM_ATTR_LINKBEHAVETYPE
bool admitContinue(const std::string &tag)
ColorMap myColorMap
a map from color names to color definitions
VissimXMLTag
Numbers representing VISSIM-XML - element names.
@ VISSIM_TAG_VEHICLE_INPUT
@ VISSIM_TAG_VEHICLE_CLASS
@ VISSIM_TAG_ROUTE_STATIC
@ VISSIM_TAG_LINKPOLYPOINT
@ VISSIM_TAG_DECISION_STATIC
@ VISSIM_TAG_INTOBJECTREF
@ VISSIM_TAG_SPEED_DECISION
ToElemIDMap myKnownElements
Map from element names to their numerical representation.
void postLoadBuild(double offset)
std::map< std::string, RGBColor > ColorMap
definition of a map from color names to color definitions
void insertKnownElements()
adds name-to-id - relationships of known elements into myKnownElements
bool readContents(std::istream &strm)
ToParserMap myParsers
Parsers by element id.
NBNetBuilder & myNetBuilder
std::map< NIVissimElement, VissimSingleTypeParser * > ToParserMap
Definition of a map from an element's numerical id to his parser.
NIImporter_Vissim(const NIImporter_Vissim &)
Invalidated copy constructor.
void load(const OptionsCont &options)
loads the vissim file
A storage for options typed value containers)
A point in 2D or 3D with translation and scaling methods.
Encapsulated SAX-Attributes.