All Projects → skypjack → Eventpp

skypjack / Eventpp

Licence: mit
Minimal C++ Event Bus

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Eventpp

HiFramework.Unity
Based on component to manage project's core logic and module used in unity3d
Stars: ✭ 22 (-68.12%)
Mutual labels:  event, signal
fine
🧹 Gracefully shutdown Node.js application: help you handle exit signals and cleanup
Stars: ✭ 20 (-71.01%)
Mutual labels:  event, signal
purescript-wire
Events and Signals for FRP. Monad instances included
Stars: ✭ 13 (-81.16%)
Mutual labels:  event, signal
Recoil
Asynchronous coroutines for PHP 7.
Stars: ✭ 765 (+1008.7%)
Mutual labels:  event
Js Collider
Java network (NIO) application framework: performance and scalability.
Stars: ✭ 25 (-63.77%)
Mutual labels:  event
Pulsesensorstarterproject
The Best Way to Get Started with your PulseSensor and Arduino
Stars: ✭ 38 (-44.93%)
Mutual labels:  signal
Hack Day
An event organised by GNU/Linux Users' Group, NIT Durgapur. Visit
Stars: ✭ 64 (-7.25%)
Mutual labels:  event
Yedda
YEDDA: A Lightweight Collaborative Text Span Annotation Tool. Code for ACL 2018 Best Demo Paper Nomination.
Stars: ✭ 704 (+920.29%)
Mutual labels:  event
Project Sauron
Tools to create a Native Windows Audit Collection Platform. Active Directory example provided
Stars: ✭ 58 (-15.94%)
Mutual labels:  event
Observable
Observer pattern and signals/slots for C++11 projects
Stars: ✭ 27 (-60.87%)
Mutual labels:  signal
Breadcast
Small Broadcast Receiver Library for Android
Stars: ✭ 15 (-78.26%)
Mutual labels:  event
Adapt
Advanced Developer Async Programming Toolkit
Stars: ✭ 26 (-62.32%)
Mutual labels:  event
Postix
Cashdesk system used at Chaos Communication Congress
Stars: ✭ 42 (-39.13%)
Mutual labels:  event
Wide Residual Nets For Seti
Classification of simulated radio signals using Wide Residual Networks for use in the search for extra-terrestrial intelligence
Stars: ✭ 22 (-68.12%)
Mutual labels:  signal
Danf
Danf is a Node.js full-stack isomorphic OOP framework allowing to code the same way on both client and server sides. It helps you to make deep architectures and handle asynchronous flows in order to help in producing scalable, maintainable, testable and performant applications.
Stars: ✭ 58 (-15.94%)
Mutual labels:  event
Calendar Phonegap Plugin
📅 Cordova plugin to Create, Change, Delete and Find Events in the native Calendar
Stars: ✭ 729 (+956.52%)
Mutual labels:  event
Redux Electron Ipc
Redux Electron IPC Middleware
Stars: ✭ 54 (-21.74%)
Mutual labels:  event
Sinewave
Sine wave library for Arduino. Produces a sine signal and passes the output to a PWM pin.
Stars: ✭ 11 (-84.06%)
Mutual labels:  signal
Alf.io
alf.io - The open source ticket reservation system for conferences, trade shows, workshops, meetups
Stars: ✭ 862 (+1149.28%)
Mutual labels:  event
Unity Signals
Signals for Unity3D
Stars: ✭ 32 (-53.62%)
Mutual labels:  signal

Event++ - Minimal C++ message system

Build Status

Note

This project is no longer maintained.
The event handler and much more has conveyed in EnTT, another project of mine.
Please, refer to the official documentation for more details.

Feel free to keep using Event++ if you want, but do not expect support or new functionalities in future.
Otherwise, try to give a chance to EnTT and you'll see it will not disappoint you.

Synopsis

Minimal C++ message system aimed to work as an event bus for the application.

This class is not meant as a drop-in replacement for the std::function. That is not the purpose of these classes nor the expectation is to get better performance.
This is meant as an event bus, nothing more.

Code Example

Here is an example of use:

using namespace eventpp;

struct EventA: public Event<EventA> { EventA(int) { } };
struct EventB: public Event<EventB> { };
struct EventC: public Event<EventC> { };

void fn(const EventB &) { }

struct MyListener
{
    void receive(const EventA &) { }
    void listen(const EventB &) { }
    void receive(const EventC &) { }
};

using MyBus = Bus<EventA, EventB, EventC>;

// ...

std::shared_ptr<MyListener> listener = std::make_shared<MyListener>();
MyBus bus{};

// ...

// member methods named receive are automatically attached to the bus
bus.reg(listener);

// all the other member methods can be easily attached too
bus.add<EventB, MyListener, &MyListener::listen>(listener);

// also, member methods named receive can be added or removed as it follows
bus.remove<EventA>(listener);
bus.add<EventA>(listener);

// functions are accepted citizens as well
bus.add<EventB, fn>();
bus.remove<EventB, fn>();

// finally, events can be emitted with a single command
bus.publish<EventA>(42);
bus.publish<EventB>();
bus.publish<EventC>();

And that's all.

Motivation

Uhm... Well, I was experimenting. What else?
I needed a minimal event bus for my applications, something easy to use and with a bunch of features like auto disconnection support for the listeners and auto registration of the member methods.

Installation

The eventpp library is a header only library.
Because of that, a user is demanded simply to include it and all the functionalities will be available at once.
Please, note that all the types are part of the eventpp namespace.

Contributors

Michele Caini (skypjack)

License

The MIT License (MIT)

Copyright © 2016 Michele Caini

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].