Orocos Real-Time Toolkit  2.9.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
RTT::internal::ConnectionBase Class Reference

A connection 'memorises' the connection between an event and an event handler function. More...

#include <rtt/internal/SignalBase.hpp>

Inheritance diagram for RTT::internal::ConnectionBase:
RTT::internal::OROCOS_SIGNAL_CONNECTION_N< SlotFunction >

Public Types

typedef boost::intrusive_ptr< ConnectionBaseshared_ptr
 

Public Member Functions

 ConnectionBase (SignalBase *sig)
 
bool connected ()
 
bool connect ()
 
bool disconnect ()
 
void destroy ()
 

Protected Member Functions

void ref ()
 Increase the reference count by one. More...
 
void deref ()
 Decrease the reference count by one and delete this on zero. More...
 
virtual ~ConnectionBase ()
 

Protected Attributes

bool mconnected
 
SignalBasem_sig
 
os::AtomicInt refcount
 We require an internal refcount to ease self-addition and removal of this connection. More...
 

Friends

RTT_API friend void intrusive_ptr_add_ref (ConnectionBase *)
 
RTT_API friend void intrusive_ptr_release (ConnectionBase *)
 

Detailed Description

A connection 'memorises' the connection between an event and an event handler function.

It manages connection and destruction of a signal/slot pair. It is the central object which knows about one signal and its slot (the latter in its derived classes).

Definition at line 80 of file SignalBase.hpp.

Member Typedef Documentation

Definition at line 108 of file SignalBase.hpp.

Constructor & Destructor Documentation

RTT::internal::ConnectionBase::~ConnectionBase ( )
protectedvirtual

Definition at line 64 of file SignalBase.cpp.

RTT::internal::ConnectionBase::ConnectionBase ( SignalBase sig)

Definition at line 58 of file SignalBase.cpp.

Member Function Documentation

bool RTT::internal::ConnectionBase::connect ( )

Definition at line 67 of file SignalBase.cpp.

References m_sig, and mconnected.

bool RTT::internal::ConnectionBase::connected ( )
inline
void RTT::internal::ConnectionBase::deref ( )
protected

Decrease the reference count by one and delete this on zero.

Definition at line 56 of file SignalBase.cpp.

References RTT::os::AtomicInt::dec_and_test(), and refcount.

Referenced by RTT::internal::intrusive_ptr_release().

void RTT::internal::ConnectionBase::destroy ( )

Definition at line 77 of file SignalBase.cpp.

References RTT::internal::SignalBase::conn_destroy(), m_sig, and mconnected.

bool RTT::internal::ConnectionBase::disconnect ( )

Definition at line 72 of file SignalBase.cpp.

References m_sig, and mconnected.

void RTT::internal::ConnectionBase::ref ( )
protected

Increase the reference count by one.

Definition at line 55 of file SignalBase.cpp.

References RTT::os::AtomicInt::inc(), and refcount.

Referenced by RTT::internal::intrusive_ptr_add_ref().

Friends And Related Function Documentation

RTT_API friend void intrusive_ptr_add_ref ( ConnectionBase )
friend

Definition at line 52 of file SignalBase.cpp.

RTT_API friend void intrusive_ptr_release ( ConnectionBase )
friend

Definition at line 53 of file SignalBase.cpp.

Member Data Documentation

SignalBase* RTT::internal::ConnectionBase::m_sig
protected

Definition at line 86 of file SignalBase.hpp.

Referenced by connect(), destroy(), and disconnect().

bool RTT::internal::ConnectionBase::mconnected
protected
os::AtomicInt RTT::internal::ConnectionBase::refcount
protected

We require an internal refcount to ease self-addition and removal of this connection.

Definition at line 92 of file SignalBase.hpp.

Referenced by deref(), and ref().


The documentation for this class was generated from the following files: