Add-Ons & Services

A reactive version of variables and containers.

Discussion of ideas for features and new projects based on POCO.

A reactive version of variables and containers.

Postby axilmar » 02 Dec 2011, 19:57

Hello everyone.

I discovered Poco entirely by accident, and I am really impressed to what I have seen so far. I am a user of Qt both as a hobbyist and as a professional, but I would really love a quality alternative to it, and Poco seems just the right tool for the job (minus the gui, that is).

Anyway, here is is one item from my wishlist: a library of reactive variables and containers, i.e. a set of classes that fire events when something important happens to them.

For example, a reactive integer:

Code: Select all
ReactiveInt i = 0;
i.onChange += delegate(myClass, &MyClass::myFunction);
i = 5; //invokes MyClass::MyFunction.

A reactive linked list:

Code: Select all
ReactiveList<int> data;
data.onInsert += delegate(myClass, &MyClass::myFunction1);
data.onRemove += delegate(myClass, &MyClass::myFunction2);
data.onClear += delegate(myClass, &MyClass::myFunction3);

data.push_back(1); //invokes MyClass::myFunction1.
data.erase(data.begin()); //invokes MyClass::myFunction2.
data.clear(); //invokes MyClass::myFunction3.

Such a module will allow to easily separate data from other functionality in an application, allow easy use of the Model-View pattern, and also help debugging (catching those erroneous values when the corresponding variables are assigned).

The module should ideally have reactive primitives and reactive containers.
Posts: 8
Joined: 02 Dec 2011, 19:42

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest