slot member

Sigslot, a reference slot library
Sigslot is a vertical-only, secure C ++ reference slot implementation.

The main goal was to replace Boost.Signals2.

Apart from the usual features, it offers

สมาชิก สล็อต

Thread integrity,
Object lifespan monitoring for automatic aperture separation (expandable via ADL),
RAII connection management,
Slot groups to enforce the slot execution command,
Reasonable performance. Simple and direct implementation.
Sigslot has been unit tested and should be reliable and stable enough to replace Boost Signals2.

Tests are done cleanly under the title, thread, and non-specific behavior sterilizers.

Many applications allow signal return types, and Sigslot doesn’t because I don’t have them. If I can convince myself otherwise, I might change my mind later.

No assembly or installation required, just include sigslot / signal.hpp and use it. Sigslot is currently based on a compiler compatible with C ++ 14, but if the need arises, it can be modified to C ++ 11. It is known to work with compilers for Clang 4.0 and GCC 5.0+ on GNU Linux, MSVC 2017 and later , and Clang-cl AND MinGW on Windows.

However, be aware of the possibility of a Windows problem with the MSVC and Clang-Cl compilers, which may require linker / OPT: NOICF tags in rare cases. Read the Deployment Details chapter for an explanation.

The CMake menu file is provided for the purpose of installing and creating a CMake import module. This is the preferred installation method. The imported destination Pal :: Sigslot is available and already applies the required link flags. Also required for examples and tests, optionally based on Qt5 and Boost for transformer unit testing.
Sigslot implements the common token aperture architecture in user interface frameworks, making it easy to use observer style or event-based programming. The main entry point for the library is the sigslot :: signal <T …> chapter template.

A token is an object that can send written notifications, the values ​​already defined after the token class template parameters, and log any number of callers for supported media types that will be executed using the supplied values ​​whenever a signal emission. In open parlance this is called slot-to-signal coupling, where “slot” represents an invokable state and “communication” can be thought of as a conceptual signal-to-slot link.

All the excerpts below are available as translatable source code in the sample subdirectory.

Primary use
This is the first example that shows the most important features of the library.

First we announce a signal signal without parameters, then we move on to connecting multiple slots and finally we emit a signal that leads to the call of each previously connected callable slot. Notice how the library handles various forms of callable objects.

Leave a Comment