properties-cpp: core::Connection Class Reference

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.
void | disconnect ()
| End a signal-slot connection.
void | dispatch_via (const Dispatcher &dispatcher)
| Installs a dispatcher for this signal-slot connection.

## 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().

## ◆ dispatch_via()

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

Installs a dispatcher for this signal-slot connection.

Parameters

  dispatcher | The 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:

- /build/properties-cpp/src/properties-cpp-0.0.4/include/core/connection.h