Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Connection Class Reference

A signal connection class. More...

`#include <inti/connection.h>`

List of all members.

## Public Member Functions

Constructors

- Connection ()
    Default constructor.
- Connection (Node *node)
    Construct a connection object for node.
- Connection (const Connection &src)
    Copy constructor.
- ~Connection ()
    Destructor.
- Connection & operator= (const Connection &src)
    Assignment operator.

Accessors

- bool is_connected () const
    Determines whether the connection is connected to a slot.

Methods

- void block ()
    Block signal transmission to a slot.
- void unblock ()
    Unblock a previously blocked slot.
- void disconnect ()
    Disconnect a slot.

## Detailed Description

A signal connection class.

A Connection class is returned by value from a signal's connect() method. Using this class you can block, unblock and disconnect a signal connection. When re-assigning a signal connection to another Connection you don't need to disconnect the original connection first. The asssignment operator disconnects the original connection before re-assigning the new connection.

## Constructor & Destructor Documentation

Inti::Connection::Connection | ( | Node * | node | ) |

  | Construct a connection object for node. Parameters:
  node | A pointer to the Node class for this connection.

## Member Function Documentation

void Inti::Connection::block | ( |  | ) |

| Block signal transmission to a slot. The slot will not be called during any signal emissions unless it is unblocked again.

void Inti::Connection::disconnect | ( |  | ) |

| Disconnect a slot. The slot will not be called during any future or currently ongoing emissions of the signal it has been connected to.

bool Inti::Connection::is_connected | ( |  | ) | const

| Determines whether the connection is connected to a slot. Returns: true if connected to a slot. This method is useful when connecting and disconnecting a connection multiple times within a program.

void Inti::Connection::unblock | ( |  | ) |

| Unblock a previously blocked slot. A blocked slot is skipped during signal emissions and will not be invoked, unblocking it (for exactly the number of times it has been blocked before) reverts its "blocked" state, so the slot will be recognized by the signal system and is called upon future or currently ongoing signal emissions.

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

- connection.h

Main Page - Footer