Template Class MemberSlots

Inheritance Relationships

Base Type

Class Documentation

template<typename Data, typename FunctionClass, unsigned int Capacity = 1>
class MemberSlots : public ecl::lite::sigslots::MemberSlotsBase<Data, FunctionClass>

This is the member slot interface, inheritable by classes.

To enable slots for your class, simply inherit this interface.

class Foo : public ecl::lite::MemberSlots<const char*,Foo> {
public:
       void f(const char* str) {
           std::cout << "Foo::f() " << str << std::endl;
       }
};

int main() {
    Foo foo;
    ecl::lite::Signal<const char*> signal;
    connect(signal,&Foo::f,foo);
    signal.emit("Dude");
Template Parameters:
  • Data – : the footprint for the member function to slot.

  • FunctionClass – : the class it will provide slots for.

  • Capacity – : the number of functions from FunctionClass you’ll slot.

Protected Functions

inline MemberSlots()

Friends

template<typename Data_, unsigned int Capacity_, typename FunctionClass_>
friend sigslots::Error connect(Signal<Data_, Capacity_> &signal, void (FunctionClass_::* f)(Data_), FunctionClass_ &o)
template<typename Data_, typename FunctionClass_>
friend unsigned int member_slots_stored(const FunctionClass_ &object)
template<typename Data_, typename FunctionClass_>
friend unsigned int member_slots_capacity(const FunctionClass_ &object)