How wqking/eventpp works
Project type and purpose
• This is a header-only C++ library (“eventpp”) that implements callbacks, event dispatching, and event queuing.
• Users embed the library in their own C++ projects to get signal/slot, publish/subscribe, or observer-pattern behavior without external dependencies.
File structure
• Top-level:
• cmake/, CMakeLists.txt → build configuration
• /eventpp/… → public headers (CallbackList, EventDispatcher, EventQueue, policies, mixins, utilities)
• /eventpp/internal/… → private implementation details
• /eventpp/mixins/… → extension mixins
• /eventpp/utilities/… → helper classes (AnyData, AnyId, argumentAdapter, etc.)
• doc/ → user docs, tutorials, Chinese translations
• tests/ → unit tests (Catch2), benchmarks, demos, tutorial examples
• No .cpp in src; it is purely header-only.
README for additional insights
• Core components: CallbackList, EventDispatcher, EventQueue
• Extension points: policies (e.g., thread safety, exception safety), mixins (e.g., filters)
• Utilities: zero-allocation AnyData, conditional removers, argument adapters, ordered queue list
• Build/test: CMake, Catch2, benchmarks, tutorials, packaging via Vcpkg/Conan
Detail
• Break the public API into its three main classes.
• CMake workflow and external packaging in a side panel.
• Header-only nature by grouping everything under “include/eventpp.”