SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NLHandler Class Reference

#include <NLHandler.h>

Inheritance diagram for NLHandler:
MSRouteHandler SUMORouteHandler SUMOSAXHandler GenericSAXHandler DefaultHandler

Public Types

typedef std::vector< MSLane * > LaneVector
 Definition of a lane vector.

Public Member Functions

void characters (const XMLCh *const chars, const XERCES3_SIZE_t length)
 The inherited method called when characters occured.
bool checkStopPos (SUMOReal &startPos, SUMOReal &endPos, const SUMOReal laneLength, const SUMOReal minLength, const bool friendlyPos)
 check start and end position of a stop
void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
 The inherited method called when a tag is being closed.
const std::string & getFileName () const
 returns the current file name
SUMOTime getLastDepart () const
 Returns the last loaded depart time.
 NLHandler (const std::string &file, MSNet &net, NLDetectorBuilder &detBuilder, NLTriggerBuilder &triggerBuilder, NLEdgeControlBuilder &edgeBuilder, NLJunctionControlBuilder &junctionBuilder)
 Constructor.
void registerParent (const int tag, GenericSAXHandler *handler)
 Assigning a parent handler which is enabled when the specified tag is closed.
void setFileName (const std::string &name)
 Sets the current file name.
void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)
 The inherited method called when a new tag opens.
virtual ~NLHandler ()
 Destructor.
SAX ErrorHandler callbacks
void warning (const SAXParseException &exception)
 Handler for XML-warnings.
void error (const SAXParseException &exception)
 Handler for XML-errors.
void fatalError (const SAXParseException &exception)
 Handler for XML-errors.

Protected Member Functions

virtual void addE1Detector (const SUMOSAXAttributes &attrs)
 Builds an e1 detector using the given specification.
virtual void addE2Detector (const SUMOSAXAttributes &attrs)
 Builds an e2 detector using the given specification.
void addE3Entry (const SUMOSAXAttributes &attrs)
 Adds an entry to the currently processed e3 detector.
void addE3Exit (const SUMOSAXAttributes &attrs)
 Adds an exit to the currently processed e3 detector.
virtual void addEdgeLaneMeanData (const SUMOSAXAttributes &attrs, int objecttype)
 Builds edge or lane base mean data collector using the given specification.
virtual void addInstantE1Detector (const SUMOSAXAttributes &attrs)
 Builds an e1 detector using the given specification.
void addParam (const SUMOSAXAttributes &attrs)
virtual void addRouteProbeDetector (const SUMOSAXAttributes &attrs)
 Builds a routeprobe-detector using the given specification.
void addStop (const SUMOSAXAttributes &attrs)
 Processing of a stop.
virtual void addVTypeProbeDetector (const SUMOSAXAttributes &attrs)
 Builds a vtype-detector using the given specification.
void beginE3Detector (const SUMOSAXAttributes &attrs)
 Starts building of an e3 detector using the given specification.
std::string buildErrorMessage (const SAXParseException &exception)
 Builds an error message.
bool checkLastDepart ()
 Checks whether the route file is sorted by departure time if needed.
virtual void closeEdge ()
 Closes the process of building an edge.
void closeFlow ()
 Ends the processing of a flow.
void closePerson ()
 Ends the processing of a person.
void closeRoute ()
void closeRouteDistribution ()
void closeVehicle ()
 Ends the processing of a vehicle.
void closeVehicleTypeDistribution ()
virtual void endE3Detector ()
 Builds of an e3 detector using collected values.
virtual void myCharacters (int element, const std::string &chars)
 Callback method for characters to implement by derived classes.
void openRoute (const SUMOSAXAttributes &attrs)
void openRouteDistribution (const SUMOSAXAttributes &attrs)
void openVehicleTypeDistribution (const SUMOSAXAttributes &attrs)
void registerLastDepart ()
 save last depart (only to be used if vehicle is not discarded)
inherited from GenericSAXHandler
virtual void myStartElement (int element, const SUMOSAXAttributes &attrs)
 Called on the opening of a tag;.
virtual void myEndElement (int element)
 Called when a closing tag occurs.

Protected Attributes

NLDiscreteEventBuilder myActionBuilder
 A builder for object actions.
MSPerson::MSPersonPlanmyActivePlan
 The plan of the current person.
MSEdgeVector myActiveRoute
 The current route.
RGBColor myActiveRouteColor
 The currently parsed route's color.
std::string myActiveRouteID
 The id of the current route.
SUMOReal myActiveRouteProbability
 The id of the current route.
std::string myActiveRouteRefID
 The id of the route the current route references to.
std::vector
< SUMOVehicleParameter::Stop
myActiveRouteStops
 List of the stops on the parsed route.
bool myAddVehiclesDirectly
 Information whether vehicles shall be directly added to the network or kept within the buffer.
bool myAmInTLLogicMode
 internal information whether a tls-logic is currently read
Boundary myConvBoundary
std::string myCurrentDistrictID
 The id of the current district.
bool myCurrentIsBroken
bool myCurrentIsInternalToSkip
 Information whether the currently parsed edge is internal and not wished, here.
RandomDistributor< const
MSRoute * > * 
myCurrentRouteDistribution
 The currently parsed distribution of routes (probability->route)
std::string myCurrentRouteDistributionID
 The id of the currently parsed route distribution.
SUMOVTypeParametermyCurrentVType
 The currently parsed vehicle type.
RandomDistributor
< MSVehicleType * > * 
myCurrentVTypeDistribution
 The currently parsed distribution of vehicle types (probability->vehicle type)
std::string myCurrentVTypeDistributionID
 The id of the currently parsed vehicle type distribution.
std::string myCurrentWAUTID
 The id of the currently processed WAUT.
NLDetectorBuildermyDetectorBuilder
 The detector builder to use.
NLEdgeControlBuildermyEdgeControlBuilder
 The edge builder to use.
bool myHaveWarnedAboutDeprecatedDetEntry
bool myHaveWarnedAboutDeprecatedDetExit
bool myHaveWarnedAboutDeprecatedDistrict
bool myHaveWarnedAboutDeprecatedDSink
bool myHaveWarnedAboutDeprecatedDSource
bool myHaveWarnedAboutDeprecatedE1
bool myHaveWarnedAboutDeprecatedE2
bool myHaveWarnedAboutDeprecatedE3
bool myHaveWarnedAboutDeprecatedEdgeMean
bool myHaveWarnedAboutDeprecatedJamDistThreshold
bool myHaveWarnedAboutDeprecatedLaneMean
bool myHaveWarnedAboutDeprecatedLanes
bool myHaveWarnedAboutDeprecatedRouteProbe
bool myHaveWarnedAboutDeprecatedRowLogic
bool myHaveWarnedAboutDeprecatedSpeedThreshold
bool myHaveWarnedAboutDeprecatedTimedEvent
bool myHaveWarnedAboutDeprecatedTimeThreshold
bool myHaveWarnedAboutDeprecatedTLLogic
bool myHaveWarnedAboutDeprecatedTLSTiming
bool myHaveWarnedAboutDeprecatedVTypeProbe
bool myHaveWarnedAboutDeprecatedVTypes
NLJunctionControlBuildermyJunctionControlBuilder
 The junction builder to use.
SUMOTime myLastDepart
 The insertion time of the vehicle read last.
MSNetmyNet
 The net to fill (preinitialised)
Position myNetworkOffset
 The network offset.
Boundary myOrigBoundary
 The network's boundaries.
SUMOReal myScale
 The scaling factor (especially for inc-dua)
NLSucceedingLaneBuilder mySucceedingLaneBuilder
 The lane-to-lane connections builder to use.
NLTriggerBuildermyTriggerBuilder
 The trigger builder to use.
SUMOVehicleParametermyVehicleParameter
 Parameter of the current vehicle, trip, person, or flow.

Private Member Functions

void addConnection (const SUMOSAXAttributes &attrs)
 adds a connection
void addDistrict (const SUMOSAXAttributes &attrs)
void addDistrictEdge (const SUMOSAXAttributes &attrs, bool isSource)
void addLane (const SUMOSAXAttributes &attrs)
 adds a lane to the previously opened edge
void addLogicItem (const SUMOSAXAttributes &attrs)
 (deprecated) adds a logic item to the current logic
void addPhase (const SUMOSAXAttributes &attrs)
 adds a phase to the traffic lights logic currently build
void addPOI (const SUMOSAXAttributes &attrs)
 adds a polygon
void addPoly (const SUMOSAXAttributes &attrs)
 adds a polygon
void addRequest (const SUMOSAXAttributes &attrs)
 adds a request item to the current junction logic
void addSuccLane (const SUMOSAXAttributes &attrs)
 adds a succeeding lane (deprecated, see addConnection)
void addWAUTJunction (const SUMOSAXAttributes &attrs)
void addWAUTSwitch (const SUMOSAXAttributes &attrs)
void beginEdgeParsing (const SUMOSAXAttributes &attrs)
 begins the processing of an edge
void closeSuccLane ()
 closes the processing of a lane
void closeWAUT ()
std::pair< MSLane *, MSLane * > getLanesFromIndices (MSEdge *from, MSEdge *to, const std::string &laneIndices, bool &ok)
 retrieves <fromLane, toLane> based on the edges and an index specifier (i.e. '0:1')
void initJunctionLogic (const SUMOSAXAttributes &attrs)
 begins the reading of a junction row logic
void initTrafficLightLogic (const SUMOSAXAttributes &attrs)
 begins the reading of a traffic lights logic
 NLHandler (const NLHandler &s)
virtual void openJunction (const SUMOSAXAttributes &attrs)
 opens a junction for processing
void openSucc (const SUMOSAXAttributes &attrs)
 opens the container of succeeding lanes for processing (deprecated, see addConnection))
virtual void openWAUT (const SUMOSAXAttributes &attrs)
NLHandleroperator= (const NLHandler &s)
void parseLanes (const std::string &junctionID, const std::string &def, std::vector< MSLane * > &into, bool &ok)
LinkDirection parseLinkDir (const std::string &dir)
 Parses the given character into an enumeration typed link direction.
LinkState parseLinkState (const std::string &state)
 Parses the given character into an enumeration typed link state.
void setLocation (const SUMOSAXAttributes &attrs)
 Parses network location description.

Detailed Description

Definition at line 71 of file NLHandler.h.

Member Typedef Documentation

typedef std::vector<MSLane*> NLHandler::LaneVector

Definition of a lane vector.

Definition at line 74 of file NLHandler.h.

Constructor & Destructor Documentation

NLHandler::NLHandler ( const std::string &  file,
MSNet net,
NLDetectorBuilder detBuilder,
NLTriggerBuilder triggerBuilder,
NLEdgeControlBuilder edgeBuilder,
NLJunctionControlBuilder junctionBuilder 
)

Constructor.

Parameters
[in]fileName of the parsed file
[in,out]netThe network to fill
[in]detBuilderThe detector builder to use
[in]triggerBuilderThe trigger builder to use
[in]edgeBuilderThe builder of edges to use
[in]junctionBuilderThe builder of junctions to use

Definition at line 70 of file NLHandler.cpp.

NLHandler::~NLHandler ( )
virtual

Destructor.

Definition at line 103 of file NLHandler.cpp.

NLHandler::NLHandler ( const NLHandler s)
private

invalid copy constructor

Member Function Documentation

void NLHandler::addDistrict ( const SUMOSAXAttributes attrs)
private

Parses a district and creates a pseudo edge for it

Called on the occurence of a "district" element, this method retrieves the id of the district and creates a district type edge with this id.

Parameters
[in]attrsThe attributes (of the "district"-element) to parse
Exceptions
ProcessErrorIf an edge given in district is not known

Definition at line 1348 of file NLHandler.cpp.

References MSEdge::addFollower(), NLEdgeControlBuilder::buildEdge(), MSEdge::dictionary(), MSEdge::EDGEFUNCTION_DISTRICT, SUMOSAXAttributes::getString(), SUMOSAXAttributes::getStringReporting(), SUMOSAXAttributes::hasAttribute(), MSEdge::initialize(), myCurrentDistrictID, myCurrentIsBroken, myEdgeControlBuilder, SUMO_ATTR_EDGES, SUMO_ATTR_ID, and WRITE_ERROR.

Referenced by myStartElement().

void NLHandler::addDistrictEdge ( const SUMOSAXAttributes attrs,
bool  isSource 
)
private

Parses a district edge and connects it to the district

Called on the occurence of a "dsource" or "dsink" element, this method retrieves the id of the approachable edge. If this edge is known and valid, the approaching edge is informed about it.

Parameters
[in]attrsThe attributes to parse
[in]isSourcewhether a "dsource or a "dsink" was given
Todo:
No exception?

Definition at line 1390 of file NLHandler.cpp.

References MSEdge::addFollower(), MSEdge::dictionary(), SUMOSAXAttributes::getStringReporting(), myCurrentDistrictID, myCurrentIsBroken, SUMO_ATTR_ID, and WRITE_ERROR.

Referenced by myStartElement().

void NLHandler::addE3Entry ( const SUMOSAXAttributes attrs)
protected
void NLHandler::addE3Exit ( const SUMOSAXAttributes attrs)
protected
void NLHandler::addInstantE1Detector ( const SUMOSAXAttributes attrs)
protectedvirtual
void NLHandler::addParam ( const SUMOSAXAttributes attrs)
protected
void NLHandler::addRouteProbeDetector ( const SUMOSAXAttributes attrs)
protectedvirtual
void NLHandler::addVTypeProbeDetector ( const SUMOSAXAttributes attrs)
protectedvirtual
std::string GenericSAXHandler::buildErrorMessage ( const SAXParseException &  exception)
protectedinherited

Builds an error message.

The error message includes the file name and the line/column information as supported by the given SAXParseException

Parameters
[in]exceptionThe name of the currently processed file
Returns
A string describing the given exception

Definition at line 193 of file GenericSAXHandler.cpp.

References GenericSAXHandler::getFileName().

Referenced by GenericSAXHandler::error(), GenericSAXHandler::fatalError(), and GenericSAXHandler::warning().

void GenericSAXHandler::characters ( const XMLCh *const  chars,
const XERCES3_SIZE_t  length 
)
inherited

The inherited method called when characters occured.

The retrieved characters are converted into a string and appended into a private buffer. They are reported as soon as the element ends.

Todo:

recheck/describe what happens with characters when a new element is opened

describe characters processing in the class' head

Definition at line 176 of file GenericSAXHandler.cpp.

References GenericSAXHandler::myCharactersVector.

bool SUMORouteHandler::checkLastDepart ( )
protectedinherited
bool SUMORouteHandler::checkStopPos ( SUMOReal startPos,
SUMOReal endPos,
const SUMOReal  laneLength,
const SUMOReal  minLength,
const bool  friendlyPos 
)
inherited

check start and end position of a stop

Definition at line 178 of file SUMORouteHandler.cpp.

Referenced by MSRouteHandler::addStop().

void NLHandler::closeEdge ( )
protectedvirtual

Closes the process of building an edge.

Definition at line 431 of file NLHandler.cpp.

References NLEdgeControlBuilder::closeEdge(), MSEdge::dictionary(), MSEdge::getID(), myCurrentIsBroken, myCurrentIsInternalToSkip, myEdgeControlBuilder, and WRITE_ERROR.

Referenced by myEndElement().

void MSRouteHandler::closeRoute ( )
protectedvirtualinherited
void MSRouteHandler::closeRouteDistribution ( )
protectedvirtualinherited
void NLHandler::closeSuccLane ( )
private

closes the processing of a lane

Definition at line 1415 of file NLHandler.cpp.

References NLSucceedingLaneBuilder::closeSuccLane(), myCurrentIsInternalToSkip, mySucceedingLaneBuilder, and WRITE_ERROR.

Referenced by myEndElement().

void MSRouteHandler::closeVehicleTypeDistribution ( )
protectedvirtualinherited
void NLHandler::endE3Detector ( )
protectedvirtual

Builds of an e3 detector using collected values.

Definition at line 1429 of file NLHandler.cpp.

References NLDetectorBuilder::endE3Detector(), myDetectorBuilder, and WRITE_ERROR.

Referenced by myEndElement().

void GenericSAXHandler::endElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname 
)
inherited

The inherited method called when a tag is being closed.

This method calls the user-implemented methods myCharacters with the previously collected and converted characters.

Then, myEndElement is called, supplying it the qname converted to its enum- and string-representations.

Todo:

recheck/describe encoding of the string-representation

do not generate and report the string-representation

Definition at line 126 of file GenericSAXHandler.cpp.

References GenericSAXHandler::convertTag(), GenericSAXHandler::myCharacters(), GenericSAXHandler::myCharactersVector, GenericSAXHandler::myEndElement(), GenericSAXHandler::myParentHandler, GenericSAXHandler::myParentIndicator, XMLSubSys::setHandler(), SUMO_TAG_INCLUDE, and SUMO_TAG_NOTHING.

void GenericSAXHandler::error ( const SAXParseException &  exception)
inherited

Handler for XML-errors.

The message is built using buildErrorMessage and thrown within a ProcessError.

Parameters
[in]exceptionThe occured exception to process
Exceptions
ProcessErrorOn any call

Definition at line 212 of file GenericSAXHandler.cpp.

References GenericSAXHandler::buildErrorMessage().

Referenced by getLanesFromIndices().

void GenericSAXHandler::fatalError ( const SAXParseException &  exception)
inherited

Handler for XML-errors.

The message is built using buildErrorMessage and thrown within a ProcessError.

Exceptions
ProcessErrorOn any call
Parameters
[in]exceptionThe occured exception to process

Definition at line 218 of file GenericSAXHandler.cpp.

References GenericSAXHandler::buildErrorMessage().

std::pair< MSLane *, MSLane * > NLHandler::getLanesFromIndices ( MSEdge from,
MSEdge to,
const std::string &  laneIndices,
bool ok 
)
private

retrieves <fromLane, toLane> based on the edges and an index specifier (i.e. '0:1')

Definition at line 1299 of file NLHandler.cpp.

References GenericSAXHandler::error(), MSEdge::getID(), MSEdge::getLanes(), StringTokenizer::next(), StringTokenizer::size(), and WRITE_ERROR.

Referenced by addConnection().

SUMOTime SUMORouteHandler::getLastDepart ( ) const
inherited

Returns the last loaded depart time.

Definition at line 67 of file SUMORouteHandler.cpp.

References SUMORouteHandler::myLastDepart.

void NLHandler::initJunctionLogic ( const SUMOSAXAttributes attrs)
private

begins the reading of a junction row logic

Definition at line 748 of file NLHandler.cpp.

References SUMOSAXAttributes::getStringReporting(), NLJunctionControlBuilder::initJunctionLogic(), myCurrentIsBroken, myJunctionControlBuilder, and SUMO_ATTR_ID.

Referenced by myStartElement().

void GenericSAXHandler::myCharacters ( int  element,
const std::string &  chars 
)
protectedvirtualinherited

Callback method for characters to implement by derived classes.

Called by "endElement" (see there).

Parameters
[in]elementThe opened element, given as a int
[in]charsThe complete embedded character string ProcessError These method may throw a ProcessError if something fails

Reimplemented in NIImporter_OpenDrive, NIImporter_SUMO, PCNetProjectionLoader, NIImporter_ITSUMO::Handler, PCLoaderXML, RORDLoader_SUMOBase, and ROJTRTurnDefLoader.

Definition at line 228 of file GenericSAXHandler.cpp.

Referenced by GenericSAXHandler::endElement().

void NLHandler::myStartElement ( int  element,
const SUMOSAXAttributes attrs 
)
protectedvirtual

Called on the opening of a tag;.

Parameters
[in]elementID of the currently opened element
[in]attrsAttributes within the currently opened element
Exceptions
ProcessErrorIf something fails
See Also
GenericSAXHandler::myStartElement
Todo:
Refactor/describe

Reimplemented from MSRouteHandler.

Definition at line 107 of file NLHandler.cpp.

References NLDiscreteEventBuilder::addAction(), addConnection(), addDistrict(), addDistrictEdge(), addE1Detector(), addE2Detector(), addE3Entry(), addE3Exit(), addEdgeLaneMeanData(), addInstantE1Detector(), addLane(), addLogicItem(), addParam(), addPhase(), addPOI(), addPoly(), addRequest(), addRouteProbeDetector(), addSuccLane(), addVTypeProbeDetector(), addWAUTJunction(), addWAUTSwitch(), beginE3Detector(), beginEdgeParsing(), NLTriggerBuilder::buildVaporizer(), GenericSAXHandler::getFileName(), initJunctionLogic(), initTrafficLightLogic(), myActionBuilder, myHaveWarnedAboutDeprecatedDetEntry, myHaveWarnedAboutDeprecatedDetExit, myHaveWarnedAboutDeprecatedDistrict, myHaveWarnedAboutDeprecatedDSink, myHaveWarnedAboutDeprecatedDSource, myHaveWarnedAboutDeprecatedE1, myHaveWarnedAboutDeprecatedE2, myHaveWarnedAboutDeprecatedE3, myHaveWarnedAboutDeprecatedEdgeMean, myHaveWarnedAboutDeprecatedLaneMean, myHaveWarnedAboutDeprecatedRouteProbe, myHaveWarnedAboutDeprecatedRowLogic, myHaveWarnedAboutDeprecatedTimedEvent, myHaveWarnedAboutDeprecatedTLLogic, myHaveWarnedAboutDeprecatedVTypeProbe, myNet, myTriggerBuilder, openJunction(), openSucc(), openWAUT(), NLTriggerBuilder::parseAndBuildBusStop(), NLTriggerBuilder::parseAndBuildLaneSpeedTrigger(), NLTriggerBuilder::parseAndBuildRerouter(), setLocation(), SUMO_TAG_BUS_STOP, SUMO_TAG_CALIBRATOR, SUMO_TAG_CONNECTION, SUMO_TAG_DET_ENTRY, SUMO_TAG_DET_ENTRY__DEPRECATED, SUMO_TAG_DET_EXIT, SUMO_TAG_DET_EXIT__DEPRECATED, SUMO_TAG_DISTRICT__DEPRECATED, SUMO_TAG_DSINK__DEPRECATED, SUMO_TAG_DSOURCE__DEPRECATED, SUMO_TAG_E1DETECTOR, SUMO_TAG_E1DETECTOR__DEPRECATED, SUMO_TAG_E2DETECTOR, SUMO_TAG_E2DETECTOR__DEPRECATED, SUMO_TAG_E3DETECTOR, SUMO_TAG_E3DETECTOR__DEPRECATED, SUMO_TAG_EDGE, SUMO_TAG_ENTRY_EXIT_DETECTOR, SUMO_TAG_INDUCTION_LOOP, SUMO_TAG_INSTANT_INDUCTION_LOOP, SUMO_TAG_JUNCTION, SUMO_TAG_LANE, SUMO_TAG_LANE_AREA_DETECTOR, SUMO_TAG_LOCATION, SUMO_TAG_LOGICITEM, SUMO_TAG_MEANDATA_EDGE, SUMO_TAG_MEANDATA_EDGE__DEPRECATED, SUMO_TAG_MEANDATA_LANE, SUMO_TAG_MEANDATA_LANE__DEPRECATED, SUMO_TAG_PARAM, SUMO_TAG_PHASE, SUMO_TAG_POI, SUMO_TAG_POLY, SUMO_TAG_REQUEST, SUMO_TAG_REROUTER, SUMO_TAG_ROUTEPROBE, SUMO_TAG_ROUTEPROBE__DEPRECATED, SUMO_TAG_ROWLOGIC__DEPRECATED, SUMO_TAG_SUCC, SUMO_TAG_SUCCLANE, SUMO_TAG_TAZ, SUMO_TAG_TAZSINK, SUMO_TAG_TAZSOURCE, SUMO_TAG_TIMEDEVENT, SUMO_TAG_TIMEDEVENT__DEPRECATED, SUMO_TAG_TLLOGIC, SUMO_TAG_TLLOGIC__DEPRECATED, SUMO_TAG_VAPORIZER, SUMO_TAG_VSS, SUMO_TAG_VTYPEPROBE, SUMO_TAG_VTYPEPROBE__DEPRECATED, SUMO_TAG_WAUT, SUMO_TAG_WAUT_JUNCTION, SUMO_TAG_WAUT_SWITCH, toString(), WRITE_ERROR, and WRITE_WARNING.

void NLHandler::openSucc ( const SUMOSAXAttributes attrs)
private

opens the container of succeeding lanes for processing (deprecated, see addConnection))

Definition at line 1106 of file NLHandler.cpp.

References SUMOSAXAttributes::getStringReporting(), MSGlobals::gUsingInternalLanes, myCurrentIsInternalToSkip, mySucceedingLaneBuilder, NLSucceedingLaneBuilder::openSuccLane(), and SUMO_ATTR_LANE.

Referenced by myStartElement().

NLHandler& NLHandler::operator= ( const NLHandler s)
private

invalid assignment operator

void NLHandler::parseLanes ( const std::string &  junctionID,
const std::string &  def,
std::vector< MSLane * > &  into,
bool ok 
)
private
LinkDirection NLHandler::parseLinkDir ( const std::string &  dir)
private

Parses the given character into an enumeration typed link direction.

Definition at line 1274 of file NLHandler.cpp.

References StringBijection< T >::get(), and SUMOXMLDefinitions::LinkDirections.

Referenced by addConnection(), and addSuccLane().

LinkState NLHandler::parseLinkState ( const std::string &  state)
private

Parses the given character into an enumeration typed link state.

Definition at line 1284 of file NLHandler.cpp.

References StringBijection< T >::get(), LINKSTATE_TL_OFF_BLINKING, and SUMOXMLDefinitions::LinkStates.

Referenced by addConnection(), and addSuccLane().

void SUMORouteHandler::registerLastDepart ( )
protectedinherited
void GenericSAXHandler::registerParent ( const int  tag,
GenericSAXHandler handler 
)
inherited

Assigning a parent handler which is enabled when the specified tag is closed.

Definition at line 168 of file GenericSAXHandler.cpp.

References GenericSAXHandler::myParentHandler, GenericSAXHandler::myParentIndicator, and XMLSubSys::setHandler().

Referenced by NLTriggerBuilder::parseAndBuildLaneSpeedTrigger(), and NLTriggerBuilder::parseAndBuildRerouter().

void GenericSAXHandler::setFileName ( const std::string &  name)
inherited
void GenericSAXHandler::startElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname,
const Attributes &  attrs 
)
inherited

The inherited method called when a new tag opens.

The method parses the supplied XMLCh*-qname using the internal name/enum-map to obtain the enum representation of the attribute name.

Then, "myStartElement" is called supplying the enumeration value, the string-representation of the name and the attributes.

Todo:

recheck/describe encoding of the string-representation

do not generate and report the string-representation

Definition at line 105 of file GenericSAXHandler.cpp.

References GenericSAXHandler::convertTag(), FileHelpers::getConfigurationRelative(), GenericSAXHandler::getFileName(), SUMOSAXAttributesImpl_Xerces::getString(), FileHelpers::isAbsolute(), GenericSAXHandler::myCharactersVector, GenericSAXHandler::myPredefinedTags, GenericSAXHandler::myPredefinedTagsMML, GenericSAXHandler::myStartElement(), XMLSubSys::runParser(), SUMO_ATTR_HREF, and SUMO_TAG_INCLUDE.

void GenericSAXHandler::warning ( const SAXParseException &  exception)
inherited

Handler for XML-warnings.

The message is built using buildErrorMessage and reported to the warning-instance of the MsgHandler.

Parameters
[in]exceptionThe occured exception to process

Definition at line 206 of file GenericSAXHandler.cpp.

References GenericSAXHandler::buildErrorMessage(), and WRITE_WARNING.

Field Documentation

NLDiscreteEventBuilder NLHandler::myActionBuilder
protected

A builder for object actions.

Definition at line 281 of file NLHandler.h.

Referenced by myStartElement().

MSPerson::MSPersonPlan* MSRouteHandler::myActivePlan
protectedinherited

The plan of the current person.

Definition at line 133 of file MSRouteHandler.h.

Referenced by MSRouteHandler::addStop(), MSRouteHandler::closePerson(), and MSRouteHandler::myStartElement().

MSEdgeVector MSRouteHandler::myActiveRoute
protectedinherited
RGBColor SUMORouteHandler::myActiveRouteColor
protectedinherited

The currently parsed route's color.

Definition at line 147 of file SUMORouteHandler.h.

Referenced by MSRouteHandler::closeRoute(), and MSRouteHandler::openRoute().

std::string SUMORouteHandler::myActiveRouteID
protectedinherited
SUMOReal SUMORouteHandler::myActiveRouteProbability
protectedinherited

The id of the current route.

Definition at line 144 of file SUMORouteHandler.h.

Referenced by MSRouteHandler::closeRoute(), and MSRouteHandler::openRoute().

std::string SUMORouteHandler::myActiveRouteRefID
protectedinherited

The id of the route the current route references to.

Definition at line 141 of file SUMORouteHandler.h.

Referenced by MSRouteHandler::closeRoute(), and MSRouteHandler::openRoute().

std::vector<SUMOVehicleParameter::Stop> SUMORouteHandler::myActiveRouteStops
protectedinherited

List of the stops on the parsed route.

Definition at line 150 of file SUMORouteHandler.h.

Referenced by MSRouteHandler::addStop(), and MSRouteHandler::closeRoute().

bool MSRouteHandler::myAddVehiclesDirectly
protectedinherited

Information whether vehicles shall be directly added to the network or kept within the buffer.

Definition at line 136 of file MSRouteHandler.h.

Referenced by MSRouteHandler::closeFlow(), MSRouteHandler::closePerson(), and MSRouteHandler::closeVehicle().

bool NLHandler::myAmInTLLogicMode
protected

internal information whether a tls-logic is currently read

Definition at line 308 of file NLHandler.h.

Referenced by addParam(), initTrafficLightLogic(), and myEndElement().

Boundary NLHandler::myConvBoundary
protected

Definition at line 317 of file NLHandler.h.

std::string NLHandler::myCurrentDistrictID
protected

The id of the current district.

Definition at line 305 of file NLHandler.h.

Referenced by addDistrict(), and addDistrictEdge().

bool NLHandler::myCurrentIsInternalToSkip
protected

Information whether the currently parsed edge is internal and not wished, here.

Definition at line 284 of file NLHandler.h.

Referenced by addLane(), addSuccLane(), beginEdgeParsing(), closeEdge(), closeSuccLane(), and openSucc().

RandomDistributor<const MSRoute*>* MSRouteHandler::myCurrentRouteDistribution
protectedinherited

The currently parsed distribution of routes (probability->route)

Definition at line 145 of file MSRouteHandler.h.

Referenced by MSRouteHandler::closeRoute(), MSRouteHandler::closeRouteDistribution(), MSRouteHandler::openRoute(), and MSRouteHandler::openRouteDistribution().

std::string MSRouteHandler::myCurrentRouteDistributionID
protectedinherited

The id of the currently parsed route distribution.

Definition at line 148 of file MSRouteHandler.h.

Referenced by MSRouteHandler::closeRouteDistribution(), MSRouteHandler::openRoute(), and MSRouteHandler::openRouteDistribution().

SUMOVTypeParameter* SUMORouteHandler::myCurrentVType
protectedinherited
RandomDistributor<MSVehicleType*>* MSRouteHandler::myCurrentVTypeDistribution
protectedinherited

The currently parsed distribution of vehicle types (probability->vehicle type)

Definition at line 139 of file MSRouteHandler.h.

Referenced by MSRouteHandler::closeVehicleTypeDistribution(), MSRouteHandler::myEndElement(), and MSRouteHandler::openVehicleTypeDistribution().

std::string MSRouteHandler::myCurrentVTypeDistributionID
protectedinherited

The id of the currently parsed vehicle type distribution.

Definition at line 142 of file MSRouteHandler.h.

Referenced by MSRouteHandler::closeVehicleTypeDistribution(), and MSRouteHandler::openVehicleTypeDistribution().

std::string NLHandler::myCurrentWAUTID
protected

The id of the currently processed WAUT.

Definition at line 311 of file NLHandler.h.

Referenced by addWAUTSwitch(), closeWAUT(), and openWAUT().

NLDetectorBuilder& NLHandler::myDetectorBuilder
protected
NLEdgeControlBuilder& NLHandler::myEdgeControlBuilder
protected

The edge builder to use.

Definition at line 294 of file NLHandler.h.

Referenced by addDistrict(), addLane(), beginEdgeParsing(), and closeEdge().

bool NLHandler::myHaveWarnedAboutDeprecatedDetEntry
protected

Definition at line 321 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedDetExit
protected

Definition at line 321 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedDistrict
protected

Definition at line 332 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedDSink
protected

Definition at line 332 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedDSource
protected

Definition at line 332 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedE1
protected

Definition at line 321 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedE2
protected

Definition at line 321 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedE3
protected

Definition at line 321 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedEdgeMean
protected

Definition at line 329 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedJamDistThreshold
protected

Definition at line 326 of file NLHandler.h.

bool NLHandler::myHaveWarnedAboutDeprecatedLaneMean
protected

Definition at line 329 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedLanes
protected

Definition at line 331 of file NLHandler.h.

Referenced by addConnection().

bool NLHandler::myHaveWarnedAboutDeprecatedRouteProbe
protected

Definition at line 329 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedRowLogic
protected

Definition at line 324 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedSpeedThreshold
protected

Definition at line 326 of file NLHandler.h.

Referenced by beginE3Detector().

bool NLHandler::myHaveWarnedAboutDeprecatedTimedEvent
protected

Definition at line 321 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedTimeThreshold
protected

Definition at line 326 of file NLHandler.h.

Referenced by beginE3Detector().

bool NLHandler::myHaveWarnedAboutDeprecatedTLLogic
protected

Definition at line 324 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedTLSTiming
protected

Definition at line 325 of file NLHandler.h.

Referenced by addPhase().

bool NLHandler::myHaveWarnedAboutDeprecatedVTypeProbe
protected

Definition at line 329 of file NLHandler.h.

Referenced by myStartElement().

bool NLHandler::myHaveWarnedAboutDeprecatedVTypes
protected

Definition at line 331 of file NLHandler.h.

Referenced by addEdgeLaneMeanData().

SUMOTime SUMORouteHandler::myLastDepart
protectedinherited

The insertion time of the vehicle read last.

Definition at line 135 of file SUMORouteHandler.h.

Referenced by SUMORouteHandler::checkLastDepart(), SUMORouteHandler::getLastDepart(), and SUMORouteHandler::registerLastDepart().

MSNet& NLHandler::myNet
protected

The net to fill (preinitialised)

Definition at line 181 of file NLHandler.h.

Referenced by addPOI(), addPoly(), and myStartElement().

Position NLHandler::myNetworkOffset
protected

The network offset.

Definition at line 314 of file NLHandler.h.

Boundary NLHandler::myOrigBoundary
protected

The network's boundaries.

Definition at line 317 of file NLHandler.h.

SUMOReal MSRouteHandler::myScale
protectedinherited

The scaling factor (especially for inc-dua)

Definition at line 151 of file MSRouteHandler.h.

Referenced by MSRouteHandler::closeVehicle(), and MSRouteHandler::MSRouteHandler().

NLSucceedingLaneBuilder NLHandler::mySucceedingLaneBuilder
protected

The lane-to-lane connections builder to use.

Definition at line 300 of file NLHandler.h.

Referenced by addSuccLane(), closeSuccLane(), and openSucc().

NLTriggerBuilder& NLHandler::myTriggerBuilder
protected

The trigger builder to use.

Definition at line 291 of file NLHandler.h.

Referenced by myStartElement().


The documentation for this class was generated from the following files: