Public Member Functions | Private Attributes
ecl::lite::Signal< void, Capacity > Class Template Reference

Specialisation of the signal for data-less sigslots. More...

#include <signal.hpp>

List of all members.

Public Member Functions

unsigned int capacity () const
 The reserved capacity for this signaller.
sigslots::Error connect (sigslots::SlotBase< void > &slot)
 Connect the signal to the specified slot.
void emit () const
 Signal slots with the specified data.
 Signal ()
 Initialise the storage.
unsigned int stored () const
 The current number of connections stored.

Private Attributes

sigslots::SlotBase< void > * slots [Capacity]

Detailed Description

template<unsigned int Capacity>
class ecl::lite::Signal< void, Capacity >

Specialisation of the signal for data-less sigslots.

Specialises the signal class for use with void callbacks. In this situation, it is purely a signaller, nothing else.

Template Parameters:
Capacity: the number of slot connections to reserve.

Definition at line 148 of file signal.hpp.


Constructor & Destructor Documentation

template<unsigned int Capacity>
ecl::lite::Signal< void, Capacity >::Signal ( ) [inline]

Initialise the storage.

Definition at line 153 of file signal.hpp.


Member Function Documentation

template<unsigned int Capacity>
unsigned int ecl::lite::Signal< void, Capacity >::capacity ( ) const [inline]

The reserved capacity for this signaller.

Returns:
unsigned int : the capacity.

Definition at line 188 of file signal.hpp.

template<unsigned int Capacity>
sigslots::Error ecl::lite::Signal< void, Capacity >::connect ( sigslots::SlotBase< void > &  slot) [inline]

Connect the signal to the specified slot.

This will attach the slot (note that it is a permanent attachment) so long as the reserved capacity isn't already fully utilised.

Valid return values:

  • NoError
  • OutOfResourcesError
Parameters:
slot: the slot to connect.
Returns:
Error : the sigslots error

Definition at line 173 of file signal.hpp.

template<unsigned int Capacity>
void ecl::lite::Signal< void, Capacity >::emit ( ) const [inline]

Signal slots with the specified data.

Definition at line 208 of file signal.hpp.

template<unsigned int Capacity>
unsigned int ecl::lite::Signal< void, Capacity >::stored ( ) const [inline]

The current number of connections stored.

Returns:
unsigned int : no. of connections.

Definition at line 195 of file signal.hpp.


Member Data Documentation

template<unsigned int Capacity>
sigslots::SlotBase<void>* ecl::lite::Signal< void, Capacity >::slots[Capacity] [private]

Definition at line 219 of file signal.hpp.


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


ecl_sigslots_lite
Author(s): Daniel Stonier
autogenerated on Sun Oct 5 2014 23:35:27