create IVariable`2 page |
overhaul |
||
Line 1: | Line 1: | ||
IVariable | The '''IVariable<C, T>''' type is an [[interface type]] applies to [[ProtoFlux]] nodes that expose methods to read from and write to some value that the node stores using only a reference to the node. This allows nodes in the [[:Category:ProtoFlux:Actions|<code>Actions</code> category]] to read and write to said node using only a link to the node and not any particular field. | ||
The generic arguments designate a [[context]] of execution and type of variable. Only action nodes that match the context and type may write to a particular IVariable node. | |||
IVariables are generally invisible to the user when making conventional ProtoFlux, though nodes in the [[:Category:ProtoFlux:Actions:Indirect|<code>Actions/Indirect</code> category]] allow one to interface with IVariable types as input, which can be combined with a [[ProtoFlux:Multiplex|multiplex]] for high flexibility of variable management in complex flux. | |||
== Conventional variables == | |||
These nodes are "conventional" variables within ProtoFlux. They all share the same basic principle of storing a value that one can read from and write to, differing only in their lifetime and syncing: | |||
- [[ProtoFlux:Data Model Store|Data Model Store]] | |||
- [[ProtoFlux:Store|Store]] | |||
- [[ProtoFlux:Local|Local]] | |||
== Other IVariable nodes == | |||
Other nodes implement the IVariable interface. These have slightly different effects than the conventional variables: | |||
- [[ProtoFlux:Source|Source]]. When written to, the node writes to the underlying [[field]]'s value. | |||
- [[ProtoFlux:Global To Output|Global To Output]]. When written to, the node writes to the underlying [[global]]'s value. | |||
- [[ProtoFlux:Field As Variable]]. When written to, the node writes to the input [[Type:IValue|IValue]]'s value. | |||
- [[ProtoFlux:Reference As Variable]]. When written to, the node writes to the input [[Type:SyncRef|SyncRef]]'s value. | |||
- [[ProtoFlux:User Reference As Variable]]. When written to, the node writes to the input [[Type:UserRef|UserRef]]'s value. |
Revision as of 22:15, 15 April 2025
The IVariable<C, T> type is an interface type applies to ProtoFlux nodes that expose methods to read from and write to some value that the node stores using only a reference to the node. This allows nodes in the Actions
category to read and write to said node using only a link to the node and not any particular field.
The generic arguments designate a context of execution and type of variable. Only action nodes that match the context and type may write to a particular IVariable node.
IVariables are generally invisible to the user when making conventional ProtoFlux, though nodes in the Actions/Indirect
category allow one to interface with IVariable types as input, which can be combined with a multiplex for high flexibility of variable management in complex flux.
Conventional variables
These nodes are "conventional" variables within ProtoFlux. They all share the same basic principle of storing a value that one can read from and write to, differing only in their lifetime and syncing:
- Data Model Store - Store - Local
Other IVariable nodes
Other nodes implement the IVariable interface. These have slightly different effects than the conventional variables:
- Source. When written to, the node writes to the underlying field's value. - Global To Output. When written to, the node writes to the underlying global's value. - ProtoFlux:Field As Variable. When written to, the node writes to the input IValue's value. - ProtoFlux:Reference As Variable. When written to, the node writes to the input SyncRef's value. - ProtoFlux:User Reference As Variable. When written to, the node writes to the input UserRef's value.