22 #ifndef NIImporter_Vissim_h 23 #define NIImporter_Vissim_h 84 typedef std::map<std::string, std::list<std::string> >
nodeMap;
506 virtual bool parse(std::istream& from) = 0;
510 std::string myRead(std::istream& from);
513 std::string readEndSecure(std::istream& from,
514 const std::string& excl =
"");
516 std::string readEndSecure(std::istream& from,
517 const std::vector<std::string>& excl);
520 std::string overrideOptionalLabel(std::istream& from,
521 const std::string& tag =
"");
524 Position getPosition(std::istream& from);
528 std::vector<int> parseAssignedVehicleTypes(std::istream& from,
529 const std::string& next);
536 std::string readName(std::istream& from);
540 bool skipOverreading(std::istream& from,
const std::string& name =
"");
543 void readUntil(std::istream& from,
const std::string& name);
577 typedef std::map<NIVissimElement, VissimSingleTypeParser*>
ToParserMap;
int myHierarchyLevel
The current hierarchy level.
NIVissimXMLHandler_Streckendefinition(nodeMap &elemData)
Constructor.
~NIImporter_Vissim()
destructor
static StringBijection< int >::Entry vissimAttrs[]
The names of VISSIM-XML attributes (for passing to GenericSAXHandler)
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
Importer for networks stored in Vissim format.
std::map< std::string, NIVissimElement > ToElemIDMap
Definition of a map from element names to their numerical representation.
bool readContents(std::istream &strm)
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
NIImporter_Vissim & myVissimParent
int myHierarchyLevel
The current hierarchy level.
void loadXML(const OptionsCont &options, NBNetBuilder &nb)
ToParserMap myParsers
Parsers by element id.
void insertKnownElements()
adds name-to-id - relationships of known elements into myKnownElements
ToElemIDMap myKnownElements
Map from element names to their numerical representation.
A handler which converts occuring elements and attributes into enums.
bool myInputIsLegacyFormat
Encapsulated SAX-Attributes.
void load(const OptionsCont &options)
loads the vissim file
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)
ColorMap myColorMap
a map from color names to color definitions
~NIVissimXMLHandler_Streckendefinition()
Destructor.
int myLastNodeID
ID of the currently parsed node, for reporting mainly.
bool isConnector
check if the link is a connector
VissimXMLTag
Numbers representing VISSIM-XML - element names.
int myHierarchyLevel
The current hierarchy level.
void buildParsers()
adds id-to-parser - relationships of elements to parse into myParsers
std::map< std::string, RGBColor > ColorMap
definition of a map from color names to color definitions
NIVissimXMLHandler_Streckendefinition & operator=(const NIVissimXMLHandler_Streckendefinition &s)
invalidated assignment operator
std::map< std::string, std::list< std::string > > nodeMap
NIImporter_Vissim(NBNetBuilder &nb, const std::string &file)
constructor
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Instance responsible for building networks.
int myHierarchyLevel
The current hierarchy level.
A storage for options typed value containers)
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads network definition from the assigned option and stores it in the given network builder...
void postLoadBuild(double offset)
VissimXMLAttr
Numbers representing VISSIM-XML - attributes.
std::map< NIVissimElement, VissimSingleTypeParser * > ToParserMap
Definition of a map from an element's numerical id to his parser.
NBNetBuilder & myNetBuilder
int myHierarchyLevel
The current hierarchy level.
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
bool admitContinue(const std::string &tag)
A class which extracts VISSIM-Routes from a parsed VISSIM-file.