iritkatriel / spreadsheet Public
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Code
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
spreadsheet is a C++ library that enables "spreadsheet-programming", i.e., setting up variables ('cells') where each cell is assigned an expression that can contain the values of other cells. Changes are propagated to all dependent cells, as in a spreadsheet.
You create a new cell as follows:
Cell<double> a = sheet.NewCell<double>("a");
And you assign an expression to a cell as follows:
Cell<double> a = sheet.NewCell<double>("a");
Cell<double> b = sheet.NewCell<double>("b");
a.Set( SQRT(2 * b()) );
b.Set(18.3);
You get the current value of a cell with:
a.Value()
See main.cpp for a complete program with a simple usage example.
Spreadsheet was developed to demonstrate the use of streamulus. There are currently a few limitations, which will be removed if there is interest in this library for its own sake:
* Cyclic dependencies are not detected. You will be rewarded with the infinite loop you deserve.
* Note that in the code above, we needed to write "b()" in the expression assigned to a, rather than just "b". This is unfortunate, and with some proto-trickery can be fixed.
See also:
Blog post at http://streamulus.blogspot.co.uk/2012/08/spreadsheet-programming-in-c.html
Building:
spreadsheet is a header-only library. It uses boost and streamulus. So put these three libraries in your include path. That's all.
About
c++ library for reactive programming. Based on streamulus.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published