libcamera: base: signal: Support connecting signals to functors
It can be useful to connect a signal to a functor, and in particular a lambda function, while still operating in the context of a receiver object (to support both object-based disconnection and queued connections to Object instances). Add a BoundMethodFunctor class to bind a functor, and a corresponding Signal::connect() function. There is no corresponding disconnect() function, as a lambda passed to connect() can't be later passed to disconnect(). Disconnection typically uses disconnect(T *object), which will cover the vast majority of use cases. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
@@ -878,6 +878,7 @@ EXCLUDE_PATTERNS = @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \
|
||||
|
||||
EXCLUDE_SYMBOLS = libcamera::BoundMethodArgs \
|
||||
libcamera::BoundMethodBase \
|
||||
libcamera::BoundMethodFunctor \
|
||||
libcamera::BoundMethodMember \
|
||||
libcamera::BoundMethodPack \
|
||||
libcamera::BoundMethodPackBase \
|
||||
|
||||
Reference in New Issue
Block a user