#include <GUILaneSpeedTrigger.h>

This is the gui-version of the MSLaneSpeedTrigger-object
Definition at line 60 of file GUILaneSpeedTrigger.h.
Public Member Functions | |
| virtual bool | active () const throw () |
| Returns the information whether this object is still active. | |
| void | characters (const XMLCh *const chars, const XERCES3_SIZE_t length) |
| The inherited method called when characters occured. | |
| void | drawGLName (const Position2D &p, const std::string &id, SUMOReal nameScale) const |
| void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) |
| The inherited method called when a tag is being closed. | |
| SUMOTime | execute (SUMOTime currentTime) throw (ProcessError) |
| SUMOReal | getCurrentSpeed () const |
| Returns the current speed. | |
| SUMOReal | getDefaultSpeed () const |
| const std::string & | getFileName () const throw () |
| returns the current file name | |
| const std::string & | getID () const throw () |
| Returns the id. | |
| SUMOReal | getLoadedSpeed () |
| GUILaneSpeedTrigger (const std::string &id, const std::vector< MSLane * > &destLanes, const std::string &file) throw (ProcessError) | |
| Constructor. | |
| GUIManipulator * | openManipulator (GUIMainWindow &app, GUISUMOAbstractView &parent) |
| SUMOTime | processCommand (bool move2next, SUMOTime currentTime) |
| void | registerParent (const SumoXMLTag tag, GenericSAXHandler *handler) |
| Assigning a parent handler which is enabled when the specified tag is closed. | |
| void | setFileName (const std::string &name) throw () |
| Sets the current file name. | |
| void | setOverriding (bool val) |
| void | setOverridingValue (SUMOReal val) |
| 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. | |
| ~GUILaneSpeedTrigger () throw () | |
inherited from GUIGlObject | |
| void | drawGL (const GUIVisualizationSettings &s) const throw () |
| Draws the object. | |
| Boundary | getCenteringBoundary () const throw () |
| Returns the boundary to which the view shall be centered in order to show the object. | |
| const std::string & | getMicrosimID () const throw () |
| Returns the id of the object as known to microsim. | |
| GUIParameterTableWindow * | getParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent) throw () |
| Returns an own parameter window. | |
| GUIGLObjectPopupMenu * | getPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent) throw () |
| Returns an own popup-menu. | |
SAX ErrorHandler callbacks | |
| void | error (const SAXParseException &exception) throw (ProcessError) |
| Handler for XML-errors. | |
| void | fatalError (const SAXParseException &exception) throw (ProcessError) |
| Handler for XML-errors. | |
| void | warning (const SAXParseException &exception) throw () |
| Handler for XML-warnings. | |
Atomar getter methods | |
| const std::string & | getFullName () const throw () |
| Returns the full name appearing in the tool tip. | |
| GLuint | getGlID () const throw () |
| Returns the numerical id of the object. | |
inherited from GUIGlObject | |
| GUIGlObjectType | getType () const throw () |
| Returns the type of the object as coded in GUIGlObjectType. | |
Static Public Member Functions | |
| static void | clearDictionary () |
| Clears the dictionary (the objects will not be deleted). | |
| static GUIGlObject_AbstractAdd * | get (const std::string &name) |
| Returns a named object. | |
| static std::vector< GLuint > | getIDList () |
| Returns the list of gl-ids of all additional objects. | |
| static const std::vector < GUIGlObject_AbstractAdd * > & | getObjectList () |
| Returns the list of all additional objects. | |
Protected Member Functions | |
| std::string | buildErrorMessage (const SAXParseException &exception) throw () |
| Builds an error message. | |
| virtual void | myCharacters (SumoXMLTag element, const std::string &chars) throw (ProcessError) |
| Callback method for characters to implement by derived classes. | |
helper methods for building popup-menus | |
| void | buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to center to the object. | |
| void | buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds entries which allow to copy the name / typed name into the clipboard. | |
| void | buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true) throw () |
| Builds the header. | |
| void | buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to copy the cursor position. | |
| void | buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to (de)select the object. | |
| void | buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to open the manipulator window. | |
| void | buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to open the parameter window. | |
inherited from GenericSAXHandler | |
| virtual void | myEndElement (SumoXMLTag element) throw (ProcessError) |
| Called on the closing of a tag;. | |
| virtual void | myStartElement (SumoXMLTag element, const SUMOSAXAttributes &attrs) throw (ProcessError) |
| Called on the opening of a tag;. | |
Protected Attributes | |
| bool | myAmOverriding |
| The information whether the read speed shall be overridden. | |
| std::vector< std::pair < SUMOTime, SUMOReal > >::iterator | myCurrentEntry |
| SUMOReal | myCurrentSpeed |
| SUMOReal | myDefaultSpeed |
| The original speed allowed on the lanes. | |
| std::vector< MSLane * > | myDestLanes |
| GUIGlObjectType | myGlType |
| The object's type. | |
| std::string | myID |
| The name of the object. | |
| std::vector< std::pair < SUMOTime, SUMOReal > > | myLoadedSpeeds |
| SUMOReal | mySpeedOverrideValue |
| The speed to use if overriding the read speed. | |
Static Protected Attributes | |
| static std::vector < GUIGlObject_AbstractAdd * > | myObjectList |
| The list of all addtional objects currently loaded. | |
| static std::map< std::string, GUIGlObject_AbstractAdd * > | myObjects |
| Map from names of loaded additional objects to the objects themselves. | |
Private Types | |
| typedef std::vector< Position2D > | PosCont |
| Definition of a positions container. | |
| typedef std::vector< SUMOReal > | RotCont |
| Definition of a rotation container. | |
Private Attributes | |
| Boundary | myBoundary |
| The boundary of this rerouter. | |
| PosCont | myFGPositions |
| The positions in full-geometry mode. | |
| RotCont | myFGRotations |
| The rotations in full-geometry mode. | |
| SUMOReal | myLastValue |
| Storage for last value to avoid string recomputation. | |
| std::string | myLastValueString |
| Storage for speed string to avoid recomputation. | |
| bool | myShowAsKMH |
| The information whether the speed shall be shown in m/s or km/h. | |
Friends | |
| class | GUIGlObjectStorage |
| Needed to set the id. | |
Data Structures | |
| class | GUILaneSpeedTriggerPopupMenu |
| class | GUIManip_LaneSpeedTrigger |
typedef std::vector<Position2D> GUILaneSpeedTrigger::PosCont [private] |
typedef std::vector<SUMOReal> GUILaneSpeedTrigger::RotCont [private] |
| GUILaneSpeedTrigger::GUILaneSpeedTrigger | ( | const std::string & | id, | |
| const std::vector< MSLane * > & | destLanes, | |||
| const std::string & | file | |||
| ) | throw (ProcessError) |
Constructor.
| [in] | id | The id of the lane speed trigger |
| [in] | destLanes | List of lanes affected by this speed trigger |
| [in] | file | Name of the file to read the speeds to set from |
Definition at line 282 of file GUILaneSpeedTrigger.cpp.
References Boundary::add(), Position2DVector::getBegin(), Position2DVector::getEnd(), myBoundary, MSLaneSpeedTrigger::myDefaultSpeed, myFGPositions, myFGRotations, MSLaneSpeedTrigger::mySpeedOverrideValue, Position2DVector::positionAtLengthPosition(), and Position2DVector::rotationDegreeAtLengthPosition().
00285 : MSLaneSpeedTrigger(id, destLanes, aXMLFilename), 00286 GUIGlObject_AbstractAdd(GUIGlObjectStorage::gIDStorage, "speedtrigger:" + id, GLO_TRIGGER), 00287 myShowAsKMH(true), myLastValue(-1) { 00288 myFGPositions.reserve(destLanes.size()); 00289 myFGRotations.reserve(destLanes.size()); 00290 std::vector<MSLane*>::const_iterator i; 00291 for (i=destLanes.begin(); i!=destLanes.end(); ++i) { 00292 const Position2DVector &v = (*i)->getShape(); 00293 myFGPositions.push_back(v.positionAtLengthPosition(0)); 00294 myBoundary.add(v.positionAtLengthPosition(0)); 00295 Line2D l(v.getBegin(), v.getEnd()); 00296 myFGRotations.push_back(-v.rotationDegreeAtLengthPosition(0)); 00297 myDefaultSpeed = (*i)->getMaxSpeed(); 00298 mySpeedOverrideValue = (*i)->getMaxSpeed(); 00299 } 00300 }
| GUILaneSpeedTrigger::~GUILaneSpeedTrigger | ( | ) | throw () |
| virtual bool GUIGlObject::active | ( | ) | const throw () [inline, virtual, inherited] |
Returns the information whether this object is still active.
Reimplemented in GUIVehicle.
Definition at line 171 of file GUIGlObject.h.
Referenced by GLObjectValuePassConnector< std::pair< int, MSPhaseDefinition > >::updateEachTimestep().
| void GUIGlObject::buildCenterPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to center to the object.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 86 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_RECENTERVIEW, and MID_CENTER.
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon2D::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUINet::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00087 { 00088 new FXMenuCommand(ret, "Center", GUIIconSubSys::getIcon(ICON_RECENTERVIEW), ret, MID_CENTER); 00089 if (addSeparator) { 00090 new FXMenuSeparator(ret); 00091 } 00092 }
| std::string SUMOSAXHandler::buildErrorMessage | ( | const SAXParseException & | exception | ) | throw () [protected, inherited] |
Builds an error message.
The error message includes the file name and the line/column information as supported by the given SAXParseException
| [in] | exception | The name of the currently processed file |
Definition at line 55 of file SUMOSAXHandler.cpp.
References GenericSAXHandler::getFileName().
Referenced by SUMOSAXHandler::error(), SUMOSAXHandler::fatalError(), and SUMOSAXHandler::warning().
00055 { 00056 std::ostringstream buf; 00057 char *pMsg = XMLString::transcode(exception.getMessage()); 00058 buf << pMsg << std::endl; 00059 buf << " In file '" << getFileName() << "'" << std::endl; 00060 buf << " At line/column " << exception.getLineNumber()+1 00061 << '/' << exception.getColumnNumber() << "." << std::endl; 00062 XMLString::release(&pMsg); 00063 return buf.str(); 00064 }
| void GUIGlObject::buildNameCopyPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds entries which allow to copy the name / typed name into the clipboard.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 96 of file GUIGlObject.cpp.
References MID_COPY_NAME, and MID_COPY_TYPED_NAME.
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon2D::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00097 { 00098 new FXMenuCommand(ret, "Copy name to clipboard", 0, ret, MID_COPY_NAME); 00099 new FXMenuCommand(ret, "Copy typed name to clipboard", 0, ret, MID_COPY_TYPED_NAME); 00100 if (addSeparator) { 00101 new FXMenuSeparator(ret); 00102 } 00103 }
| void GUIGlObject::buildPopupHeader | ( | GUIGLObjectPopupMenu * | ret, | |
| GUIMainWindow & | app, | |||
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds the header.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 75 of file GUIGlObject.cpp.
References GUIGlObject::getFullName().
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon2D::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUINet::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00077 { 00078 new MFXMenuHeader(ret, app.getBoldFont(), getFullName().c_str(), 0, 0, 0); 00079 if (addSeparator) { 00080 new FXMenuSeparator(ret); 00081 } 00082 }
| void GUIGlObject::buildPositionCopyEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to copy the cursor position.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 131 of file GUIGlObject.cpp.
References MID_COPY_CURSOR_POSITION.
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon2D::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUINet::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00132 { 00133 new FXMenuCommand(ret, "Copy cursor position to clipboard", 0, ret, MID_COPY_CURSOR_POSITION); 00134 if (addSeparator) { 00135 new FXMenuSeparator(ret); 00136 } 00137 }
| void GUIGlObject::buildSelectionPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to (de)select the object.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 107 of file GUIGlObject.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObject::getType(), gSelected, ICON_FLAG_MINUS, ICON_FLAG_PLUS, GUISelectedStorage::isSelected(), MID_ADDSELECT, and MID_REMOVESELECT.
Referenced by GUIVehicle::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon2D::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIEmitter::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIDetectorWrapper::getPopUpMenu(), and GUIBusStop::getPopUpMenu().
00108 { 00109 if (gSelected.isSelected(getType(), getGlID())) { 00110 new FXMenuCommand(ret, "Remove From Selected", GUIIconSubSys::getIcon(ICON_FLAG_MINUS), ret, MID_REMOVESELECT); 00111 } else { 00112 new FXMenuCommand(ret, "Add To Selected", GUIIconSubSys::getIcon(ICON_FLAG_PLUS), ret, MID_ADDSELECT); 00113 } 00114 if (addSeparator) { 00115 new FXMenuSeparator(ret); 00116 } 00117 }
| void GUIGlObject::buildShowManipulatorPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to open the manipulator window.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 141 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.
Referenced by GUITriggeredRerouter::getPopUpMenu(), getPopUpMenu(), and GUIEmitter::getPopUpMenu().
00142 { 00143 new FXMenuCommand(ret, "Open Manipulator...", 00144 GUIIconSubSys::getIcon(ICON_MANIP), ret, MID_MANIP); 00145 if (addSeparator) { 00146 new FXMenuSeparator(ret); 00147 } 00148 }
| void GUIGlObject::buildShowParamsPopupEntry | ( | GUIGLObjectPopupMenu * | ret, | |
| bool | addSeparator = true | |||
| ) | throw () [protected, inherited] |
Builds an entry which allows to open the parameter window.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | app | The application, needed for callbacks |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 121 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWPARS.
Referenced by GUIVehicle::getPopUpMenu(), GUINet::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), getPopUpMenu(), GUIEdge::getPopUpMenu(), and GUIDetectorWrapper::getPopUpMenu().
00122 { 00123 new FXMenuCommand(ret, "Show Parameter", GUIIconSubSys::getIcon(ICON_APP_TABLE), ret, MID_SHOWPARS); 00124 if (addSeparator) { 00125 new FXMenuSeparator(ret); 00126 } 00127 }
| 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.
Definition at line 168 of file GenericSAXHandler.cpp.
References GenericSAXHandler::myCharactersVector.
00169 { 00170 myCharactersVector.push_back(TplConvert<XMLCh>::_2str(chars, length)); 00171 }
| void GUIGlObject_AbstractAdd::clearDictionary | ( | ) | [static, inherited] |
Clears the dictionary (the objects will not be deleted).
!! delete (*i).second;
Definition at line 82 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myObjectList, and GUIGlObject_AbstractAdd::myObjects.
Referenced by GUINet::~GUINet().
00082 { 00083 std::map<std::string, GUIGlObject_AbstractAdd*>::iterator i; 00084 for (i=myObjects.begin(); i!=myObjects.end(); i++) { 00086 } 00087 myObjects.clear(); 00088 myObjectList.clear(); 00089 }
| void GUILaneSpeedTrigger::drawGL | ( | const GUIVisualizationSettings & | s | ) | const throw () [virtual] |
Draws the object.
| [in] | s | The settings for the current view (may influence drawing) |
Implements GUIGlObject.
Definition at line 342 of file GUILaneSpeedTrigger.cpp.
References GLHelper::drawFilledCircle(), GUIGlObject_AbstractAdd::drawGLName(), getCenteringBoundary(), MSLaneSpeedTrigger::getCurrentSpeed(), GUIGlObject::getGlID(), getMicrosimID(), myFGPositions, myFGRotations, myLastValue, myLastValueString, myShowAsKMH, pfdkGetStringWidth(), pfDrawString(), pfSetPosition(), pfSetScale(), SUMOReal, Position2D::x(), and Position2D::y().
00342 { 00343 // (optional) set id 00344 if (s.needsGlID) { 00345 glPushName(getGlID()); 00346 } 00347 glTranslated(0, 0, -.03); 00348 for (size_t i=0; i<myFGPositions.size(); ++i) { 00349 const Position2D &pos = myFGPositions[i]; 00350 SUMOReal rot = myFGRotations[i]; 00351 glPushMatrix(); 00352 glScaled(s.addExaggeration, s.addExaggeration, 1); 00353 glTranslated(pos.x(), pos.y(), 0); 00354 glRotated(rot, 0, 0, 1); 00355 glTranslated(0, -1.5, 0); 00356 00357 int noPoints = 9; 00358 if (s.scale>25) { 00359 noPoints = (int)(9.0 + s.scale / 10.0); 00360 if (noPoints>36) { 00361 noPoints = 36; 00362 } 00363 } 00364 glColor3d(1, 0, 0); 00365 GLHelper::drawFilledCircle((SUMOReal) 1.3, noPoints); 00366 if (s.scale>=5) { 00367 glTranslated(0, 0, -.01); 00368 glColor3d(0, 0, 0); 00369 GLHelper::drawFilledCircle((SUMOReal) 1.1, noPoints); 00370 // draw the speed string 00371 // not if scale to low 00372 // compute 00373 SUMOReal value = (SUMOReal) getCurrentSpeed(); 00374 if (myShowAsKMH) { 00375 value *= 3.6f; 00376 if (((int) value+1)%10==0) { 00377 value = (SUMOReal)(((int) value+1) / 10 * 10); 00378 } 00379 } 00380 if (value!=myLastValue) { 00381 myLastValue = value; 00382 myLastValueString = toString<SUMOReal>(myLastValue); 00383 size_t idx = myLastValueString.find('.'); 00384 if (idx!=std::string::npos) { 00385 if (idx>myLastValueString.length()) { 00386 idx = myLastValueString.length(); 00387 } 00388 myLastValueString = myLastValueString.substr(0, idx); 00389 } 00390 } 00391 //draw 00392 glColor3d(1, 1, 0); 00393 glTranslated(0, 0, -.01); 00394 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 00395 pfSetPosition(0, 0); 00396 pfSetScale(1.2f); 00397 SUMOReal w = pfdkGetStringWidth(myLastValueString.c_str()); 00398 glRotated(180, 0, 1, 0); 00399 glTranslated(-w/2., 0.3, 0); 00400 pfDrawString(myLastValueString.c_str()); 00401 glTranslated(0, 0, -.02); 00402 } 00403 glPopMatrix(); 00404 } 00405 glTranslated(0, 0, .03); 00406 // (optional) draw name 00407 if (s.drawAddName) { 00408 drawGLName(getCenteringBoundary().getCenter(), getMicrosimID(), s.addNameSize / s.scale); 00409 } 00410 // (optional) clear id 00411 if (s.needsGlID) { 00412 glPopName(); 00413 } 00414 }
| void GUIGlObject_AbstractAdd::drawGLName | ( | const Position2D & | p, | |
| const std::string & | id, | |||
| SUMOReal | nameScale | |||
| ) | const [inherited] |
Definition at line 120 of file GUIGlObject_AbstractAdd.cpp.
References pfdkGetStringWidth(), pfDrawString(), pfSetPosition(), pfSetScale(), SUMOReal, Position2D::x(), and Position2D::y().
Referenced by drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUIEmitter::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIBusStop::drawGL(), and GUI_E2_ZS_Collector::MyWrapper::drawGL().
00120 { 00121 glPolygonOffset(0, -6); 00122 glPushMatrix(); 00123 glTranslated(p.x(), p.y(), 0); 00124 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 00125 pfSetPosition(0, 0); 00126 pfSetScale(nameScale); 00127 SUMOReal w = pfdkGetStringWidth(id.c_str()); 00128 glRotated(180, 1, 0, 0); 00129 glTranslated(-w/2., 0.4, 0); 00130 pfDrawString(id.c_str()); 00131 glPopMatrix(); 00132 }
| 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.
Definition at line 118 of file GenericSAXHandler.cpp.
References TplConvert< E >::_2str(), GenericSAXHandler::convertTag(), GenericSAXHandler::myCharacters(), GenericSAXHandler::myCharactersVector, GenericSAXHandler::myEndElement(), GenericSAXHandler::myParentHandler, GenericSAXHandler::myParentIndicator, XMLSubSys::setHandler(), SUMO_TAG_INCLUDE, and SUMO_TAG_NOTHING.
00120 { 00121 std::string name = TplConvert<XMLCh>::_2str(qname); 00122 SumoXMLTag element = convertTag(name); 00123 // collect characters 00124 if (myCharactersVector.size()!=0) { 00125 size_t len = 0; 00126 unsigned i; 00127 for (i=0; i<myCharactersVector.size(); ++i) { 00128 len += myCharactersVector[i].length(); 00129 } 00130 char *buf = new char[len+1]; 00131 size_t pos = 0; 00132 for (i=0; i<myCharactersVector.size(); ++i) { 00133 memcpy((unsigned char*) buf+pos, (unsigned char*) myCharactersVector[i].c_str(), 00134 sizeof(char)*myCharactersVector[i].length()); 00135 pos += myCharactersVector[i].length(); 00136 } 00137 buf[pos] = 0; 00138 00139 // call user handler 00140 try { 00141 myCharacters(element, buf); 00142 } catch (std::runtime_error &) { 00143 delete[] buf; 00144 throw; 00145 } 00146 delete[] buf; 00147 } 00148 if (element != SUMO_TAG_INCLUDE) { 00149 myEndElement(element); 00150 if (myParentHandler && myParentIndicator == element) { 00151 XMLSubSys::setHandler(*myParentHandler); 00152 myParentIndicator = SUMO_TAG_NOTHING; 00153 myParentHandler = 0; 00154 } 00155 } 00156 }
| void SUMOSAXHandler::error | ( | const SAXParseException & | exception | ) | throw (ProcessError) [inherited] |
Handler for XML-errors.
The message is built using buildErrorMessage and thrown within a ProcessError.
| [in] | exception | The occured exception to process |
| ProcessError | On any call |
Definition at line 74 of file SUMOSAXHandler.cpp.
References SUMOSAXHandler::buildErrorMessage().
00074 { 00075 throw ProcessError(buildErrorMessage(exception)); 00076 }
| SUMOTime MSLaneSpeedTrigger::execute | ( | SUMOTime | currentTime | ) | throw (ProcessError) [inherited] |
Definition at line 97 of file MSLaneSpeedTrigger.cpp.
References MSLaneSpeedTrigger::processCommand().
Referenced by MSLaneSpeedTrigger::init().
00097 { 00098 return processCommand(true, currentTime); 00099 }
| void SUMOSAXHandler::fatalError | ( | const SAXParseException & | exception | ) | throw (ProcessError) [inherited] |
Handler for XML-errors.
The message is built using buildErrorMessage and thrown within a ProcessError.
| ProcessError | On any call |
| [in] | exception | The occured exception to process |
Definition at line 80 of file SUMOSAXHandler.cpp.
References SUMOSAXHandler::buildErrorMessage().
00080 { 00081 throw ProcessError(buildErrorMessage(exception)); 00082 }
| GUIGlObject_AbstractAdd * GUIGlObject_AbstractAdd::get | ( | const std::string & | name | ) | [static, inherited] |
Returns a named object.
Definition at line 93 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myObjects.
00093 { 00094 std::map<std::string, GUIGlObject_AbstractAdd*>::iterator i = 00095 myObjects.find(name); 00096 if (i==myObjects.end()) { 00097 return 0; 00098 } 00099 return (*i).second; 00100 }
| Boundary GUILaneSpeedTrigger::getCenteringBoundary | ( | ) | const throw () [virtual] |
Returns the boundary to which the view shall be centered in order to show the object.
Implements GUIGlObject.
Definition at line 418 of file GUILaneSpeedTrigger.cpp.
References Boundary::grow(), and myBoundary.
Referenced by drawGL().
00418 { 00419 Boundary b(myBoundary); 00420 b.grow(20); 00421 return b; 00422 }
| SUMOReal MSLaneSpeedTrigger::getCurrentSpeed | ( | ) | const [inherited] |
Returns the current speed.
Definition at line 198 of file MSLaneSpeedTrigger.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSLaneSpeedTrigger::myAmOverriding, MSLaneSpeedTrigger::myCurrentEntry, MSLaneSpeedTrigger::myDefaultSpeed, MSLaneSpeedTrigger::myLoadedSpeeds, and MSLaneSpeedTrigger::mySpeedOverrideValue.
Referenced by drawGL(), getParameterWindow(), and MSLaneSpeedTrigger::processCommand().
00198 { 00199 if (myAmOverriding) { 00200 return mySpeedOverrideValue; 00201 } else { 00202 // ok, maybe the first shall not yet be the valid one 00203 if (myCurrentEntry==myLoadedSpeeds.begin()&&(*myCurrentEntry).first>MSNet::getInstance()->getCurrentTimeStep()) { 00204 return myDefaultSpeed; 00205 } 00206 // try the loaded 00207 if (myCurrentEntry!=myLoadedSpeeds.end()&&(*myCurrentEntry).first<=MSNet::getInstance()->getCurrentTimeStep()) { 00208 return (*myCurrentEntry).second; 00209 } else { 00210 return (*(myCurrentEntry-1)).second; 00211 } 00212 } 00213 }
| SUMOReal MSLaneSpeedTrigger::getDefaultSpeed | ( | ) | const [inherited] |
Definition at line 168 of file MSLaneSpeedTrigger.cpp.
References MSLaneSpeedTrigger::myDefaultSpeed.
00168 { 00169 return myDefaultSpeed; 00170 }
| const std::string & GenericSAXHandler::getFileName | ( | ) | const throw () [inherited] |
returns the current file name
Definition at line 78 of file GenericSAXHandler.cpp.
References GenericSAXHandler::myFileName.
Referenced by NLHandler::addE1Detector(), NLHandler::addE2Detector(), NLHandler::addEdgeLaneMeanData(), NLHandler::addRouteProbeDetector(), NLHandler::addSource(), NLHandler::addTrigger(), NLHandler::addVTypeProbeDetector(), NLHandler::beginE3Detector(), SUMOSAXHandler::buildErrorMessage(), MSRouteLoader::init(), PCNetProjectionLoader::loadIfSet(), NILoader::loadXMLType(), MSTriggeredXMLReader::myInit(), RODFDetectorHandler::myStartElement(), NLHandler::myStartElement(), NIImporter_OpenDrive::myStartElement(), MSLaneSpeedTrigger::myStartElement(), GUISettingsHandler::myStartElement(), RORDGenerator_ODAmounts::RORDGenerator_ODAmounts(), and GenericSAXHandler::startElement().
00078 { 00079 return myFileName; 00080 }
| const std::string& GUIGlObject::getFullName | ( | ) | const throw () [inline, inherited] |
Returns the full name appearing in the tool tip.
Definition at line 95 of file GUIGlObject.h.
References GUIGlObject::myFullName.
Referenced by GUIGlObject::buildPopupHeader(), GUIGLObjectPopupMenu::onCmdCopyTypedName(), GUIParam_PopupMenuInterface::onCmdOpenTracker(), GUIGLObjectToolTip::onPaint(), GUITriggeredRerouter::openManipulator(), openManipulator(), GUIEmitter::openManipulator(), GUIDialog_GLChosenEditor::rebuildList(), GUISelectedStorage::save(), and GUISelectedStorage::SingleTypeSelections::save().
00095 { 00096 return myFullName; 00097 }
| GLuint GUIGlObject::getGlID | ( | ) | const throw () [inline, inherited] |
Returns the numerical id of the object.
Definition at line 103 of file GUIGlObject.h.
References GUIGlObject::myGlID.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIViewTraffic::drawBestLanes(), GUIVehicle::drawGL(), GUITriggeredRerouter::drawGL(), GUIPolygon2D::drawGL(), GUIPointOfInterest::drawGL(), GUILaneWrapper::drawGL(), drawGL(), GUIJunctionWrapper::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUIEmitter::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIBusStop::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIViewTraffic::drawRoute(), FXIMPLEMENT(), GUILaneWrapper::Colorer::getColorValue(), GUISUMOAbstractView::getObjectUnderCursor(), GUIVehicle::getPopUpMenu(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GUIVehicle::GUIVehiclePopupMenu::onCmdStartTrack(), and ROWdrawAction_drawLinkRules().
00103 { 00104 return myGlID; 00105 }
| const std::string& Named::getID | ( | ) | const throw () [inline, inherited] |
Returns the id.
Definition at line 59 of file Named.h.
References Named::myID.
Referenced by RORouteDef_Alternatives::addAlternative(), MSRouteProbe::addRoute(), MSEmitter::MSEmitter_FileTriggeredChild::buildAndScheduleFlowVehicle(), MSCalibrator::MSCalibrator_FileTriggeredChild::buildAndScheduleFlowVehicle(), RORouteDef_Complete::buildCurrentRoute(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectLinks(), NBTrafficLightDefinition::compute(), GUIPointOfInterest::drawGL(), MSInductLoop::enterDetectorByMove(), MSVTypeProbe::execute(), MSNet::getBusStopID(), GUITriggeredRerouter::getMicrosimID(), GUIPointOfInterest::getMicrosimID(), getMicrosimID(), GUIInductLoop::MyWrapper::getMicrosimID(), GUIEmitter::getMicrosimID(), GUIBusStop::getMicrosimID(), GUI_E2_ZS_Collector::MyWrapper::getMicrosimID(), traci::TraCIServer::handlePoiDomain(), RORDLoader_SUMOBase::myCharacters(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), MSTriggeredRerouter::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSEmitter::MSEmitter_FileTriggeredChild::myStartElement(), MSCalibrator::MSCalibrator_FileTriggeredChild::myStartElement(), NBLoadedTLDef::SignalGroup::patchTYellow(), TraCIServerAPI_Vehicle::processGet(), MSVehicle::replaceRoute(), MSVehicle::saveState(), NBOwnTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), RORDLoader_SUMOBase::startRoute(), GUIEmitter::GUIEmitterChild_UserTriggeredChild::wrappedExecute(), NBTrafficLightLogic::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and MSVehicle::~MSVehicle().
00059 { 00060 return myID; 00061 }
| std::vector< GLuint > GUIGlObject_AbstractAdd::getIDList | ( | ) | [static, inherited] |
Returns the list of gl-ids of all additional objects.
Definition at line 110 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myObjectList.
Referenced by FXIMPLEMENT().
00110 { 00111 std::vector<GLuint> ret; 00112 for (std::vector<GUIGlObject_AbstractAdd*>::iterator i=myObjectList.begin(); i!=myObjectList.end(); ++i) { 00113 ret.push_back((*i)->getGlID()); 00114 } 00115 return ret; 00116 }
| SUMOReal MSLaneSpeedTrigger::getLoadedSpeed | ( | ) | [inherited] |
Definition at line 188 of file MSLaneSpeedTrigger.cpp.
References MSLaneSpeedTrigger::myCurrentEntry, and MSLaneSpeedTrigger::myLoadedSpeeds.
00188 { 00189 if (myCurrentEntry!=myLoadedSpeeds.begin()) { 00190 return (*(myCurrentEntry-1)).second; 00191 } else { 00192 return (*myCurrentEntry).second; 00193 } 00194 }
| const std::string & GUILaneSpeedTrigger::getMicrosimID | ( | ) | const throw () [virtual] |
Returns the id of the object as known to microsim.
Implements GUIGlObject.
Definition at line 336 of file GUILaneSpeedTrigger.cpp.
References Named::getID().
Referenced by drawGL().
00336 { 00337 return getID(); 00338 }
| const std::vector< GUIGlObject_AbstractAdd * > & GUIGlObject_AbstractAdd::getObjectList | ( | ) | [static, inherited] |
Returns the list of all additional objects.
Definition at line 104 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myObjectList.
Referenced by GUINet::initGUIStructures().
00104 { 00105 return myObjectList; 00106 }
| GUIParameterTableWindow * GUILaneSpeedTrigger::getParameterWindow | ( | GUIMainWindow & | app, | |
| GUISUMOAbstractView & | parent | |||
| ) | throw () [virtual] |
Returns an own parameter window.
| [in] | app | The application needed to build the parameter window |
| [in] | parent | The parent window needed to build the parameter window |
Implements GUIGlObject.
Definition at line 322 of file GUILaneSpeedTrigger.cpp.
References GUIParameterTableWindow::closeBuilding(), MSLaneSpeedTrigger::getCurrentSpeed(), and GUIParameterTableWindow::mkItem().
00323 { 00324 GUIParameterTableWindow *ret = 00325 new GUIParameterTableWindow(app, *this, 1); 00326 // add items 00327 ret->mkItem("speed [m/s]", true, 00328 new FunctionBinding<GUILaneSpeedTrigger, SUMOReal>(this, &GUILaneSpeedTrigger::getCurrentSpeed)); 00329 // close building 00330 ret->closeBuilding(); 00331 return ret; 00332 }
| GUIGLObjectPopupMenu * GUILaneSpeedTrigger::getPopUpMenu | ( | GUIMainWindow & | app, | |
| GUISUMOAbstractView & | parent | |||
| ) | throw () [virtual] |
Returns an own popup-menu.
| [in] | app | The application needed to build the popup-menu |
| [in] | parent | The parent window needed to build the popup-menu |
Implements GUIGlObject.
Definition at line 307 of file GUILaneSpeedTrigger.cpp.
References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildNameCopyPopupEntry(), GUIGlObject::buildPopupHeader(), GUIGlObject::buildPositionCopyEntry(), GUIGlObject::buildSelectionPopupEntry(), GUIGlObject::buildShowManipulatorPopupEntry(), and GUIGlObject::buildShowParamsPopupEntry().
00308 { 00309 GUIGLObjectPopupMenu *ret = new GUILaneSpeedTriggerPopupMenu(app, parent, *this); 00310 buildPopupHeader(ret, app); 00311 buildCenterPopupEntry(ret); 00312 buildShowManipulatorPopupEntry(ret); 00313 buildNameCopyPopupEntry(ret); 00314 buildSelectionPopupEntry(ret); 00315 buildShowParamsPopupEntry(ret); 00316 buildPositionCopyEntry(ret, false); 00317 return ret; 00318 }
| GUIGlObjectType GUIGlObject_AbstractAdd::getType | ( | ) | const throw () [virtual, inherited] |
Returns the type of the object as coded in GUIGlObjectType.
Implements GUIGlObject.
Reimplemented in GUIDetectorWrapper.
Definition at line 76 of file GUIGlObject_AbstractAdd.cpp.
References GUIGlObject_AbstractAdd::myGlType.
00076 { 00077 return myGlType; 00078 }
| void GenericSAXHandler::myCharacters | ( | SumoXMLTag | element, | |
| const std::string & | chars | |||
| ) | throw (ProcessError) [protected, virtual, inherited] |
Callback method for characters to implement by derived classes.
Called by "endElement" (see there).
| [in] | element | The opened element, given as a SumoXMLTag |
| [in] | chars | The complete embedded character string ProcessError These method may throw a ProcessError if something fails |
Reimplemented in ROJTRTurnDefLoader, MSRouteHandler, NIImporter_OpenDrive, NIImporter_SUMO, NLHandler, PCLoaderXML, PCNetProjectionLoader, and RORDLoader_SUMOBase.
Definition at line 189 of file GenericSAXHandler.cpp.
Referenced by GenericSAXHandler::endElement().
| void MSLaneSpeedTrigger::myEndElement | ( | SumoXMLTag | element | ) | throw (ProcessError) [protected, virtual, inherited] |
Called on the closing of a tag;.
| [in] | element | ID of the currently closed element |
| ProcessError | If something fails |
Reimplemented from GenericSAXHandler.
Definition at line 160 of file MSLaneSpeedTrigger.cpp.
References MSLaneSpeedTrigger::init(), MSLaneSpeedTrigger::myDidInit, and SUMO_TAG_VSS.
00160 { 00161 if (element==SUMO_TAG_VSS && !myDidInit) { 00162 init(); 00163 } 00164 }
| void MSLaneSpeedTrigger::myStartElement | ( | SumoXMLTag | element, | |
| const SUMOSAXAttributes & | attrs | |||
| ) | throw (ProcessError) [protected, virtual, inherited] |
Called on the opening of a tag;.
| [in] | element | ID of the currently opened element |
| [in] | attrs | Attributes within the currently opened element |
| ProcessError | If something fails |
Reimplemented from GenericSAXHandler.
Definition at line 135 of file MSLaneSpeedTrigger.cpp.
References MsgHandler::getErrorInstance(), GenericSAXHandler::getFileName(), Named::getID(), MsgHandler::inform(), MSLaneSpeedTrigger::myLoadedSpeeds, SUMO_ATTR_SPEED, SUMO_ATTR_TIME, SUMO_TAG_STEP, and SUMOReal.
00136 { 00137 // check whether the correct tag is read 00138 if (element!=SUMO_TAG_STEP) { 00139 return; 00140 } 00141 // extract the values 00142 bool ok = true; 00143 SUMOTime next = attrs.getSUMOTimeReporting(SUMO_ATTR_TIME, "vss/step", getID().c_str(), ok); 00144 SUMOReal speed = attrs.getOptSUMORealReporting(SUMO_ATTR_SPEED, "vss/step", getID().c_str(), ok, -1); 00145 // check the values 00146 if (next<0) { 00147 MsgHandler::getErrorInstance()->inform("Wrong time in MSLaneSpeedTrigger in file '" + getFileName() + "'."); 00148 return; 00149 } 00150 if (speed<0) { 00151 MsgHandler::getErrorInstance()->inform("Wrong speed in MSLaneSpeedTrigger in file '" + getFileName() + "'."); 00152 return; 00153 } 00154 // set the values for the next step as they are valid 00155 myLoadedSpeeds.push_back(std::make_pair(next, speed)); 00156 }
| GUIManipulator * GUILaneSpeedTrigger::openManipulator | ( | GUIMainWindow & | app, | |
| GUISUMOAbstractView & | parent | |||
| ) |
Definition at line 426 of file GUILaneSpeedTrigger.cpp.
References GUIGlObject::getFullName().
Referenced by GUILaneSpeedTrigger::GUILaneSpeedTriggerPopupMenu::onCmdOpenManip().
00427 { 00428 GUIManip_LaneSpeedTrigger *gui = 00429 new GUIManip_LaneSpeedTrigger(app, getFullName(), *this, 0, 0); 00430 gui->create(); 00431 gui->show(); 00432 return gui; 00433 }
Definition at line 103 of file MSLaneSpeedTrigger.cpp.
References MSLaneSpeedTrigger::getCurrentSpeed(), MSLaneSpeedTrigger::myCurrentEntry, MSLaneSpeedTrigger::myDestLanes, MSLaneSpeedTrigger::myLoadedSpeeds, and SUMOReal.
Referenced by MSLaneSpeedTrigger::execute(), MSLaneSpeedTrigger::init(), MSLaneSpeedTrigger::setOverriding(), and MSLaneSpeedTrigger::setOverridingValue().
00103 { 00104 std::vector<MSLane*>::iterator i; 00105 const SUMOReal speed = getCurrentSpeed(); 00106 for (i=myDestLanes.begin(); i!=myDestLanes.end(); ++i) { 00107 #ifdef HAVE_MESOSIM 00108 if (MSGlobals::gUseMesoSim) { 00109 MESegment *first = MSGlobals::gMesoNet->getSegmentForEdge((*i)->getEdge()); 00110 while (first!=0) { 00111 MSGlobals::gMesoNet->setSpeed(first, speed, currentTime); 00112 first = first->getNextSegment(); 00113 } 00114 continue; 00115 } 00116 #endif 00117 (*i)->setMaxSpeed(speed); 00118 } 00119 if (!move2next) { 00120 // changed from the gui 00121 return 0; 00122 } 00123 if (myCurrentEntry!=myLoadedSpeeds.end()) { 00124 ++myCurrentEntry; 00125 } 00126 if (myCurrentEntry!=myLoadedSpeeds.end()) { 00127 return ((*myCurrentEntry).first)-((*(myCurrentEntry-1)).first); 00128 } else { 00129 return 0; 00130 } 00131 }
| void GenericSAXHandler::registerParent | ( | const SumoXMLTag | tag, | |
| GenericSAXHandler * | handler | |||
| ) | [inherited] |
Assigning a parent handler which is enabled when the specified tag is closed.
Definition at line 160 of file GenericSAXHandler.cpp.
References GenericSAXHandler::myParentHandler, GenericSAXHandler::myParentIndicator, and XMLSubSys::setHandler().
Referenced by NLTriggerBuilder::parseAndBuildLaneSpeedTrigger().
00160 { 00161 myParentHandler = handler; 00162 myParentIndicator = tag; 00163 XMLSubSys::setHandler(*this); 00164 }
| void GenericSAXHandler::setFileName | ( | const std::string & | name | ) | throw () [inherited] |
Sets the current file name.
| [in] | name | The name of the currently processed file |
Definition at line 72 of file GenericSAXHandler.cpp.
References GenericSAXHandler::myFileName.
Referenced by PCNetProjectionLoader::loadIfSet(), ROLoader::loadNet(), NIImporter_OpenStreetMap::loadNetwork(), NILoader::loadXMLType(), and traci::TraCIServer::TraCIServer().
00072 { 00073 myFileName = name; 00074 }
| void MSLaneSpeedTrigger::setOverriding | ( | bool | val | ) | [inherited] |
Definition at line 174 of file MSLaneSpeedTrigger.cpp.
References MSNet::getInstance(), MSLaneSpeedTrigger::myAmOverriding, and MSLaneSpeedTrigger::processCommand().
Referenced by GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdChangeOption().
00174 { 00175 myAmOverriding = val; 00176 processCommand(false, MSNet::getInstance()->getCurrentTimeStep()); 00177 }
| void MSLaneSpeedTrigger::setOverridingValue | ( | SUMOReal | val | ) | [inherited] |
Definition at line 181 of file MSLaneSpeedTrigger.cpp.
References MSNet::getInstance(), MSLaneSpeedTrigger::mySpeedOverrideValue, and MSLaneSpeedTrigger::processCommand().
Referenced by GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdChangeOption(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdPreDef(), and GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdUserDef().
00181 { 00182 mySpeedOverrideValue = val; 00183 processCommand(false, MSNet::getInstance()->getCurrentTimeStep()); 00184 }
| 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.
Definition at line 97 of file GenericSAXHandler.cpp.
References TplConvert< E >::_2str(), 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.
00100 { 00101 std::string name = TplConvert<XMLCh>::_2str(qname); 00102 SumoXMLTag element = convertTag(name); 00103 myCharactersVector.clear(); 00104 SUMOSAXAttributesImpl_Xerces na(attrs, myPredefinedTags, myPredefinedTagsMML); 00105 if (element == SUMO_TAG_INCLUDE) { 00106 std::string file = na.getString(SUMO_ATTR_HREF); 00107 if (!FileHelpers::isAbsolute(file)) { 00108 file = FileHelpers::getConfigurationRelative(getFileName(), file); 00109 } 00110 XMLSubSys::runParser(*this, file); 00111 } else { 00112 myStartElement(element, na); 00113 } 00114 }
| void SUMOSAXHandler::warning | ( | const SAXParseException & | exception | ) | throw () [inherited] |
Handler for XML-warnings.
The message is built using buildErrorMessage and reported to the warning-instance of the MsgHandler.
| [in] | exception | The occured exception to process |
Definition at line 68 of file SUMOSAXHandler.cpp.
References SUMOSAXHandler::buildErrorMessage(), MsgHandler::getWarningInstance(), and MsgHandler::inform().
00068 { 00069 MsgHandler::getWarningInstance()->inform(buildErrorMessage(exception)); 00070 }
friend class GUIGlObjectStorage [friend, inherited] |
Needed to set the id.
Reimplemented in GUI_E2_ZS_CollectorOverLanes::MyWrapper.
Definition at line 111 of file GUIGlObject.h.
bool MSLaneSpeedTrigger::myAmOverriding [protected, inherited] |
The information whether the read speed shall be overridden.
Definition at line 123 of file MSLaneSpeedTrigger.h.
Referenced by MSLaneSpeedTrigger::getCurrentSpeed(), and MSLaneSpeedTrigger::setOverriding().
Boundary GUILaneSpeedTrigger::myBoundary [private] |
The boundary of this rerouter.
Definition at line 214 of file GUILaneSpeedTrigger.h.
Referenced by getCenteringBoundary(), and GUILaneSpeedTrigger().
std::vector<std::pair<SUMOTime, SUMOReal> >::iterator MSLaneSpeedTrigger::myCurrentEntry [protected, inherited] |
Definition at line 129 of file MSLaneSpeedTrigger.h.
Referenced by MSLaneSpeedTrigger::getCurrentSpeed(), MSLaneSpeedTrigger::getLoadedSpeed(), MSLaneSpeedTrigger::init(), and MSLaneSpeedTrigger::processCommand().
SUMOReal MSLaneSpeedTrigger::myCurrentSpeed [protected, inherited] |
the speed that will be set on the next call
Definition at line 117 of file MSLaneSpeedTrigger.h.
Referenced by MSLaneSpeedTrigger::init().
SUMOReal MSLaneSpeedTrigger::myDefaultSpeed [protected, inherited] |
The original speed allowed on the lanes.
Definition at line 120 of file MSLaneSpeedTrigger.h.
Referenced by MSLaneSpeedTrigger::getCurrentSpeed(), MSLaneSpeedTrigger::getDefaultSpeed(), and GUILaneSpeedTrigger().
std::vector<MSLane*> MSLaneSpeedTrigger::myDestLanes [protected, inherited] |
the lane the trigger is responsible for
Definition at line 114 of file MSLaneSpeedTrigger.h.
Referenced by MSLaneSpeedTrigger::processCommand().
PosCont GUILaneSpeedTrigger::myFGPositions [private] |
The positions in full-geometry mode.
Definition at line 208 of file GUILaneSpeedTrigger.h.
Referenced by drawGL(), and GUILaneSpeedTrigger().
RotCont GUILaneSpeedTrigger::myFGRotations [private] |
The rotations in full-geometry mode.
Definition at line 211 of file GUILaneSpeedTrigger.h.
Referenced by drawGL(), and GUILaneSpeedTrigger().
GUIGlObjectType GUIGlObject_AbstractAdd::myGlType [protected, inherited] |
The object's type.
Definition at line 85 of file GUIGlObject_AbstractAdd.h.
Referenced by GUIGlObject_AbstractAdd::getType().
std::string Named::myID [protected, inherited] |
The name of the object.
Definition at line 66 of file Named.h.
Referenced by RORouteDef_OrigDest::buildCurrentRoute(), RORouteDef_Complete::buildCurrentRoute(), RORouteDef_Alternatives::buildCurrentRoute(), and Named::getID().
SUMOReal GUILaneSpeedTrigger::myLastValue [mutable, private] |
Storage for last value to avoid string recomputation.
Definition at line 220 of file GUILaneSpeedTrigger.h.
Referenced by drawGL().
std::string GUILaneSpeedTrigger::myLastValueString [mutable, private] |
Storage for speed string to avoid recomputation.
Definition at line 223 of file GUILaneSpeedTrigger.h.
Referenced by drawGL().
std::vector<std::pair<SUMOTime, SUMOReal> > MSLaneSpeedTrigger::myLoadedSpeeds [protected, inherited] |
Definition at line 128 of file MSLaneSpeedTrigger.h.
Referenced by MSLaneSpeedTrigger::getCurrentSpeed(), MSLaneSpeedTrigger::getLoadedSpeed(), MSLaneSpeedTrigger::init(), MSLaneSpeedTrigger::myStartElement(), and MSLaneSpeedTrigger::processCommand().
std::vector< GUIGlObject_AbstractAdd * > GUIGlObject_AbstractAdd::myObjectList [static, protected, inherited] |
The list of all addtional objects currently loaded.
Definition at line 92 of file GUIGlObject_AbstractAdd.h.
Referenced by GUIGlObject_AbstractAdd::clearDictionary(), GUIGlObject_AbstractAdd::getIDList(), and GUIGlObject_AbstractAdd::getObjectList().
std::map< std::string, GUIGlObject_AbstractAdd * > GUIGlObject_AbstractAdd::myObjects [static, protected, inherited] |
Map from names of loaded additional objects to the objects themselves.
Definition at line 89 of file GUIGlObject_AbstractAdd.h.
Referenced by GUIGlObject_AbstractAdd::clearDictionary(), and GUIGlObject_AbstractAdd::get().
bool GUILaneSpeedTrigger::myShowAsKMH [private] |
The information whether the speed shall be shown in m/s or km/h.
Definition at line 217 of file GUILaneSpeedTrigger.h.
Referenced by drawGL().
SUMOReal MSLaneSpeedTrigger::mySpeedOverrideValue [protected, inherited] |
The speed to use if overriding the read speed.
Definition at line 126 of file MSLaneSpeedTrigger.h.
Referenced by MSLaneSpeedTrigger::getCurrentSpeed(), GUILaneSpeedTrigger(), and MSLaneSpeedTrigger::setOverridingValue().
1.5.6