The Handle holds the information, and allows manipulation, of a connection between a internal::Signal Handler function and the Signal itself. More...
#include <Handle.hpp>
Public Member Functions | |
bool | connect () |
bool | connect () |
bool | connected () const |
bool | connected () const |
bool | disconnect () |
bool | disconnect () |
Handle (const Handle &hs) | |
Handle (connection_t conn) | |
Handle () | |
the connection type for the slot of this Handle | |
Handle (const Handle &hs) | |
Handle (connection_t conn) | |
Handle () | |
the connection type for the slot of this Handle | |
operator bool () const | |
operator bool () const | |
bool | ready () const |
bool | ready () const |
~Handle () | |
~Handle () | |
Protected Attributes | |
connection_t | m_conn |
Private Types | |
typedef sender_t::connection_t | connection_t |
the signal type | |
typedef sender_t::connection_t | connection_t |
the signal type | |
typedef internal::SignalBase | sender_t |
typedef internal::SignalBase | sender_t |
The Handle holds the information, and allows manipulation, of a connection between a internal::Signal Handler function and the Signal itself.
It is returned by the connect() and setup() methods of Signal and can be used to (dis)connect a handler function from the signal. Handle objects may be assigned to each other and will always point to the same connection. If the last Handle object is destroyed, and is not connected, the connection is destroyed. Thus the resource management (deallocation) is handled by Orocos itself.
To inspect if the Handle points to a valid, existing connection, one can use :
Handle handle; // ... if ( !handle ) { // not valid ! }
Definition at line 64 of file install/include/rtt/Handle.hpp.
typedef sender_t::connection_t RTT::Handle::connection_t [private] |
the signal type
Definition at line 46 of file rtt/Handle.hpp.
typedef sender_t::connection_t RTT::Handle::connection_t [private] |
the signal type
Definition at line 46 of file install/include/rtt/Handle.hpp.
typedef internal::SignalBase RTT::Handle::sender_t [private] |
Definition at line 45 of file rtt/Handle.hpp.
typedef internal::SignalBase RTT::Handle::sender_t [private] |
Definition at line 45 of file install/include/rtt/Handle.hpp.
RTT::Handle::Handle | ( | ) |
the connection type for the slot of this Handle
Create an empty Handle.
Definition at line 46 of file Handle.cpp.
RTT::Handle::Handle | ( | connection_t | conn | ) |
Definition at line 51 of file Handle.cpp.
RTT::Handle::Handle | ( | const Handle & | hs | ) |
Create a copy-equivalent Handle.
Definition at line 56 of file Handle.cpp.
RTT::Handle::~Handle | ( | ) |
No-op destructor, does not change signal/slot state.
Definition at line 61 of file Handle.cpp.
RTT::Handle::Handle | ( | connection_t | conn | ) |
RTT::Handle::~Handle | ( | ) |
No-op destructor, does not change signal/slot state.
bool RTT::Handle::connect | ( | ) |
(Re-)Connect the slot with the signal.
true | the slot is connected. | |
false | no valid signal or slot in this Handle |
bool RTT::Handle::connect | ( | ) |
(Re-)Connect the slot with the signal.
true | the slot is connected. | |
false | no valid signal or slot in this Handle |
Definition at line 65 of file Handle.cpp.
bool RTT::Handle::connected | ( | ) | const |
Inspect if this Handle represents a connected signal and slot.
bool RTT::Handle::connected | ( | ) | const |
Inspect if this Handle represents a connected signal and slot.
Definition at line 79 of file Handle.cpp.
bool RTT::Handle::disconnect | ( | ) |
Disconnect the slot from the signal.
true | the slot is disconnected. | |
false | no valid signal or slot in this Handle |
bool RTT::Handle::disconnect | ( | ) |
Disconnect the slot from the signal.
true | the slot is disconnected. | |
false | no valid signal or slot in this Handle |
Definition at line 72 of file Handle.cpp.
RTT::Handle::operator bool | ( | ) | const |
RTT::Handle::operator bool | ( | ) | const |
Inspect if this Handle is pointing to a valid (existing) connection.
Definition at line 83 of file Handle.cpp.
bool RTT::Handle::ready | ( | ) | const |
Inspect if this handle is pointing to valid (existing) connection(s).
bool RTT::Handle::ready | ( | ) | const |
Inspect if this handle is pointing to valid (existing) connection(s).
Definition at line 87 of file Handle.cpp.
connection_t RTT::Handle::m_conn [protected] |
This is actually a smart pointer which always points to an existing connection object.
Definition at line 102 of file install/include/rtt/Handle.hpp.