properties-cpp 0.0.3
A very simple convenience library for handling properties and signals in C++11.
core::Connection Class Reference

The Connection class models a signal-slot connection. More...

#include <connection.h>

+ Collaboration diagram for core::Connection:

Public Types

typedef std::function< void(const std::function< void()> &)> Dispatcher
 

Public Member Functions

bool is_connected () const
 Checks if this instance corresponds to an active signal-slot connection. More...
 
void disconnect ()
 End a signal-slot connection. More...
 
void dispatch_via (const Dispatcher &dispatcher)
 Installs a dispatcher for this signal-slot connection. More...
 

Detailed Description

The Connection class models a signal-slot connection.

Definition at line 31 of file connection.h.

Member Typedef Documentation

◆ Dispatcher

typedef std::function<void(const std::function<void()>&)> core::Connection::Dispatcher

Definition at line 34 of file connection.h.

Member Function Documentation

◆ disconnect()

void core::Connection::disconnect ( )
inline

End a signal-slot connection.

Definition at line 51 of file connection.h.

Referenced by TEST(), and core::ScopedConnection::~ScopedConnection().

◆ dispatch_via()

void core::Connection::dispatch_via ( const Dispatcher dispatcher)
inline

Installs a dispatcher for this signal-slot connection.

Parameters
dispatcherThe dispatcher to be used for signal emissions.

Definition at line 61 of file connection.h.

Referenced by TEST().

◆ is_connected()

bool core::Connection::is_connected ( ) const
inline

Checks if this instance corresponds to an active signal-slot connection.

Returns
true iff the instance corresponds to an active signal-slot connection.

Definition at line 40 of file connection.h.


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