All Projects → ddinu → Observable

ddinu / Observable

Licence: apache-2.0
Generic observable objects and reactive expressions for C++

Programming Languages

cplusplus
227 projects

Projects that are alternatives of or similar to Observable

chess
Chess (game)(♟) built in C# and ASCII art.
Stars: ✭ 20 (-92.42%)
Mutual labels:  reactive-programming
microservices-observability
🎉 Microservices Observability - Log Aggregation, Distributed Tracking, Metrics
Stars: ✭ 40 (-84.85%)
Mutual labels:  reactive-programming
rxify
Now: RxJava Playground, Previous: Demo for the talk at DroidconIN 2016, Droidcon Boston 2017 and Codelab for GDG January Meetup
Stars: ✭ 59 (-77.65%)
Mutual labels:  reactive-programming
webflux-streaming-demo
A tryout of reactive application using Spring 5 WebFlux and mongoDB, along with an overview article on reactive programming.
Stars: ✭ 96 (-63.64%)
Mutual labels:  reactive-programming
dspatch
The Refreshingly Simple Cross-Platform C++ Dataflow / Pipelining / Stream Processing / Reactive Programming Framework
Stars: ✭ 124 (-53.03%)
Mutual labels:  reactive-programming
react-mobx-router5
React components for routing solution using router5 and mobx
Stars: ✭ 58 (-78.03%)
Mutual labels:  reactive-programming
Rx.Book
High level asynchronous programming with Reactive Extensions
Stars: ✭ 67 (-74.62%)
Mutual labels:  reactive-programming
observable-playground
Know your Observables before deploying to production
Stars: ✭ 96 (-63.64%)
Mutual labels:  reactive-programming
Mp3ID3Tagger
🎶🎵A macOS application to edit the ID3 tag of your mp3 files. Developed with RxSwift and RxCocoa. 🎸🎼
Stars: ✭ 17 (-93.56%)
Mutual labels:  reactive-programming
reactive-pipes
A thin library around Reactive Extensions to simplify writing evented applications in C#.
Stars: ✭ 12 (-95.45%)
Mutual labels:  reactive-programming
reacted
Actor based reactive java framework for microservices in local and distributed environment
Stars: ✭ 17 (-93.56%)
Mutual labels:  reactive-programming
bs-most
Reason/BuckleScript bindings for the Most.js reactive toolkit
Stars: ✭ 41 (-84.47%)
Mutual labels:  reactive-programming
wobbuffetch
Reactive wrapper for Fetch API
Stars: ✭ 28 (-89.39%)
Mutual labels:  reactive-programming
risk
A game of Risk played on a hexgrid.
Stars: ✭ 95 (-64.02%)
Mutual labels:  reactive-programming
RxJava-Codelab
Codelab project for demonstration of RxJava features
Stars: ✭ 44 (-83.33%)
Mutual labels:  reactive-programming
stated-library
Stated Libraries: Composable/Reactive/Observable State
Stars: ✭ 48 (-81.82%)
Mutual labels:  reactive-programming
queueable
Convert streams to async ⌛ iterables ➰
Stars: ✭ 43 (-83.71%)
Mutual labels:  reactive-programming
Reactiveswift
Streams of values over time
Stars: ✭ 2,812 (+965.15%)
Mutual labels:  reactive-programming
SuperheroesAndroid
Android sample app using the Marvel API to show a list of superheroes
Stars: ✭ 14 (-94.7%)
Mutual labels:  reactive-programming
scalajs-all-in-one-template
The All-in-One Scala.js static web project template
Stars: ✭ 47 (-82.2%)
Mutual labels:  reactive-programming

Observable: Generic observable objects for C++

Write declarative, reactive expressions or just implement the observer pattern.

Observable is a self-contained, header-only library that has no depencencies. Drop it somewhere in your include path and you're good to go.

Quick start

Example:

.. code:: C++

#include <iostream>
#include <observable/observable.hpp>

using namespace std;
using namespace observable;

int main()
{
    auto sub = subject<void(string)> { };
    sub.subscribe([](auto const & msg) { cout << msg << endl; });

    // "Hello, world!" will be printed to stdout.
    sub.notify("Hello, world!");

    auto a = value<int> { 5 };
    auto b = value<int> { 5 };
    auto avg = observe(
                    (a + b) / 2.0f
               );
    auto eq_msg = observe(
                    select(a == b, "equal", "not equal")
                   );

    avg.subscribe([](auto val) { cout << val << endl; });
    eq_msg.subscribe([](auto const & msg) { cout << msg << endl; });

    // "10" and "not equal" will be printed to stdout in an
    // unspecified order.
    b = 15;

    return 0;
}

Documentation

You can access the documentation <https://danieldinu.com/observable/>_ here: https://danieldinu.com/observable/.

What's with the CMake files?

The library uses CMake to build the tests, benchmarks and documentation. You do not need CMake if you don't plan on running the tests or benchmarks.

Contributing

Bug reports, feature requests, documentation and code contributions are welcome and highly appreciated. Please open an issue or feature request before you start working on any pull request.

Legal and Licensing

The library is licensed under the Apache License version 2.0 <LICENSE.txt>_.

All contributions must be provided under the terms of this license.

Supported compilers

Any relatively recent compiler with C++14 support should work.

The code has been tested with the following compilers:

  • MSVC 15 (Visual Studio 2017)
  • MSVC 14 (Visual Studio 2015)
  • GCC 5, 6, 7
  • Clang 3.6, 3.8
  • AppleClang 9.1

Build status

Visual Studio 2017 builds:

  • |win32 15 build C++14|_ (32 bit, C++14)
  • |win64 15 build C++14|_ (64 bit, C++14)
  • |win32 15 build C++17|_ (32 bit, C++17)
  • |win64 15 build C++17|_ (64 bit, C++17)

.. |win32 15 build C++14| image:: https://ci.appveyor.com/api/projects/status/sgomsxwri8wknode?svg=true .. _win32 15 build C++14: https://ci.appveyor.com/project/ddinu/observable-crrsf

.. |win64 15 build C++14| image:: https://ci.appveyor.com/api/projects/status/tpr4qem5gxo7dntb?svg=true .. _win64 15 build C++14: https://ci.appveyor.com/project/ddinu/observable-uyjd7

.. |win32 15 build C++17| image:: https://ci.appveyor.com/api/projects/status/296i1mvgm7fht0f6?svg=true .. _win32 15 build C++17: https://ci.appveyor.com/project/ddinu/observable-2lmia

.. |win64 15 build C++17| image:: https://ci.appveyor.com/api/projects/status/i948buecj8j51by0?svg=true .. _win64 15 build C++17: https://ci.appveyor.com/project/ddinu/observable-ha4xx

Visual Studio 2015 builds:

  • |win32 14 build|_ (32 bit, C++14)
  • |win64 14 build|_ (64 bit, C++14)

.. |win32 14 build| image:: https://ci.appveyor.com/api/projects/status/bee1g4nlh25olmct/branch/master?svg=true .. _win32 14 build: https://ci.appveyor.com/project/ddinu/observable-xwigk

.. |win64 14 build| image:: https://ci.appveyor.com/api/projects/status/abi5swnpvc2nof3r/branch/master?svg=true .. _win64 14 build: https://ci.appveyor.com/project/ddinu/observable

Linux (GCC, Clang) and OS X (Clang) builds:

  • |travis build|_ (64 bit)

.. |travis build| image:: https://travis-ci.org/ddinu/observable.svg?branch=master .. _travis build: https://travis-ci.org/ddinu/observable

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].