All Projects → dacap → Observable

dacap / Observable

Licence: mit
Observer pattern and signals/slots for C++11 projects

Programming Languages

cpp
1120 projects

Labels

Projects that are alternatives of or similar to Observable

binance-pump-alerts
Tracks prices of pairs on binance and notifies when price movements based on pre-defined parameters are met.
Stars: ✭ 65 (+140.74%)
Mutual labels:  signal
tmo-live-graph
A simpe react app that plots a live view of the T-Mobile Home Internet Nokia 5G Gateway signal stats, helpful for optimizing signal.
Stars: ✭ 15 (-44.44%)
Mutual labels:  signal
Signal Back
Decrypt Signal encrypted backups outside the app
Stars: ✭ 468 (+1633.33%)
Mutual labels:  signal
sigctx
context with signal in golang
Stars: ✭ 19 (-29.63%)
Mutual labels:  signal
acto
A signals library for functional reactive programming
Stars: ✭ 18 (-33.33%)
Mutual labels:  signal
stockwell
Stockwell transform for Python
Stars: ✭ 38 (+40.74%)
Mutual labels:  signal
SciDataTool
SciDataTool is an open-source Python package for scientific data handling. The objective is to provide a user-friendly, unified, flexible module to postprocess any kind of signal. It is meant to be used by researchers, R&D engineers and teachers in any scientific area. This package allows to efficiently store data fields in the time/space or in …
Stars: ✭ 21 (-22.22%)
Mutual labels:  signal
Cs.2click
🔊 A Better Audio Router for a Modular System.
Stars: ✭ 7 (-74.07%)
Mutual labels:  signal
presage
A high-level Rust library to help write clients for the Signal Messenger.
Stars: ✭ 27 (+0%)
Mutual labels:  signal
Uspeech
Speech recognition toolkit for the arduino
Stars: ✭ 448 (+1559.26%)
Mutual labels:  signal
signal-cli-rest-api
signal-cli-rest-api is a wrapper around signal-cli and allows you to interact with it through http requests
Stars: ✭ 26 (-3.7%)
Mutual labels:  signal
DTMF-Decoder
A Java program to implement a DMTF Decoder.
Stars: ✭ 28 (+3.7%)
Mutual labels:  signal
signal-bot
A simple bot framework for Signal
Stars: ✭ 92 (+240.74%)
Mutual labels:  signal
golib
Open version of common golang libraries useful to many projects.
Stars: ✭ 47 (+74.07%)
Mutual labels:  signal
Eventpp
Event Dispatcher and callback list for C++
Stars: ✭ 474 (+1655.56%)
Mutual labels:  signal
ctxutil
utils for Go context
Stars: ✭ 18 (-33.33%)
Mutual labels:  signal
signal2html
Export a Signal backup to pretty HTML
Stars: ✭ 45 (+66.67%)
Mutual labels:  signal
Sinewave
Sine wave library for Arduino. Produces a sine signal and passes the output to a PWM pin.
Stars: ✭ 11 (-59.26%)
Mutual labels:  signal
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 (-18.52%)
Mutual labels:  signal
Neurokit
NeuroKit2: The Python Toolbox for Neurophysiological Signal Processing
Stars: ✭ 264 (+877.78%)
Mutual labels:  signal

Observable Library

Copyright (C) 2016-2021 David Capello

build MIT Licensed

Library to use the observer pattern in C++11 programs with observable/observer classes or signals/slots.

Features

  • Generate an observable notification/signal from multiple threads
  • Add/remove observers/slots from multiple threads
  • Erase/disconnect an observer/slot from the same observable notification/signal
  • Reconnect an observer in the same notification

Observable

An observable Widget:

#include "obs.h"

class WidgetObserver {
public:
  virtual ~WidgetObserver() = 0;
  virtual void onClick() { }
};

class Widget : public obs::observable<WidgetObserver> {
public:
  void processClick() {
    notify_observers(&WidgetObserver::onClick);
  }
};

An example

#include "obs.h"

class ObserveClick : public WidgetObserver {
public:
  void onClick() override {
    // Do something...
  }
};

...
ObserveClick observer;
Widget button;
button.add_observer(&observer);

Signal

#include "obs.h"

int main() {
  obs::signal<void (int, int)> sig;
  sig.connect([](int x, int y){ ... });
  sig(1, 2); // Generate signal
}

Tested Compilers

  • Visual Studio 2015
  • Xcode 7.3.1 (-std=c++11)
  • GCC 4.8.4 (-std=c++11)
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].