Type:IValue`1: Difference between revisions

From Resonite Wiki
m typo AGAIN RAAAH
cleanup, `1 -> <T>, maybe this isn't too confusing?
Line 1: Line 1:
The '''IValue<nowiki><T></nowiki>''' type is an [[Interface Type]] that designates the type it is applied to as something that contains a [[Value Type]].
The '''IValue&lt;T&gt;''' type is an [[interface type]] that wraps around a type to provide an interface to read from and write to an object. In practice, FrooxEngine uses the <code>T</code> generic parameter exclusively for [[value types]] within the Data Model, and there is no use for an IValue&lt;T&gt; holding a [[reference type]].


This allows for the thing implementing the type to be [[ProtoFlux:Source|sourced]] in ProtoFlux, which in turn allows for the thing to be written to via a [[ProtoFlux:Write|Write]] node. This does <em>not</em> allow the object to be [[Drive|driven]], which requires it to implement [[Type:ILinkable|ILinkable]].
An object with a type implementing this interface allows for the object to be [[ProtoFlux:Source|sourced]] in ProtoFlux, which in turn allows for the thing to be written to via a [[ProtoFlux:Write|Write]] node. This does <em>not</em> allow the object to be [[Drive|driven]], which requires it to implement [[Type:ILinkable|ILinkable]], usually through an [[Type:IField|IField&lt;T&gt;]].


== Interfaces Implemented ==
== Interfaces Implemented ==
* [[Type:IChangeable]]
* [[Type:IChangeable]]
* [[Type:IWorldElement]]
* [[Type:IWorldElement]]


== Types Implementing IValue ==
== Types Implementing IValue ==
* [[Type:IField`1]]
* [[Type:ValueStream`1]]


== Components Implementing IValue ==
* [[Type:IField`1|IField&lt;T&gt;]]
The following components implement the IValue type, allowing the component itself to be sourced and written to, which is usually not possible.
* [[Type:ValueStream`1|ValueStream&lt;T&gt;]]
 
== Components Implementing IValue&lt;T&gt; ==
 
The following components implement the IValue&lt;T&gt; type, allowing the component itself to be sourced and written to, which is usually not possible.


* [[Component:AuthorityTimeBase]]
* [[Component:AuthorityTimeBase]]

Revision as of 21:00, 9 December 2024

The IValue<T> type is an interface type that wraps around a type to provide an interface to read from and write to an object. In practice, FrooxEngine uses the T generic parameter exclusively for value types within the Data Model, and there is no use for an IValue<T> holding a reference type.

An object with a type implementing this interface allows for the object to be sourced in ProtoFlux, which in turn allows for the thing to be written to via a Write node. This does not allow the object to be driven, which requires it to implement ILinkable, usually through an IField<T>.

Interfaces Implemented

Types Implementing IValue

Components Implementing IValue<T>

The following components implement the IValue<T> type, allowing the component itself to be sourced and written to, which is usually not possible.