Skip to content
Thomas Ville edited this page Jul 30, 2016 · 7 revisions

Welcome to the OpenCVGraph wiki!

Nodes and types

Node

Node objects are created by the NodesProvider and are the building blocks of a graph. A new Node is created each time we ask the NodesProvider. Each node have 2 sets of Parameter : inputs and outputs. The Parameters of a node are part of the node, that's why they are not allocated on the stack.

Parameter

A Parameter represents an input/output of a node. It has a Type and can check wether it is compatible with another Parameter or not.

Type

The Type objects are instantiated in the NodesProvider and are created only once. Parameters hold a std::shared_ptr to its type. This way, we can dynamically create new types at run-time with description files or something.

Node creation

Here is a sequence diagram of the node creation process from the time the user clicked on a node in the NodesTree. ![](http://g.gravizo.com/g? @startuml; User -> MyTreeCtrl : OnItemActivated(); MyTreeCtrl -> MyTreeCtrl : item->Get(); MyTreeCtrl -> NodesProvider : GetNewNode(); NodesProvider -> Package : NodeFactory(); NodesProvider --> MyTreeCtrl : << shared_ptr >>; MyTreeCtrl -> GraphView : AddNode(newNode); GraphView -> GraphEngine : AddNode(newNode); GraphView -> GraphView : Add a new GUINode; GraphView -> GraphView : UpdateRealtime(); GraphView -> GraphView : Redraw(); @enduml; )

Clone this wiki locally