Namespaces

namespace  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.
virtual ~EventT ()
 Destructor.
ConnectionPtr Connect (const std::function< T > &_subscriber)
 Connect a callback to this event.
unsigned int ConnectionCount () const
 Get the number of connections.
virtual void Disconnect (int _id)
 Disconnect a callback to this event.

Detailed Description

Function Documentation

◆ EventT()

template<typename T>
EventT ( )

Constructor.

References Event::Event().

◆ ~EventT()

template<typename T>
~EventT ( )
virtual

Destructor.

Destructor. Deletes all the associated connections.

◆ Connect()

template<typename T>
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.

◆ ConnectionCount()

template<typename T>
unsigned int ConnectionCount ( ) const

Get the number of connections.

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

◆ Disconnect()

template<typename T>
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.