Reference Manual

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

# Inti::Signal0< R, Marshal > Class Template Reference

A template for a signal passing no arguments and returning a value of type R. More...

`#include <inti/signals.h>`

Inheritance diagram for Inti::Signal0< R, Marshal >:

List of all members.

## Public Types

- typedef Slot0< R > SlotType
    Function signature for handlers connecting the signal.

## Public Member Functions

- Connection connect (const SlotType *slot)
    Connect a slot to the signal.
- SlotType * slot ()
    Returns a slot for this signal.
- R emit ()
    Emit the signal.
- R operator() ()
    Function operator; calls emit().

## Detailed Description

### template<typename R, typename Marshal = DefaultMarshal<R>>
class Inti::Signal0< R, Marshal >

A template for a signal passing no arguments and returning a value of type R.

## Member Function Documentation

template<typename R, typename Marshal = DefaultMarshal<R>>
Connection Inti::Signal0< R, Marshal >::connect | ( | const SlotType * | slot | ) | `[inline]`

  | Connect a slot to the signal. Parameters:
  slot | A slot of type Slot0<R>.
Returns: A connection object. The returned connection object can be used alter or change the connection.

template<typename R, typename Marshal = DefaultMarshal<R>>
R Inti::Signal0< R, Marshal >::emit | ( |  | ) | `[inline]`

| Emit the signal. Returns: The value returned by the signal handler. Calls every slot connected to this signal, in order of connection.

template<typename R, typename Marshal = DefaultMarshal<R>>
SlotType* Inti::Signal0< R, Marshal >::slot | ( |  | ) | `[inline]`

| Returns a slot for this signal. Returns: A new slot of type Slot0<R>. The returned slot can be passed to another signal allowing the other signal to call this signal when it gets emitted.

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

- signals.h

Main Page - Footer