Divooka.Framework
Divooka.Framework.Advanced.ChooseValueNode
Choose input based on matching value.
The matching values are that of the switching object (notice those can be of varying types as well), while the output value can be anything depending on available options.
Remarks
TODO: Add dynamic behavior when Primary Input is connected.
Also see LogicRoutines.OneHotSwitch.
Also see LogicRoutines.Choose2 and LogicRoutines.Choose3 mock implementation.
Divooka.Framework.Advanced.ExposeObjectPropertiesNode
A "Break" (not in the procedural sense) node for accessing object properties.
Remarks
Use this to inspect what's available on source object.
Can also use this to explicitly/manually extract properties from objects - equivalent to making reflective get property value calls.
Divooka.Framework.Advanced.GraphInputOutputDefinitionViewModel
Remarks
This is a Core construct! It will be moved to CoreEngien if not for ObservableObject crap.
Divooka.Framework.Advanced.GraphInputOutputDefinitionViewModel.ValueString
For composite/non-primitive value types, this one will just be empty and it should be fine.
Divooka.Framework.Advanced.GraphInputOutputNodeBase
Remarks
See GraphInputOutputComboDataTypeNameToTypeConverter for supported primitive types
Divooka.Framework.Advanced.GraphInputOutputNodeBase.DefinitionChanged()
This event is called whenever an associated GraphInputOutputDefinitionViewModel is changed.
Children classes can selectively implement this callback if they contain GraphInputOutputDefinitionViewModel.
Divooka.Framework.Advanced.GraphInputOutputNodeBase.PostAddEntry()
Different children may treat the definition differently, e.g. as either input or output.
Divooka.Framework.Advanced.GraphInputOutputNodeBase.PostRemoveEntry
Different children may treat the definition differently, e.g. as either input or output.
Divooka.Framework.Advanced.GraphInputOutputNodeBase.PreSerializationEvent
Give children types a chance to update definitions prior to serialization. E.g. synchronize custom input/output controls' literal values to that of GraphInputOutputDefinition.
Divooka.Framework.Advanced.SwitchValueNode
A dataflow context Switch node that returns boolean value on matching values.
Remarks
This would make more sense for the procedural version, which determines execution branch based on switching values.
TODO: Make corresponding one in procedural context.
Divooka.Framework.Advanced.ProceduralCustomEvent
Remarks
Such events can have inputs but no outputs.
Divooka.Framework.Advanced.ProceduralCustomEvent._parameterOutputs
A list of generated functional outputs.
Divooka.Framework.Advanced.ProceduralCustomEvent.EventNameNormalized
Normalized name for code use.
Divooka.Framework.Advanced.ProceduralCustomEvent.Parameters
A list of supplied parameters during current evaluation loop.
Divooka.Framework.Advanced.ProceduralCustomEvent.GetNext
Children should override to provide customized execution behaviors, likely with some internal node states.
Returns
The connector to the next node to be executed.
Divooka.Framework.Advanced.ProceduralCustomEvent.GenerateDelegate()
Generate a delegate that can represent this custom event.
Returns
A delegate with matching signature.
Divooka.Framework.FunctionalGraphEvaluationAlgorithmHelper.IAmaExecutionGraph
An execution queue used in interpretative runtime as for Ama engine
Divooka.Framework.FunctionalGraphEvaluationAlgorithmHelper.IAmaExecutionGraph.ExecuteGraph()
For running functional nodes in procedural contexts.
This is needed because when there is complex subnets of functional nodes, the procedural context (top level) itself cannot decide which/where those functional nodes are that depends on instance objects.
Divooka.Framework.FunctionalGraphEvaluationAlgorithmHelper.AmaDataflowDependencyGraphExecutionQueue.Queue
Remarks
Elements in the queue are executed from front to back
Divooka.Framework.FunctionalGraphEvaluationAlgorithmHelper.AmaDataflowDependencyGraphExecutionQueue.UpdateNodePosition()
Remarks
Notice explicit cache handling is NOT necessary just from the perspective of "avoiding executing the cached nodes" because caching behavior is handled directly on ProcessorNode.TryEvaluate(), but we implemented that here to accelerate graph construction a bit.
However handling it on the execution path level like here enables us to completely bypass/mute entire subgraphs - unless those nodes have "active preview" toggled, in which case they will still execute but their results won't affect the cached nodes.
TODO: We could use some unit test for this, i.e. to test given a graph connection whether nodes execute in some expected order (even though from user's perspective this should not be specified, but since our implementation is deterministic, we could still unit test it). It will require some setup effort though.
Divooka.Framework.FunctionalGraphEvaluationAlgorithmHelper.AmaExecutionTree
Remarks
No specialized handling for cache is implemented.
Divooka.Framework.FunctionalGraphEvaluationAlgorithmHelper.FindSelf()
Detect cyclic connection
Divooka.Framework.FunctionalGraphEvaluationAlgorithmHelper.EvaluateGraph()
Execute the node graph contained in canvas
Parameters
| Name | Description | Default |
|---|---|---|
canvas |
Container of graph nodes |
Divooka.Framework.IProcessor.MainPreviewOutput
Remarks
The concept of a "MainOutput" is needed mostly because we want to provide default Preview behavior.
Conventionally, we could have just taken the first output pin as main output.
Divooka.Framework.IProcessor.Item()
Remarks
Notice each node can have multiple outputs so it's essential that we provide cache at each output level.
Divooka.Framework.NodeExecutionResult
Result of node execution.
Remarks
Nodes usually handle foreseeable errors internally and return Divooka.Framework.NodeMessageType.Error upon error instead of throw exception, unless Parcel.CoreEngine.Service.Runtime.FailureReportMode is set to Parcel.CoreEngine.Service.Runtime.FailureReportMode.MissionCritical.
Divooka.Framework.NodeExecutionResult.#ctor()
Result of node execution.
Remarks
Nodes usually handle foreseeable errors internally and return Divooka.Framework.NodeMessageType.Error upon error instead of throw exception, unless Parcel.CoreEngine.Service.Runtime.FailureReportMode is set to Parcel.CoreEngine.Service.Runtime.FailureReportMode.MissionCritical.
Divooka.Framework.NodeExecutionResult.Success
The node execution indicates success.
Divooka.Framework.NodeExecutionResult.ErrorMessage
TheError message digested from the node.
Divooka.Framework.NodeExecutionResult.Caches
Any connector results.
Divooka.Framework.NodeExecutionResult.Message
Any node message.
Divooka.Framework.Plugin.IDevookaEnginePlugin
Remarks
Try to keep this lean.
Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.Menus
The host environment supports creating new menus and submenus.
Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.DynamicPackages
The host environment supports adding new types as nodes.
Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.EditorQuery
The host enviroment supports querying and modifying runtime state of graphs.
Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.ConnectorVisualCustomizations
The host enviroment supports customizing node pin connections.
Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.CustomNodeSurface
The host enviroment supports complete customization of node surface. This is not implemented yet in Divooka.
Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.PreviewProcessor
The host environment supports a transformer routine to convert the preview type into some core interoperable type. For framework-embedded control, use Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.CustomPreviewControl; For complete offroad handling, use Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.CustomPreviewHandler.
Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.CustomPreviewControl
The host environment supports am embedded customizable preview control. Notice this feature is currently not available as it will require additional object passing to pass preview controls into framework acceptable obejcts, e.g. on WPF it's CustomControl and on Godot it's Node.
Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.CustomPreviewHandler
The host environment supports a completely custom preview handler for any given type. This gives the plugin complete control on how preview is going to be handled.
Notice this works only as popup preview and won't work as on-canvas preview.
Divooka.Framework.Plugin.IPluginServiceProvider.RegisterTypeConnectionAppearance()
Applicable to both input pin, output pin and connection line.
Remarks
At the moment we do not expose custom shapes.
Divooka.Framework.Plugin.IPluginServiceProvider.RegisterPreviewProcessor()
Gives plugin a chance to convert certain data to built-in-previewable types.
Remarks
We are yet to provide full custom preview capabilities, which necessarily requires frontend programming.
Divooka.Framework.Plugin.IPluginServiceProvider.RegisterCustomPreviewHandler()
Remarks
Only available with Divooka.Framework.Plugin.IPluginServiceProvider.PluginFeature.CustomPreviewHandler capability.
Divooka.Framework.Plugin.IPluginServiceProvider.RegisterPackages()
Parameters
| Name | Description | Default |
|---|---|---|
autoUnregister |
Automatically unregister whatever is registered during unloading of plugins. |
Divooka.Framework.ProceduralContextBaseTypeApplicationRunner
A basic runner that understands only Start.
Remarks
TODO:
- Support virtual functions as events/entry points
- Support code-gen into C# then compile using Roslyn then load directly as actual C# instance for execution
Divooka.Framework.ProceduralContextExecuter
Remarks
The base type is like a shell - it usually have no dependencies and contains only states and data. Then we rely on the runner who provides the actual implementations, which can interact with the graph to fetch things like custom events etc.
TODO: In the future when we properly implement delegates locally, then we will not depend that much on a custom runner and the base type can be safely ignorant of the existence of an executer.
It might also be possible that the base type can run itself - but that would require having explicit access to graph state in the base type.
Divooka.Framework.ProceduralContextExecuter.#ctor()
Parameters
| Name | Description | Default |
|---|---|---|
availableRunners |
From context base type to specific owning implementation type |
Divooka.Framework.ProceduralContextExecuter._stack
Remarks
TODO: Current frame handling will NOT work for nodes that goes back and calling itself, or any sort of custom event paths that will call to itself e.g. recursion, because nodes do have internal states.
To work properly, all frame-creation capable nodes must implement a way to make a duplicate or itself and return a clean state and use that as the frame bookeeper.
Remark-cz: 20250310 The issue should have now been addresse with IProceduralProcessorNode's Push and Pop functions, though we don't have a perfect example to test it yet.
Divooka.Framework.ProceduralContextExecuter.AvailableRunners
From context base type to specific owning implementation type
Divooka.Framework.ProceduralContextExecuter.FetchUpstreamFunctionalDependency()
Update upstream functional dependency of given node.
Parameters
| Name | Description | Default |
|---|---|---|
executingProceduralNode |
Divooka.Framework.SubgraphHelper.Execute()
Executes a subgraph with optional graph inputs and returns graph outputs
Divooka.Framework.Toolboxes.Basic.BasicToolbox
Might be able to delte/remove/refactor most of those things, e.g. Dictinoary and DataTable
Divooka.Framework.Toolboxes.Basic.Nodes.BadReferenceNode
Remarks
Because automatic processor nodes already handle missing references, the bad reference node is only used when other strongly typed nodes are changed, likely due to an underlying implementation change.
Divooka.Framework.Toolboxes.Basic.Nodes.BadReferenceNode.#ctor
Parameterless constructor is needed for deserialization
Divooka.Framework.Toolboxes.Basic.Nodes.GraphStats
The property panel of this can have special referencing to Graph-level setting
Divooka.Framework.Toolboxes.Basic.Nodes.PreviewNode
Provides a dedicated routing (compared to default main output and on-canvas preview of contents.
Remarks
TODO: @intern Revamp Preview node to provide on-surface preview instead of summoning a result window
Divooka.Framework.Toolboxes.Basic.Nodes.PreviewNode.UpdatePreview
Requests updating of the preview.
Divooka.Framework.Toolboxes.Basic.Nodes.PreviewNode._fontSize
Font size for text preview values
Divooka.Framework.Toolboxes.Basic.Nodes.PreviewNode._storePreview
Whether preview data should be saved.
Divooka.Framework.Toolboxes.Basic.Nodes.PreviewNode.RefreshPreview
Called when the attached preview surface is ready, providing a chance to initialize preview BEFORE graph is executed, i.e. immediately after document loading.
Divooka.Framework.Toolboxes.Basic.Nodes.RunEvaluateGraphNode
Just a placeholder node that when implemented in the GUI frontend can trigger a run.
Divooka.Framework.Toolboxes.Basic.Nodes.SelectOutputNode
Provides a dedicated routing (compared to default main output).
Remarks
Notice this node can effectively replace Router node is preferred because it's a simple functional construct and require no additional runtime handling; On the GUI side we can however implement this node specially to make it look like a router
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode
An encapsulation of a base node instance that's generated directly from methods for dataflow/functional context.
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode.InstanceOveride
For instance functions, this will override the first parameter for the call marshall which is the instance reference.
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode.SetHideInstanceConnector()
Hide the connector representing the instance of an invoked function, because the context supplies it.
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode.IsInstanceNodeAndContainsInstancePins
Whether the current node represents an instance method and is NOT treated as const (so it does have instance pins)
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode.Descriptor
Remarks
Remark-cz: (Hack) we are saving descriptor here for easier invoking of dynamic types; However, this is not serializable at the moment! The reason we don't want it is because the descriptor itself is not serialized which means when the graph is loaded all such information is gone - and that's why we had IToolboxDefinition before.
TODO: Do not save the entire descriptor - looks like we only need information on the Callable, so save that should suffice.
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode.SourceType
Type of the declaring source, if available
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode.InputNames
Remarks
Raw input names (i.e. variable names); For display purpose.
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode.OutputNames
Remarks
For display purpose.
Divooka.Framework.ViewModels.BaseNodes.AutomaticDataflowProcessorNode.Execute
Remarks
Generally similar between AutomaticDataflowProcessorNode and AutomaticProceduralProcessorNode, except the handling of procedural inputs and performance measure.
Divooka.Framework.ViewModels.BaseNodes.CallGraphNode
Call local graph or document graph. Works like Summon document.
Remarks
TODO: Merge or clearly define relation to ActionReference
TODO: May merge with Summon Document node directly.
Divooka.Framework.ViewModels.BaseNodes.DelegateFactory.CreateDelegate()
Creates a partially-applied delegate of targetDelegateType
from baseFunction (which always has the signature
Func<object[], object>).
Divooka.Framework.ViewModels.BaseNodes.DelegateFactory.CreateDynamicInvokeDelegate()
Partially applies baseFunction by binding the elements that are
non-null in availableInputParameters and returns a delegate of
targetDelegateType that accepts the remaining parameters.
Divooka.Framework.ViewModels.BaseNodes.CaptureLambdaNode
[Experimental] A dynamic node that instead of returns executed results, returns a lambda/delegate as reference.
Remarks
For experimentation purpose, we work off external document for now while gradually gaining better understanding of a suitable architecture. A refactor is needed in the future.
Divooka.Framework.ViewModels.BaseNodes.GraphReferenceNode
Represents reference of a graph/subgraph/document in the functional sense. Returns a delegate.
The subgraph may be from a file (in which case it's a document/graph), from the current document, or embedded (aka. "annoymous function"/lambda).
Do not have inputs; the output of this node is used to pass as function reference, e.g. into delegate inputs.
Remarks
Very similar to Divooka.Framework.ViewModels.BaseNodes.CaptureLambdaNode except we don't capture anything.
Should be related to Parcel.CoreEngine.Service.Interpretation.ActionReference.
Divooka.Framework.ViewModels.BaseNodes.ObservableBaseNode
A base node and the lowest level abstraction for Neo graph editor.
This node type doesn't have the notion of "execution" - for that, use Divooka.Framework.ViewModels.BaseNodes.ProcessorNode
Divooka.Framework.ViewModels.BaseNodes.ObservableBaseNode.Location
Location of the node; Can be specified/manipulated.
Divooka.Framework.ViewModels.BaseNodes.ObservableBaseNode.RenderedSize
Actual size of the node. This is framework determined and shouldn't generally be manipulated directly.
Divooka.Framework.ViewModels.BaseNodes.ObservableBaseNode.Metadata
Some additional payload/identifying information.
Remarks
Associates current node with its "archetype/blueprint" or source of definition from the toolbox.
Essential for GUI use and auxiliary reasons. Notably, it's a way to retrieve node documentation.
Divooka.Framework.ViewModels.BaseNodes.ObservableBaseNode.Graph
Remarks
Usually set when added to canvas;
This can be null if a processor node is instantiated but haven't been added to canvas.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode
Represents front-end implemented nodes that can be "executed" (either through "Run" button or implicitly due to dependency, like primitive nodes). By inheriting from this we have full control on the nodes appearance and behavior.
Can be used for literal values and special (e.g. logic and programming) nodes.
Remarks
Contains the infamous Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.ProcessorCache which both makes things easy to implement but also making states unmanagable.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode._customDisplayName
Remarks
Must not be empty for serialization purpose
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.HasCustomDisplayName
Whether the node uses a custom display name.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.Title
This is the display name of the node. It can be set by the user. It's not localizable.
Remarks
For children nodes: DO NOT explicitly set this unless needed, because the framework will set it for you!
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.IsCacheEnabled
Whether caching is enabled on current node.
Notice this doesn't necessarily mean cache is available.
Remarks
Notice cache serialization is only available on Preview node.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.IsActivePreview
Whether the node is "active" or should be evaluated/previewed.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.NodeTypeName
This is the localizable node type name.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.Executing
Indicates whether current node is executing and the graph editor should render it in such manner
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.Inputs
Remarks
Procedural pins are not considered "inputs" or "outputs"
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.Outputs
Remarks
Procedural pins are not considered "inputs" or "outputs"
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.CanvasNodeInputs
Inputs as displayed on the node.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.CanvasNodeOutputs
Outputs as displayed on the node.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.TryEvaluate
Try evaluating current node.
Remarks
Specialized children classes will provide specialized execution handling.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.HasAnyCache
Whether there is any cached data on this node.
Returns
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.ProcessorCache
Remarks
Notice semantically this "ProcessorCache" means something different compared to Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.IsCacheEnabled - our current interpretation based runtime model relies on such processor caches to pass execution results, and it's more like "payload" than "cache", while Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.IsCacheEnabled affects runtime execution model and "cuts short" the evaluation path.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.SetProcessorCache()
Remarks
Used by children sparingly to explicitly set processor cache.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.VariantInputConnectorsSerialization
Remarks
It's not possible/not wise to generalize this further - because (specialized) nodes can have internal states that change when adding/removing dynamic
inputs; As such both the number of inputs (and potentially outputs) and the default storage value associated with them are responsibilities of
those derived ProcessorNodes.
Divooka.Framework.ViewModels.BaseNodes.ProcessorNode.GetEvaluatedPath()
Returns evaluated relative path or just the path itself.
Divooka.Framework.ViewModels.BaseNodes.SubgraphNode
References a subgraph in the same (current) document, with fully functional inputs and outputs. (the implementation right now is focused on directly embedding the graph, and not referencing anything)
Notice this is NOT used to denote a lambda or external graph reference. (Why? Sounds the same)
Notice this is conceptually distinct from "GraphReference" node which returns a delegate.
TODO: Allow self-referencing.
Remarks
Subgraphs are local, embedded, annoymous graphs. They are not to be reused. They are like "groups/macros" that's collapsed nodes and cannot be referenced otherwise.
For reusable local graphs, use named local graphs (not implemented yet as of 2025-03-31).
For document-level/top-level graphs, use document graphs.
Subgraphs are serialized directly with subgraph node - like caches in other complex processor node types.
Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.#ctor
Required for deserialization
Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.NodesData
This is what we call "(embeded/local/annoymous) subgraph" nodes.
Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.InstantiateGraph
Instantiate a completely new graph as nodes canvas.
Returns
A Neo representation of nodes graph.
Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.Externalize()
Externalize current subgraph node (into a single-graph document) and return an equivalent Summon node.
Parameters
| Name | Description | Default |
|---|---|---|
filePath |
Output document file path. |
Returns
A replacement summon node.
Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.Graphize()
Convert the subgraph into a proper graph to be used as local graph or document graph.
Parameters
| Name | Description | Default |
|---|---|---|
newGraph |
Graph nodes container canvas. |
Returns
A call node that can substitute current node
Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.InitializeConnectors()
Update the pins on current node and prepare necessary information for next step. We expect the caller to call Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.FinalizeConnections after this.
Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.FinalizeConnections
Make and replace connections from the attaching graph. We expect caller to call Divooka.Framework.ViewModels.BaseNodes.SubgraphNode.InitializeConnectors() before this.
Returns
New connections for the attaching graph
Divooka.Framework.ViewModels.BaseNodes.SummonDocumentNodeProcedural
Remarks
The best way to implement is to make it explicitly procedural.
TODO: From DiOS perspective, we want to reduce the number of unique front-end implemented nodes. Since we already defined IsProcedural property on SummonDocumentNode, if we can somehow eliminate SummonDocumentNodeProcedural (do something in the frontend/graph editor or file format) then it would be great. For now we will keep it here while we continue working on DiOS and DDS (Divooka Document Format spec).
Divooka.Framework.ViewModels.BaseNodes.SummonDocumentNodeProcedural.Parameters
A list of supplied parameters during current evaluation loop.
Remarks
Mostly used?
Divooka.Framework.ViewModels.BaseNodes.SummonDocumentNode
Summon a document and use it as node, morphs node inputs and outputs to suit the interface, execution returns corresponding results.
Remarks
May support specific document (embedded) graph addressing.
TODO: Implement like AutoProcessorNode, add functions for serialization and proper input/output pins population using primitive input connectors. (Remark 20250503: What do you mean?)
TODO: Better node visual. E.g. have a dedicated background color for graph reference nodes.
TODO: Merge or clearly define relation to ActionReference.
Divooka.Framework.ViewModels.BaseNodes.SummonDocumentNode.GraphPath
The graph current node points to. May be null. Preferrably stored as relative path (to "current document").
Remarks
Stored as relative path at the setting site. We could also enforce it if Graph.ReferenceBasePath is not null at setter, but we are not doing it right now.
Divooka.Framework.ViewModels.BaseNodes.SummonDocumentNode.IsProcedural
Whether current node is used in the procedural context.
Divooka.Framework.ViewModels.BaseNodes.SummonDocumentNode.UpdateGraphReference
Update node reference to a new graph.
Divooka.Framework.ViewModels.BaseNodes.SummonDocumentNode.ResetConnectors()
Reset connectors based on canvas input/output definitions, and also take care of usage in procedural context.
Divooka.Framework.ViewModels.DataflowContext.FunctionApply
Provides a transformation to the given inputs.
The output pins are dynamic depending on function definition - notice this must be done as a processor node instead of just using a function (i.e. AutomaticDataflowProcessorNode)
Divooka.Framework.ViewModels.DataflowContext.FunctionApply.Descriptor
Remarks
Remark-cz: Hack we are saving descriptor here for easier invoking of dynamic types; However, this is not serializable at the moment! The reason we don't want it is because the descriptor itself is not serialized which means when the graph is loaded all such information is gone - and that's why we had IToolboxDefinition before.
Divooka.Framework.ViewModels.DataflowContext.FunctionApply.InputNames
Remarks
For display purpose.
Divooka.Framework.ViewModels.DataflowContext.FunctionApply.OutputNames
Remarks
For display purpose.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas
A MVVM representation to satisfy Nodify editor, or document model for the nodes graph.
The nodes are serialized in a custom OOP manner in binary, making the save file format tightly coupled to the object model.
Remarks
The necessity and ugliness of this type was because WPF needs it. This was also what makes programming PV1 Neo with Nodify so uncomfortable.
This class can be improved staging for Morpheus use while still adopting the subscriber pattern.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas._proceduralContextType
Remarks
Set initial type as Parcel.CoreEngine.Types.ProceduralContextBaseTypeApplication because it's a good starting point.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas._localGraphs
Graph-level local graphs, similar to (annoymous, embeded) sbugraphs, but may be referenced and used locally.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas.ReferenceBasePath
Indicates current file path. This is optional. No one should ever depend on this!
Remarks
Should be full path.
A good practice is to keep the "canvas" concept transient and non-essential especially considering the compiled runtime, in which case there is no such concept of canvas.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas.Open()
Opens canvas from file and sets the Divooka.Framework.ViewModels.DivookaDOMNodesCanvas.ReferenceBasePath.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas.SavePackage()
Save the canvas and all referenced assets to a Zip archive
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas.Instantiate
Instantiate the graph into a wrapped object, giving access to the graph's interfaces indirectly as programmable APIs.
Remarks
RFC 136.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas.Compile
Compile to a type. For dataflows this is going to be a static class. For procedural context this is going to be a class inherited from its base type.
Remarks
RFC 136.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas.TryPromptCreateConnection
This is called when a pending connection is completed without any real target.
Divooka.Framework.ViewModels.DivookaDOMNodesCanvas.DeserializeObjectNodesAndConnections()
Deserialize and initialize states of nodes and connections properly onto the target canvas.
Divooka.Framework.ViewModels.INodifyObservableCollection`1.WhenAdded()
Called when a new item is added
Parameters
| Name | Description | Default |
|---|---|---|
added |
The callback to execute when an item is added |
Returns
Returns self
Divooka.Framework.ViewModels.INodifyObservableCollection`1.WhenRemoved()
Called when an existing item is removed
Note: It is not called when items are cleared if Divooka.Framework.ViewModels.INodifyObservableCollection`1.WhenCleared() is used
Parameters
| Name | Description | Default |
|---|---|---|
added |
The callback to execute when an item is removed |
Returns
Returns self
Divooka.Framework.ViewModels.INodifyObservableCollection`1.WhenCleared()
Called when the collection is cleared
NOTE: It does not call Divooka.Framework.ViewModels.INodifyObservableCollection`1.WhenRemoved() on each item
Parameters
| Name | Description | Default |
|---|---|---|
added |
The callback to execute when the collection is cleared |
Returns
Returns self
Divooka.Framework.ViewModels.NotifyObservableCollection`1
An observation collection with detailed events for editing operations; Otherwise similar to ObservableCollection from components model.
Divooka.Framework.ViewModels.PrimitiveBooleanInputConnector
Remarks
Storage is Boolean
Divooka.Framework.ViewModels.PrimitiveVector2InputConnector
Remarks
Storage is System.Numerics.Vector2 (float)
Divooka.Framework.ViewModels.PrimitiveVector2DInputConnector
Remarks
Storage is Divooka Vector2D (double)
Divooka.Framework.ViewModels.PrimitiveSizeInputConnector
Remarks
Storage is DateTimSize
Divooka.Framework.ViewModels.PrimitiveColorInputConnector
Remarks
Storage is Color
Divooka.Framework.ViewModels.PrimitiveDateTimeInputConnector
Remarks
Storage is DateTime
Divooka.Framework.ViewModels.PrimitiveDateOnlyInputConnector
Remarks
Storage is DateOnly
Divooka.Framework.ViewModels.PrimitiveCharInputConnector
Remarks
Storage is char
Divooka.Framework.ViewModels.PrimitiveStringInputConnector
Remarks
Storage is string
Divooka.Framework.ViewModels.PrimitiveTextInputConnector
Remarks
Storage is string
Divooka.Framework.ViewModels.PrimitivePasswordInputConnector
Remarks
Storage is string
Divooka.Framework.ViewModels.PrimitiveActionInputConnector
Remarks
Value is the actual delegate.
Storage is reference to the action (called an "Instruction"/"FunctionReference" - or directly use either a Callable or FunctionalNodeDescription; Need to support graphs/events/subgraphs); Serialization uses string as identifier (if we use FunctionalNodeDescription or Callable, then it should be handled there).
An instruciton can be either:
1. A document graph/section referenc
2. An embedded graph
3. A code snippet
Divooka.Framework.ViewModels.PrimitiveActionInputConnector.#ctor()
Remarks
Notice input type of this connnector is strongly typed, this way we can enforce some sense into things.
Parameters
| Name | Description | Default |
|---|---|---|
type |
Delegate type, e.g. Func`2 |
Divooka.Framework.ViewModels.PrimitiveDynamicFunctionInputConnector
For "delegate" of any type.
Divooka.Framework.ViewModels.PrimitiveEnumInputConnector
Remarks
Storage is int;
Runtime value is conversion from int to corresponding enum type.
Divooka.Framework.ViewModels.PrimitiveEnumInputConnector.Value
Remarks
Stored value will be actual numerical value of the enum item (not its index)
Divooka.Framework.ViewModels.PrimitiveTypeInputConnector
Remarks
Storage is int
Divooka.Framework.ViewModels.PrimitiveTypeInputConnector.Value
Remarks
Stored value will be the actual type
Divooka.Framework.ViewModels.PrimitiveNumberInputConnector
Remarks
Storage is any numerical value
Divooka.Framework.ViewModels.PrimitiveInputConnector.Value
Remarks
TODO: Why do we re-define _dataStorage to be called "Value"? This causes confusion. if it's not necessary, then let's just use the original DataStorage.
Divooka.Framework.ViewModels.ObservableBaseConnector.DataStorage
Connector-local parameter/attribute storage; For connector default values and literal values.
Remarks
Used for input nodes that haven't had any input yet.
Divooka.Framework.ViewModels.ObservableBaseConnector._dataStorage
Remarks
Notice the value stored here MUST match that of (as expected) Divooka.Framework.ViewModels.ObservableBaseConnector.DataType.
Divooka.Framework.ViewModels.ObservableGraphConnection.IsHighlighted
For WPF data trigger use. Depending on frontend implementation, this may not need to be modeled into the model as in this case.
Divooka.Framework.ViewModels.ObservableObject
A base class providing abstraction mostly for MVVM purposes.
Try avoid using this.
Divooka.Framework.ViewModels.Primitives.FunctionReferenceNode
(First-class) Function as object/primitive.
A node containing a function reference.
Notice such a node itself doesn't "process" anything. The node itself cannot be "executed/run".
Also known as a "function literal". Return a function ("delegate" in C# jargon).
Remarks
Depending on the context, such a node may be called a "function", "function reference", "(sub)graph reference", "custom function".
TODO: For now it behaves like Text node and supports only "(create) custom function". Implement full "action picker" like delegate type node parameters.
TODO: Replace main output with a custom `FunctionReference` type, like DateTimeNode's custom DateTime output.
Divooka.Framework.ViewModels.Primitives.SliderNumberNode
A number node with customizable min, max, and step.
In the future when XML annotation gets enhanced, we may no longer need this as the Number node can automatically adapt.
Divooka.Framework.ViewModels.ProceduralContext.AutomaticProceduralEventProcessorNode
A processor node that represents the start of an event.
Divooka.Framework.ViewModels.ProceduralContext.AutomaticProceduralEventProcessorNode._parameterOutputs
A list of generated functional outputs.
Divooka.Framework.ViewModels.ProceduralContext.AutomaticProceduralEventProcessorNode.#ctor()
Remarks
We have to implement this if we wish to inherit from AutomaticProceduralProcessorNode and get all the additional benefits of connector definitions.
Divooka.Framework.ViewModels.ProceduralContext.AutomaticProceduralProcessorNode
An encapsulation of a base node instance that's generated directly from methods for procedural context.
Divooka.Framework.ViewModels.ProceduralContext.AutomaticProceduralProcessorNode.Parameters
A list of supplied parameters during current evaluation loop.
Remarks
Mostly used by derived types? For the automatic node itself we seem not depend on this.
Divooka.Framework.ViewModels.ProceduralContext.AutomaticProceduralProcessorNode.SetParameters()
Called by runtime to set some functional interface values.
Parameters
| Name | Description | Default |
|---|---|---|
parameters |
Function call parameter set. |
Divooka.Framework.ViewModels.ProceduralContext.AutomaticProceduralProcessorNode.GetNext
Children should override to provide customized execution behaviors, likely with some internal node states.
Returns
The connector to the next node to be executed.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralApplicationRunner
Instantiators provides a more generalized way on how procedural context graphs should be run. Without an instantiator we will not know where to "start".
Remarks
Remark-cz-2025-04-08: Current implementation of procedural context based applications might be wrong: child classes should generally be ignorant of events and graphs nodes. Just call events directly. Unless custom event is needed - even so it should be abstracted and provided by AbstractBase. This might be necessary in the future for compiled runtime. On the other hand, practically, it makes no difference that an IProceduralApplicationRunner calls the predefined events like `Start` event through event delegate or call it through the procedural context executor. And we may only need to deal with this fine distinction when we were actually working on the compiled runtime.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.NextInstruction
Instructions to the runtime regarding the next node to execute.
Parameters
| Name | Description | Default |
|---|---|---|
NextNode |
Eitehr this or NextCustomEvent is present. | |
CreateFrame |
Must be true when NextCustomEventis true. | |
NextCustomEvent |
Either this or NextNode is present. |
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.NextInstruction.#ctor()
Instructions to the runtime regarding the next node to execute.
Parameters
| Name | Description | Default |
|---|---|---|
NextNode |
Eitehr this or NextCustomEvent is present. | |
CreateFrame |
Must be true when NextCustomEventis true. | |
NextCustomEvent |
Either this or NextNode is present. |
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.NextInstruction.NextNode
Eitehr this or NextCustomEvent is present.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.NextInstruction.CreateFrame
Must be true when NextCustomEventis true.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.NextInstruction.NextCustomEvent
Either this or NextNode is present.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.GetNext
Get the next execution path during current evaluation.
Returns
Connector to the next execution path.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.PushFrame
Push current stage into a frame.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.PopFrame
Restore states in a previous frame.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.Reset
Reset control flow states.
Divooka.Framework.ViewModels.ProceduralContext.IProceduralProcessorNode.SetParameters()
Called by runtime to set some functional interface values, including the corresponding instance of current node.
Parameters
| Name | Description | Default |
|---|---|---|
instance |
For instance nodes, this is the backing instance. Optional. | |
parameters |
Optional Function call parameter set. Position based. |
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlProcessorNode
Remarks
TODO: Some useful flow controls in visual programming - Sequence node
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlProcessorNode.GetNext
Children should override to provide customized execution behaviors, likely with some internal node states.
Returns
The connector to the next node to be executed.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlSequenceProcessorNode
A processor node that represents a dynamic range of action sequences..
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlSequenceProcessorNode.GetNext
Children should override to provide customized execution behaviors, likely with some internal node states.
Returns
The connector to the next node to be executed.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlForEachLoopProcessorNode
A processor node that enumerates an IEnumerable, like the for-each loop.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlForEachLoopProcessorNode.GetNext
Children should override to provide customized execution behaviors, likely with some internal node states.
Returns
The connector to the next node to be executed.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlForLoopProcessorNode
A processor node that represents the for loop.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlRepeatProcessorNode
A processor node that represents simple repetition.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlRepeatProcessorNode.GetNext
Children should override to provide customized execution behaviors, likely with some internal node states.
Returns
The connector to the next node to be executed.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlBranchProcessorNode
A processor node that represents simple branch
Divooka.Framework.ViewModels.ProceduralContext.ProceduralContextFlowControlBranchProcessorNode.GetNext
Children should override to provide customized execution behaviors, likely with some internal node states.
Returns
The connector to the next node to be executed.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralExecuteCustomEvent
Remarks
Right now we only support calling events with no inputs. Event inputs can be supported with a bit more logic on reflective updates of invariant inputs.
Divooka.Framework.ViewModels.ProceduralContext.ProceduralExecuteCustomEvent.GetNext
Children should override to provide customized execution behaviors, likely with some internal node states.
Returns
The connector to the next node to be executed.
Parcel.CoreEngine.Service.Runtime.GraphInstance
A representation of the graph from the perspective of API/programming model.
Remarks
RFC 136
Parcel.CoreEngine.Service.Runtime.GraphInstance.ProceduralStart()
For procedural context.