cppexpose  1.0.0.b785e04f23b8
C++ library for type introspection, reflection, and scripting interface
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cppexpose::Connection Class Reference

Object that represents a connection to a signal. More...

#include <cppexpose/include/cppexpose/signal/Connection.h>

Classes

struct  State
 Connection state. More...
 

Public Types

typedef unsigned int Id
 Identifier type for signals. More...
 

Public Member Functions

 Connection ()
 Constructor. More...
 
 Connection (const Connection &other)
 Copy Constructor. More...
 
 Connection (Connection &&other)
 Move Constructor. More...
 
Connectionoperator= (const Connection &other)
 Copy operator. More...
 
Connectionoperator= (Connection &&other)
 Move operator. More...
 
Id id () const
 Get connection ID. More...
 
void disconnect ()
 Close connection. More...
 

Protected Member Functions

 Connection (const AbstractSignal *signal, Id id)
 Constructor. More...
 
void detach ()
 Detach connection. More...
 

Protected Attributes

std::shared_ptr< Statem_state
 Connection state. More...
 

Friends

class AbstractSignal
 

Detailed Description

Object that represents a connection to a signal.

Member Typedef Documentation

typedef unsigned int cppexpose::Connection::Id

Identifier type for signals.

Constructor & Destructor Documentation

cppexpose::Connection::Connection ( )

Constructor.

cppexpose::Connection::Connection ( const Connection other)

Copy Constructor.

Parameters
[in]otherConnection
cppexpose::Connection::Connection ( Connection &&  other)

Move Constructor.

Parameters
[in]otherConnection
cppexpose::Connection::Connection ( const AbstractSignal signal,
Id  id 
)
protected

Constructor.

Parameters
[in]signalSource signal
[in]idConnection ID

Member Function Documentation

Connection& cppexpose::Connection::operator= ( const Connection other)

Copy operator.

Parameters
[in]otherConnection
Returns
Reference to this object
Connection& cppexpose::Connection::operator= ( Connection &&  other)

Move operator.

Parameters
[in]otherConnection
Returns
Reference to this connection
Id cppexpose::Connection::id ( ) const

Get connection ID.

Returns
Connection ID

Referenced by cppexpose::Signal< Arguments >::connect().

void cppexpose::Connection::disconnect ( )

Close connection.

void cppexpose::Connection::detach ( )
protected

Detach connection.

Friends And Related Function Documentation

friend class AbstractSignal
friend

Member Data Documentation

std::shared_ptr<State> cppexpose::Connection::m_state
protected

Connection state.


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