ScopedHandle Class Reference

#include <rtt/Handle.hpp>

Inheritance diagram for ScopedHandle:

Handle

List of all members.


Detailed Description

A scoped connection Handle of a (connected) slot which disconnects a slot from a signal in its destructor.

Definition at line 134 of file Handle.hpp.


Public Member Functions

 ScopedHandle (const Handle &hs)
 ~ScopedHandle ()
 If connected, disconnect the slot from the signal.
bool connect ()
 (Re-)Connect the slot with the signal.
bool disconnect ()
 Disconnect the slot from the signal.
bool connected () const
 Inspect if this Handle represents a connected signal and slot.
 operator bool () const
 Inspect if this Handle is pointing to a valid (existing) connection.
bool ready () const
 Inspect if this handle is pointing to valid (existing) connection(s).

Protected Attributes

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

Member Function Documentation

bool connect (  )  [inherited]

(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 64 of file Handle.cpp.

References Handle::connected(), and Handle::m_conn.

Referenced by EventProcessor::connect(), Event< void(void) >::connect(), and EventDrivenActivity::start().

bool disconnect (  )  [inherited]

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 71 of file Handle.cpp.

References Handle::connected(), and Handle::m_conn.

Referenced by EventDrivenActivity::stop(), and ScopedHandle::~ScopedHandle().

bool connected (  )  const [inherited]

Inspect if this Handle represents a connected signal and slot.

Returns:
true if a connection is present.

Definition at line 78 of file Handle.cpp.

References Handle::m_conn.

Referenced by Handle::connect(), and Handle::disconnect().

operator bool (  )  const [inherited]

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

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

Definition at line 82 of file Handle.cpp.

References Handle::m_conn.

bool ready (  )  const [inherited]

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 86 of file Handle.cpp.

References Handle::m_conn.


The documentation for this class was generated from the following files:
Generated on Tue Mar 25 17:41:56 2008 for OrocosReal-TimeToolkit by  doxygen 1.5.3