 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef NIImporter_Vissim_h
20 #define NIImporter_Vissim_h
77 typedef std::map<std::string, std::list<std::string> >
nodeMap;
497 virtual bool parse(std::istream& from) = 0;
501 std::string
myRead(std::istream& from);
505 const std::string& excl =
"");
508 const std::vector<std::string>& excl);
512 const std::string& tag =
"");
520 const std::string& next);
527 std::string
readName(std::istream& from);
531 bool skipOverreading(std::istream& from,
const std::string& name =
"");
534 void readUntil(std::istream& from,
const std::string& name);
568 typedef std::map<NIVissimElement, VissimSingleTypeParser*>
ToParserMap;
NIVissimExtendedEdgePoint readExtEdgePointDef(std::istream &from)
NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition & operator=(const NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition &vW)
invalidated assignment operator
static StringBijection< int >::Entry vissimAttrs[]
The names of VISSIM-XML attributes (for passing to GenericSAXHandler)
@ VISSIM_TAG_INTOBJECTREF
~NIVissimXMLHandler_ConflictArea()
Destructor.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
bool skipOverreading(std::istream &from, const std::string &name="")
Overreads the named parameter (if) given and skips the rest until "DATAEND".
virtual ~VissimSingleTypeParser()
Destructor.
int myHierarchyLevel
The current hierarchy level.
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
Instance responsible for building networks.
NIVissimXMLHandler_ConflictArea()
Constructor.
int myHierarchyLevel
The current hierarchy level.
~NIVissimXMLHandler_Parkplatzdefinition()
Destructor.
int myHierarchyLevel
The current hierarchy level.
NIVissimXMLHandler_Parkplatzdefinition()
Constructor.
NIVissimXMLHandler_VWunschentscheidungsdefinition & operator=(const NIVissimXMLHandler_VWunschentscheidungsdefinition &vW)
invalidated assignment operator
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
NIImporter_Vissim & myVissimParent
@ VISSIM_TAG_SPEED_DECISION
@ VISSIM_ATTR_LINKBEHAVETYPE
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 admitContinue(const std::string &tag)
~NIVissimXMLHandler_Fahrzeugklassendefinition()
Destructor.
@ VISSIM_TAG_ROUTE_STATIC
Importer for networks stored in Vissim format.
Position getPosition(std::istream &from)
returns the 2d-position saved as next within the stream
ToElemIDMap myKnownElements
Map from element names to their numerical representation.
NIVissimXMLHandler_Routenentscheidungsdefinition & operator=(const NIVissimXMLHandler_Routenentscheidungsdefinition &r)
invalidated assignment operator
void insertKnownElements()
adds name-to-id - relationships of known elements into myKnownElements
NIVissimXMLHandler_Streckendefinition(nodeMap &elemData)
Constructor.
bool readContents(std::istream &strm)
std::map< std::string, NIVissimElement > ToElemIDMap
Definition of a map from element names to their numerical representation.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
NIVissimXMLHandler_Zuflussdefinition & operator=(const NIVissimXMLHandler_Zuflussdefinition &z)
invalidated assignment operator
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
std::string readEndSecure(std::istream &from, const std::string &excl="")
as myRead, but returns "DATAEND" when the current field has ended
void load(const OptionsCont &options)
loads the vissim file
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
ToParserMap myParsers
Parsers by element id.
virtual bool parse(std::istream &from)=0
Parses a single data type. Returns whether no error occurred.
@ VISSIM_TAG_DECISION_STATIC
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
std::map< std::string, RGBColor > ColorMap
definition of a map from color names to color definitions
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
A point in 2D or 3D with translation and scaling methods.
static StringBijection< int >::Entry vissimTags[]
The names of VISSIM-XML elements (for passing to GenericSAXHandler)
A storage for options typed value containers)
VissimSingleTypeParser & operator=(const VissimSingleTypeParser &)
Invalidated assignment operator.
ColorMap myColorMap
a map from color names to color definitions
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
~NIVissimXMLHandler_VWunschentscheidungsdefinition()
Destructor.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
@ VISSIM_TAG_LINKPOLYPOINT
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
std::map< NIVissimElement, VissimSingleTypeParser * > ToParserMap
Definition of a map from an element's numerical id to his parser.
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
NBNetBuilder & myNetBuilder
int myHierarchyLevel
The current hierarchy level.
VissimXMLAttr
Numbers representing VISSIM-XML - attributes.
NIVissimXMLHandler_VWunschentscheidungsdefinition(nodeMap &elemData)
Constructor.
NIImporter_Vissim & operator=(const NIImporter_Vissim &)
Invalidated assignment operator.
void readUntil(std::istream &from, const std::string &name)
Reads from the stream until the keywor occurs.
NIImporter_Vissim(NBNetBuilder &nb)
constructor
NIVissimXMLHandler_ConflictArea & operator=(const NIVissimXMLHandler_ConflictArea &c)
invalidated assignment operator
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,...
NIVissimXMLHandler_Fahrzeugklassendefinition(nodeMap &elemData)
Constructor.
VissimXMLTag
Numbers representing VISSIM-XML - element names.
NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition(nodeMap &elemData)
Constructor.
~NIVissimXMLHandler_Streckendefinition()
Destructor.
NIVissimXMLHandler_Parkplatzdefinition & operator=(const NIVissimXMLHandler_Parkplatzdefinition &z)
invalidated assignment operator
NIVissimXMLHandler_Streckendefinition & operator=(const NIVissimXMLHandler_Streckendefinition &s)
invalidated assignment operator
std::string overrideOptionalLabel(std::istream &from, const std::string &tag="")
overrides the optional label definition; returns the next tag as done by readEndSecure
void buildParsers()
adds id-to-parser - relationships of elements to parse into myParsers
void postLoadBuild(double offset)
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
bool isConnector
check if the link is a connector
std::string myRead(std::istream &from)
reads from the stream and returns the lower case version of the read value
@ VISSIM_TAG_VEHICLE_CLASS
std::map< std::string, std::list< std::string > > nodeMap
NIVissimXMLHandler_Routenentscheidungsdefinition(nodeMap &elemData)
Constructor.
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
~NIVissimXMLHandler_Zuflussdefinition()
Destructor.
NIVissimXMLHandler_Fahrzeugklassendefinition & operator=(const NIVissimXMLHandler_Fahrzeugklassendefinition &f)
invalidated assignment operator
@ VISSIM_TAG_VEHICLE_INPUT
A handler which converts occuring elements and attributes into enums.
~NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition()
Destructor.
~NIVissimXMLHandler_Routenentscheidungsdefinition()
Destructor.
~NIImporter_Vissim()
destructor
Encapsulated SAX-Attributes.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads network definition from the assigned option and stores it in the given network builder.
VissimSingleTypeParser(NIImporter_Vissim &parent)
Constructor.
NIVissimXMLHandler_Zuflussdefinition()
Constructor.
A class which extracts VISSIM-Routes from a parsed VISSIM-file.
int myHierarchyLevel
The current hierarchy level.