14 #ifndef ECL_SIGSLOTS_LITE_SIGNAL_HPP_
15 #define ECL_SIGSLOTS_LITE_SIGNAL_HPP_
62 template <
typename Data=
void,
unsigned int Capacity = 1>
69 for (
unsigned int i = 0; i < Capacity; ++i) {
89 for (
unsigned int i = 0; i < Capacity; ++i ) {
90 if (
slots[i] == NULL ) {
103 unsigned int capacity()
const {
return Capacity; }
109 unsigned int stored()
const {
111 for (i = 0; i < Capacity; ++i ) {
112 if (
slots[i] == NULL ) {
125 void emit(Data data)
const {
126 for (
unsigned int i = 0; i < Capacity; ++i ) {
127 if (
slots[i] == NULL ) {
130 slots[i]->execute(data);
136 sigslots::SlotBase<Data> *
slots[Capacity];
147 template <
unsigned int Capacity>
148 class Signal<void,Capacity> {
154 for (
unsigned int i = 0; i < Capacity; ++i) {
173 sigslots::Error
connect(sigslots::SlotBase<void> &slot) {
174 for (
unsigned int i = 0; i < Capacity; ++i ) {
175 if (
slots[i] == NULL ) {
188 unsigned int capacity()
const {
return Capacity; }
195 unsigned int stored()
const {
197 for (i = 0; i < Capacity; ++i ) {
198 if (
slots[i] == NULL ) {
209 for (
unsigned int i = 0; i < Capacity; ++i ) {
210 if (
slots[i] == NULL ) {
219 sigslots::SlotBase<void> *
slots[Capacity];