$search

RTT::Handle Class Reference

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>

Inheritance diagram for RTT::Handle:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool connect ()
bool connected () const
bool disconnect ()
 Handle (const Handle &hs)
 Handle (connection_t conn)
 Handle ()
 the connection type for the slot of this Handle
 operator bool () const
bool ready () const
 ~Handle ()

Protected Attributes

connection_t m_conn

Private Types

typedef sender_t::connection_t connection_t
 the signal type
typedef internal::SignalBase sender_t

Detailed Description

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 66 of file Handle.hpp.


Member Typedef Documentation

the signal type

Definition at line 70 of file Handle.hpp.

Definition at line 69 of file Handle.hpp.


Constructor & Destructor Documentation

RTT::Handle::Handle (  ) 

the connection type for the slot of this Handle

Create an empty Handle.

Definition at line 43 of file Handle.cpp.

RTT::Handle::Handle ( connection_t  conn  ) 

Definition at line 48 of file Handle.cpp.

RTT::Handle::Handle ( const Handle hs  ) 

Create a copy-equivalent Handle.

Definition at line 53 of file Handle.cpp.

RTT::Handle::~Handle (  ) 

No-op destructor, does not change signal/slot state.

Definition at line 58 of file Handle.cpp.


Member Function Documentation

bool RTT::Handle::connect (  ) 

(Re-)Connect the slot with the signal.

Return values:
true the slot is connected.
false no valid signal or slot in this Handle

Definition at line 62 of file Handle.cpp.

bool RTT::Handle::connected (  )  const

Inspect if this Handle represents a connected signal and slot.

Returns:
true if a connection is present.

Definition at line 76 of file Handle.cpp.

bool RTT::Handle::disconnect (  ) 

Disconnect the slot from the signal.

Return values:
true the slot is disconnected.
false no valid signal or slot in this Handle

Definition at line 69 of file Handle.cpp.

RTT::Handle::operator bool (  )  const

Inspect if this Handle is pointing to a valid (existing) connection.

Returns:
false if no connection is associated with this Handle.

Definition at line 80 of file Handle.cpp.

bool RTT::Handle::ready (  )  const

Inspect if this handle is pointing to valid (existing) connection(s).

Returns:
false if no connection(s) is associated with this handle.

Definition at line 84 of file Handle.cpp.


Member Data Documentation

This is actually a smart pointer which always points to an existing connection object.

Definition at line 126 of file Handle.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Mar 1 16:27:39 2013