Menu

Tree [r3] /
 History

HTTPS access


File Date Author Commit
 .deps 2009-07-04 llubnek [r1] initial import, version 1.0
 autom4te.cache 2009-07-04 llubnek [r1] initial import, version 1.0
 .directory 2009-07-04 llubnek [r1] initial import, version 1.0
 AUTHORS 2009-07-04 llubnek [r1] initial import, version 1.0
 COPYING 2009-07-04 llubnek [r1] initial import, version 1.0
 ChangeLog 2009-07-04 llubnek [r2] fixed bug which prevented members inherited fro...
 INSTALL 2009-07-04 llubnek [r1] initial import, version 1.0
 Makefile 2009-07-04 llubnek [r1] initial import, version 1.0
 Makefile.am 2009-07-04 llubnek [r1] initial import, version 1.0
 Makefile.in 2009-07-04 llubnek [r1] initial import, version 1.0
 NEWS 2009-07-04 llubnek [r2] fixed bug which prevented members inherited fro...
 README 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlot.hpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlot0.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlot1.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlot2.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlot3.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlot4.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlot5.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlot6.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlot7.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlot8.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection.cpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlotConnection.hpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlotConnection0.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection0_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection1.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection1_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection2.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection2_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection3.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection3_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection4.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection4_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection5.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection5_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection6.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection6_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection7.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection7_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection8.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnection8_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotConnectionManager.cpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlotConnectionManager.hpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlotConnectionN.hpp.template 2009-07-04 llubnek [r2] fixed bug which prevented members inherited fro...
 SigSlotConnectionN_imp.hpp.template 2009-07-04 llubnek [r2] fixed bug which prevented members inherited fro...
 SigSlotContainer.cpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlotContainer.hpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlotN.hpp.template 2009-07-04 llubnek [r2] fixed bug which prevented members inherited fro...
 SigSlotSignal.cpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlotSignal.hpp 2009-07-04 llubnek [r1] initial import, version 1.0
 SigSlotSignal0.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal0_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal1.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal1_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal2.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal2_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal3.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal3_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal4.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal4_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal5.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal5_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal6.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal6_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal7.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal7_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal8.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignal8_imp.hpp 2009-07-04 llubnek [r3] Updating generated files...
 SigSlotSignalN.hpp.template 2009-07-04 llubnek [r2] fixed bug which prevented members inherited fro...
 SigSlotSignalN_imp.hpp.template 2009-07-04 llubnek [r2] fixed bug which prevented members inherited fro...
 THANKS 2009-07-04 llubnek [r1] initial import, version 1.0
 aclocal.m4 2009-07-04 llubnek [r1] initial import, version 1.0
 boilerplate.txt 2009-07-04 llubnek [r1] initial import, version 1.0
 configure 2009-07-04 llubnek [r1] initial import, version 1.0
 configure.in 2009-07-04 llubnek [r1] initial import, version 1.0
 generate.py 2009-07-04 llubnek [r1] initial import, version 1.0
 slottest.cpp 2009-07-04 llubnek [r1] initial import, version 1.0

Read Me

SignalSlot 1.0 README

How to use this library:

To create a signal, declare it like so:
    // a signal with no parameters
    SigSlot::Signal0<> MySignal;
    
    // a signal with a single parameter of type int
    SigSlot::Signal1<int> IntSignal;
    
    // a signal with two parameters of type int and const char*
    SigSlot::Signal2<int, const char*> ErrorSignal;

To create a slot, subclass SigSlot::Container and create a member function to 
use as the slot:
    class MyContainer: public SigSlot::Coontainer       {
        public:
            void MySlot();
            void IntSlot(int);
            void ErrorSlot(int, const char*);
    };
    
    void MyContainer::MySlot()  {
        ...

To connect a signal to a slot, do this:
    MyContainer myc_instance;
    MySignal.connect(myc_instance, &MyContainer::MySlot);
    IntSignal.connect(myc_instance, &MyContainer::IntSlot);
    ErrorSignal.connect(myc_instance, &MyContainer::ErrorSlot);

To emit a signal and thereby call whatever slots are connected to it, do this:
    MySignal();
    IntSignal(5);
    ErrorSignal(42, "Question unknown");

or this:
    MySignal.emit();
    IntSignal.emit(5);
    ErrorSignal.emit(42, "Question unknown");

To connect a signal to a signal, so that the second signal is emitted whenever 
the first is, do this:
    Signal0<> AnotherSignal;
    AnotherSignal.connect(MySignal);

To disconnect a signal from all slots in a container, do this:
    IntSignal.disconnect(myc_instance);

Due to technical limitations of the C++ language it is not possible to 
disconnect an individual slot at this time.

The types of signals and slots must match in order to be connected.  For 
example, you cannot connect a signal with 0 parameters to a slot with 1 
parameter or vice versa, nor can you connect a signal with an int parameter to a
slot with a paramter of type const char*.

Slots must not return a value (return type void).  There is no way to pass the
return value back to the calling function anyway since a signal may trigger more
than one slot.

emit() is not a const member function.  This is because the signal has no 
knowledge of what a slot connected to it might do.  A slot might conceivably 
modify the signal that calls it or whatever object the signal is a member of.
With this in mind, don't be surprised if you can't emit a signal from a const 
member function.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.