aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Slot.hh
AgeCommit message (Collapse)AuthorFilesLines
2011-08-02Add explicit ReturnType cast to operator() of FbTk::SlotsPavel Labath1-4/+5
without this it wasn't possible to construct a Slot returning void from functors returning some real value because the compiler would complain about "return statement with a value in a function returning void". Theoretically, this may produce some unexpected type conversions, because static_cast is slightly stronger than implicit cast, but I judge the risk to be negligable (the alternative would be to provide explicit specializations for slots returning void - too much typing)
2011-06-15Prepare the Slot classes to be used as lua callbacksPavel Labath1-31/+59
Added some polish around them and, to mark this special occasion, moved them out of the SigImpl namespace. PS: This partially reverts commit 0775350fee345e37fb59835dda4d85664346b606, since I had to reintroduce ReturnType template parameter, because it will be used in lua. But Signal classes remain without the ReturnType, because I still cannot imagine how would it be used.
2011-05-10Last round of simplification of Signal/Slot classesPavel Labath1-39/+31
- merged all the common stuff from 0,1,2,3 argument versions into one common base class - removed ReturnType template parameter as it was instantiated with "void" everywhere and the current ignores the return value of the callbacks anyway
2011-05-10Simplify Slot.hhPavel Labath1-232/+43
Replace CallbackHolder, FunctorHolder and SlotHolder with a (smaller) set of polymorphic classes. SignalHolder now stores a (smart) pointer to the class.
2011-02-20Fixed a possible crash when using a slot m_holder = 0Henrik Kinnunen1-5/+9
2008-09-18Added new Signal/Slot system in FbTkHenrik Kinnunen1-0/+294
This is suppose to replace the obsolete Subject/Observer classes. See the src/tests/testSignals.cc for basic usage.