-
Notifications
You must be signed in to change notification settings - Fork 43
Source Structure
Viktor Kovacs edited this page May 20, 2020
·
41 revisions
The source contains the following folders:
- Documentation: Here you can find some documentation related stuff, like images.
- Sources: The source code. See the following sections for details.
- Tools: Various tools for the project.
You can find some subfolders under the Sources folder. Every folder contains a separate compilation unit (module).
- NodeEngine: This module contains the code for the main engine. It implements the main logical and persistence layer of the application.
- NodeUIEngine: This module is responsible for User Interface and Event handling. This is a platform independent layer, every platform specific operation is handled by interfaces.
- BuiltInNodes: This is an optional module which contains some basic functionality. It is highly recommended to use this module in your application because it contains implementations for the most common use cases.
- TestFramework: This is a very simple unit testing framework used by the tests.
- NodeEngineTest: This is a platform independent automated test executable for all of the core modules.
- WindowsAppSupport: This module contains some windows implementations of the required interfaces. If you would like to use the engine on windows, these codes can help you a lot.
- WindowsEmbeddingDemo: This is a minimal test application which embeds the engine. This is a good starting point to understand how embedding works.
The NodeEngine module is responsible for storing the graph and do basic operations on it.
Module responsibilities:
- Node graph operations:
- Add/delete nodes.
- Connect/disconnect nodes.
- Merge graphs (support for copy/paste and undo/redo).
- Node graph evaluation:
- Calculate and cache node values.
- Invalidate node values automatically on any change.
- Detecting cycles in graph.
- Serialization.
- Localization.
The NodeUIEngine module is responsible for the visualization logic. This is a still platform independent layer, but it works with visualization related entities. Every platform dependent functionality is implemented outside this module, and they are communicating through interfaces.
Module responsibilities:
- Drawing of nodes and connections.
- Store the result drawing in a platform independent data structure.
- Handling user interactions:
- Navigation on the canvas.
- Mouse and keyboard events.
- Context menu commands.
- Copy/paste.
- Undo/redo.