Events

Namespaces

 gazebo::event
 Event namespace.
 

Classes

class  Connection
 A class that encapsulates a connection. More...
 
class  Event
 Base class for all events. More...
 
class  Events
 An Event class to get notifications for simulator events. More...
 
class  EventT< T >
 A class for event processing. More...
 

Functions

 EventT ()
 Constructor. More...
 
virtual ~EventT ()
 Destructor. More...
 
ConnectionPtr Connect (const std::function< T > &_subscriber)
 Connect a callback to this event. More...
 
unsigned int ConnectionCount () const
 Get the number of connections. More...
 
virtual void Disconnect (int _id)
 Disconnect a callback to this event. More...
 

Detailed Description

Function Documentation

◆ EventT()

EventT ( )

Constructor.

◆ ~EventT()

~EventT ( )
virtual

Destructor.

Destructor. Deletes all the associated connections.

◆ Connect()

ConnectionPtr Connect ( const std::function< T > &  _subscriber)

Connect a callback to this event.

Adds a connection.

Parameters
[in]_subscriberPointer to a callback function.
Returns
A Connection object, which will automatically call Disconnect when it goes out of scope.
Parameters
[in]_subscriberthe subscriber to connect.

Referenced by Events::ConnectAddBuildingLevel(), Events::ConnectAddEntity(), Events::ConnectAlignMode(), Events::ConnectBuildingNameChanged(), Events::ConnectCameraPostRender(), Events::ConnectCameraPreRender(), Events::ConnectChangeBuildingEditorZoom(), Events::ConnectChangeBuildingLevel(), Events::ConnectColorSelected(), Events::ConnectCreateBuildingEditorItem(), Events::ConnectCreateEntity(), Events::ConnectCreateScene(), Events::ConnectCreateSensor(), Events::ConnectDeleteBuildingLevel(), Events::ConnectDeleteEntity(), Events::ConnectDiagTimerStart(), Events::ConnectDiagTimerStop(), Events::ConnectEditModel(), Events::ConnectExitBuildingEditor(), Events::ConnectExitModelEditor(), Events::ConnectFinishBuildingModel(), Events::ConnectFinishModel(), Events::ConnectFollow(), Events::ConnectFPS(), Events::ConnectFullScreen(), Events::ConnectInputStepSize(), Events::ConnectJointChanged(), Events::ConnectJointInserted(), Events::ConnectJointNameChanged(), Events::ConnectJointRemoved(), Joint::ConnectJointUpdate(), Events::ConnectKeyPress(), Events::ConnectLeftPaneVisibility(), Events::ConnectLightUpdate(), Events::ConnectLinkInserted(), Events::ConnectLinkRemoved(), Events::ConnectMainWindowReady(), Events::ConnectManipMode(), Events::ConnectModelChanged(), Events::ConnectModelNameChanged(), Events::ConnectModelPluginInserted(), Events::ConnectModelPluginRemoved(), Events::ConnectModelPropertiesChanged(), Events::ConnectModelUpdate(), Events::ConnectMoveEntity(), Events::ConnectMoveMode(), Events::ConnectNestedModelInserted(), Events::ConnectNestedModelRemoved(), Events::ConnectNewBuildingEditor(), Events::ConnectNewBuildingModel(), MultiRayShape::ConnectNewLaserScans(), Events::ConnectNewLayer(), Events::ConnectNewModel(), Events::ConnectNewModelEditor(), Events::ConnectOpenJointInspector(), Events::ConnectOpenLinkInspector(), Events::ConnectOpenModelPluginInspector(), Events::ConnectOrbit(), Events::ConnectPause(), Events::ConnectPostRender(), Events::ConnectPreRender(), Events::ConnectRemoveScene(), Events::ConnectRemoveSensor(), Events::ConnectRender(), Events::ConnectRequestJointInsertion(), Events::ConnectRequestJointRemoval(), Events::ConnectRequestLinkInsertion(), Events::ConnectRequestLinkMove(), Events::ConnectRequestLinkRemoval(), Events::ConnectRequestLinkScale(), Events::ConnectRequestModelPluginInsertion(), Events::ConnectRequestModelPluginRemoval(), Events::ConnectRequestNestedModelInsertion(), Events::ConnectRequestNestedModelMove(), Events::ConnectRequestNestedModelRemoval(), Events::ConnectSaveAsBuildingEditor(), Events::ConnectSaveAsModelEditor(), Events::ConnectSaveBuildingEditor(), Events::ConnectSaveBuildingModel(), Events::ConnectSaveModel(), Events::ConnectSaveModelEditor(), Events::ConnectScaleEntity(), Events::ConnectSetSelectedEntity(), Events::ConnectSetSelectedJoint(), Events::ConnectSetSelectedModelPlugin(), Events::ConnectShowElements(), Events::ConnectShowFloorplan(), Events::ConnectShowJointContextMenu(), Events::ConnectShowLinkContextMenu(), Events::ConnectShowModelPluginContextMenu(), Events::ConnectShowToolbars(), Events::ConnectSigInt(), Events::ConnectStep(), Events::ConnectStop(), Events::ConnectTextureSelected(), Events::ConnectTimeReset(), Events::ConnectToggleEditMode(), Events::ConnectToggleLayer(), Events::ConnectTriggerShowElements(), Events::ConnectTriggerShowFloorplan(), Events::ConnectUpdateLevelWidget(), Events::ConnectWindowMode(), Events::ConnectWorldCreated(), Events::ConnectWorldReset(), and Events::ConnectWorldUpdateEnd().

◆ ConnectionCount()

unsigned int ConnectionCount ( ) const

Get the number of connections.

Returns
Number of connection to this Event.
Number of connections.

◆ Disconnect()

void Disconnect ( int  _id)
virtual

Disconnect a callback to this event.

Removes a connection.

Parameters
[in]_idThe id of the connection to disconnect.
[in]_idthe connection index.

Implements Event.