-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the OpenCVGraph wiki!
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.
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.
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.
Here is a sequence diagram of the node creation process from the time the user clicked on a node in the NodesTree. ; 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; )