scim::Signal0< R, Marshal > Class Template Reference
SignalSlot

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

`#include <scim_signals.h>`

## Public Types

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

## Public Member Functions

Connection | connect (SlotType *slot)
SlotType * | slot ()
R | emit ()
R | operator() ()
| Function operator; calls emit().
Public Member Functions inherited from scim::Signal
| Signal ()
| Constructor.
virtual | ~Signal ()
| Destructor.
SlotNode * | connect (Slot *slot)
| Creates a new SlotNode for slot and adds it to the connection_list.

## Additional Inherited Members

Protected Types inherited from scim::Signal
typedef std::vector< Pointer< SlotNode > > | ConnectionList
| ConnectionList type.
Protected Attributes inherited from scim::Signal
ConnectionList | connection_list
| A list of all the slots connected to the signal.

## Detailed Description

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

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

## Member Typedef Documentation

## SlotType

template<typename R, typename Marshal = class DefaultMarshal<R>>

typedef Slot0<R> scim::Signal0< R, Marshal >::SlotType

Function signature for handlers connecting the signal.

## Member Function Documentation

## connect()

template<typename R, typename Marshal = class DefaultMarshal<R>>

Connection scim::Signal0< R, Marshal >::connect | ( | 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.

References scim::Signal::connect(), and slot().

## slot()

template<typename R, typename Marshal = class DefaultMarshal<R>>

SlotType * scim::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.

Referenced by connect(), and emit().

## emit()

template<typename R, typename Marshal = class DefaultMarshal<R>>

R scim::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.

References scim::Signal::connection_list, and slot().

Referenced by operator()(), and scim::Signal0< void, IgnoreMarshal >::operator()().

## operator()()

template<typename R, typename Marshal = class DefaultMarshal<R>>

R scim::Signal0< R, Marshal >::operator() | ( |  | ) |

inline

Function operator; calls emit().

References emit().

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

- scim_signals.h