This prototype is a node-able bidirectionnal expression editor.
C++ / OpenGL / SDL2 / ImGui
You don’t know Nodable? check this out: Nodable website
Software architecture
The software is built to be dynamically reflective. The base class Object has members called Member. They can be added, modified (data and type) or removed at runtime. A Member wraps a Variant class that can handle basic data types such as Booleans (bool), Numbers (double) or Strings (std::string).
Two Members can be linked by a Wire. A Wire is an oriented edge, so it has a source and a target Value.
The Object derived class Entity is able to attach Component on it. Component is the base class for all components. For now there are only few components :
- View : to draw the entity on screen (derived: NodeView, WireView, ApplicationView…)
- Operation : to perform a computation (derived: BinaryOperation, BinaryOperationAdd, …Substract, …Multiply, … Divide)
- Container : to contain other entities.
- DataAccess: to load/save and entity to a JSON file.
Variable class is an Entity with a single Member named « value ».
Lexer class is an Entity able to convert an expression to a graph.
Application is a class to rule them all !
Source code
If you’re interested by the code source, you can download it from github.com
Platform compatibility :
Windows 7+ / Linux
History
- Video n°0 – First version in command line.
- Video n°1 – A first step with a GUI (FR)
- Video n°2 – Automatic Layout (FR)
- Video n°3 – First Talk about Nodable : Past, present and future (EN)
- Video n°4 – Nodable v0.6 (EN)
- Video n°5 – Nodable v0.7.0 (FR)
Bibliography
- Andy Balaam‘s Youtube videos about lexers: https://www.youtube.com/watch?v=TG0qRDrUPpA
- Alex Gaynor’s conference « So you want to write an interpreter? »: https://www.youtube.com/watch?v=LCslqgM48D4