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

#include <GUIGlObject_AbstractAdd.h>

Inheritance diagram for GUIGlObject_AbstractAdd:
GUIGlObject GUIBusStop GUIDetectorWrapper GUILaneSpeedTrigger GUIPointOfInterest GUIPolygon GUITriggeredRerouter GUI_E2_ZS_Collector::MyWrapper GUI_E2_ZS_CollectorOverLanes::MyWrapper GUIE3Collector::MyWrapper GUIInductLoop::MyWrapper GUIInstantInductLoop::MyWrapper

Public Member Functions

virtual void drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
 Draws additional, user-triggered visualisations.
void drawName (const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
 GUIGlObject_AbstractAdd (const std::string &prefix, GUIGlObjectType type, const std::string &id)
 ~GUIGlObject_AbstractAdd ()
Atomar getter methods
const std::string & getFullName () const
 Returns the full name appearing in the tool tip.
GUIGlID getGlID () const
 Returns the numerical id of the object.
interfaces to be implemented by derived classes
virtual GUIGLObjectPopupMenugetPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)=0
 Returns an own popup-menu.
virtual GUIParameterTableWindowgetParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)=0
 Returns an own parameter window.
const std::string & getMicrosimID () const
 Returns the id of the object as known to microsim.
void setMicrosimID (const std::string &newID)
 Changes the microsimID of the object (happens in NETEDIT)
GUIGlObjectType getType () const
 Returns the type of the object as coded in GUIGlObjectType.
virtual Boundary getCenteringBoundary () const =0
 Returns the boundary to which the view shall be centered in order to show the object.
virtual void drawGL (const GUIVisualizationSettings &s) const =0
 Draws the object.
Parameter table window I/O
void addParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was opened.
void removeParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was closed.

Static Public Member Functions

static void clearDictionary ()
 Clears the dictionary (the objects will not be deleted)
static GUIGlObject_AbstractAddget (const std::string &name)
 Returns a named object.
static std::vector< GUIGlIDgetIDList ()
 Returns the list of gl-ids of all additional objects.
static const std::vector
< GUIGlObject_AbstractAdd * > & 
getObjectList ()
 Returns the list of all additional objects.
static void remove (GUIGlObject_AbstractAdd *o)
 Removes an object.

Static Public Attributes

static StringBijection
< GUIGlObjectType
TypeNames
 associates object types with strings

Protected Member Functions

void setPrefix (const std::string &prefix)
helper methods for building popup-menus
void buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
 Builds the header.
void buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to center to the object.
void buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds entries which allow to copy the name / typed name into the clipboard.
void buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to (de)select the object.
void buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the parameter window.
void buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
void buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the manipulator window.

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.

Detailed Description

Definition at line 47 of file GUIGlObject_AbstractAdd.h.

Constructor & Destructor Documentation

GUIGlObject_AbstractAdd::GUIGlObject_AbstractAdd ( const std::string &  prefix,
GUIGlObjectType  type,
const std::string &  id 
)

Definition at line 54 of file GUIGlObject_AbstractAdd.cpp.

References GUIGlObject::getFullName(), myObjectList, and myObjects.

GUIGlObject_AbstractAdd::~GUIGlObject_AbstractAdd ( )

Definition at line 61 of file GUIGlObject_AbstractAdd.cpp.

Member Function Documentation

void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was opened.

Parameters
[in]wThe opened parameter window

Definition at line 187 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

void GUIGlObject::buildCenterPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited
void GUIGlObject::buildNameCopyPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds entries which allow to copy the name / typed name into the clipboard.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 134 of file GUIGlObject.cpp.

References MID_COPY_NAME, and MID_COPY_TYPED_NAME.

Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIVehicle::getPopUpMenu(), and GUIEdge::getPopUpMenu().

void GUIGlObject::buildPositionCopyEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 166 of file GUIGlObject.cpp.

References GeoConvHelper::getFinal(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.

Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIEdge::getPopUpMenu(), and GUINet::getPopUpMenu().

void GUIGlObject::buildShowManipulatorPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the manipulator window.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 178 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.

Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().

void GUIGlObject::buildShowParamsPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the parameter window.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 157 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWPARS.

Referenced by GUIDetectorWrapper::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUILaneWrapper::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIEdge::getPopUpMenu(), and GUINet::getPopUpMenu().

void GUIGlObject_AbstractAdd::clearDictionary ( )
static

Clears the dictionary (the objects will not be deleted)

!! delete (*i).second;

Definition at line 65 of file GUIGlObject_AbstractAdd.cpp.

References myObjectList, and myObjects.

Referenced by GUINet::~GUINet().

virtual void GUIGlObject::drawGLAdditional ( GUISUMOAbstractView *const  parent,
const GUIVisualizationSettings s 
) const
inlinevirtualinherited

Draws additional, user-triggered visualisations.

Parameters
[in]parentThe view
[in]sThe settings for the current view (may influence drawing)

Reimplemented in GUIVehicle, and GUIPerson.

Definition at line 182 of file GUIGlObject.h.

References UNUSED_PARAMETER.

GUIGlObject_AbstractAdd * GUIGlObject_AbstractAdd::get ( const std::string &  name)
static

Returns a named object.

Definition at line 76 of file GUIGlObject_AbstractAdd.cpp.

References myObjects.

std::vector< GUIGlID > GUIGlObject_AbstractAdd::getIDList ( )
static

Returns the list of gl-ids of all additional objects.

Definition at line 99 of file GUIGlObject_AbstractAdd.cpp.

References myObjectList.

Referenced by GUISUMOViewParent::onCmdLocate().

const std::string& GUIGlObject::getMicrosimID ( ) const
inlineinherited

Returns the id of the object as known to microsim.

Returns
The id of the object

Definition at line 146 of file GUIGlObject.h.

References GUIGlObject::myMicrosimID.

Referenced by GUIGlObject::createFullName(), GUIGlObject::drawName(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), and GUIGLObjectPopupMenu::onCmdCopyName().

const std::vector< GUIGlObject_AbstractAdd * > & GUIGlObject_AbstractAdd::getObjectList ( )
static

Returns the list of all additional objects.

Definition at line 93 of file GUIGlObject_AbstractAdd.cpp.

References myObjectList.

virtual GUIParameterTableWindow* GUIGlObject::getParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
pure virtualinherited

Returns an own parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window

Implemented in GUIInductLoop::MyWrapper, GUITriggeredRerouter::GUITriggeredRerouterEdge, GUINet, GUIEdge, GUI_E2_ZS_Collector::MyWrapper, GUIBusStop, GUIVehicle, GUI_E2_ZS_CollectorOverLanes::MyWrapper, GUIE3Collector::MyWrapper, GUILaneWrapper, GUIJunctionWrapper, GUIInstantInductLoop::MyWrapper, GUITriggeredRerouter, GUIPointOfInterest, GUILaneSpeedTrigger, GUIPerson, GUIPolygon, and GUITrafficLightLogicWrapper.

Referenced by GUIGLObjectPopupMenu::onCmdShowPars().

virtual GUIGLObjectPopupMenu* GUIGlObject::getPopUpMenu ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
pure virtualinherited

Returns an own popup-menu.

Parameters
[in]appThe application needed to build the popup-menu
[in]parentThe parent window needed to build the popup-menu
Returns
The built popup-menu

Implemented in GUITriggeredRerouter::GUITriggeredRerouterEdge, GUINet, GUIEdge, GUIVehicle, GUIBusStop, GUILaneWrapper, GUIJunctionWrapper, GUITriggeredRerouter, GUIPointOfInterest, GUILaneSpeedTrigger, GUIPerson, GUIPolygon, GUITrafficLightLogicWrapper, and GUIDetectorWrapper.

Referenced by GUISUMOAbstractView::openObjectDialog().

void GUIGlObject_AbstractAdd::remove ( GUIGlObject_AbstractAdd o)
static

Removes an object.

Definition at line 86 of file GUIGlObject_AbstractAdd.cpp.

References GUIGlObject::getFullName(), myObjectList, and myObjects.

void GUIGlObject::removeParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was closed.

Parameters
[in]wThe closed parameter window

Definition at line 193 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().

void GUIGlObject::setMicrosimID ( const std::string &  newID)
inherited

Changes the microsimID of the object (happens in NETEDIT)

Definition at line 108 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.

void GUIGlObject::setPrefix ( const std::string &  prefix)
protectedinherited

Field Documentation

std::vector< GUIGlObject_AbstractAdd * > GUIGlObject_AbstractAdd::myObjectList
staticprotected

The list of all addtional objects currently loaded.

Definition at line 78 of file GUIGlObject_AbstractAdd.h.

Referenced by clearDictionary(), getIDList(), getObjectList(), GUIGlObject_AbstractAdd(), and remove().

std::map< std::string, GUIGlObject_AbstractAdd * > GUIGlObject_AbstractAdd::myObjects
staticprotected

Map from names of loaded additional objects to the objects themselves.

Definition at line 75 of file GUIGlObject_AbstractAdd.h.

Referenced by clearDictionary(), get(), GUIGlObject_AbstractAdd(), and remove().

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 99 of file GUIGlObject.h.


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