Quantum 3 3.1.0

Public Member Functions | Properties | List of all members
Ref< T > Struct Template Reference

A pointer to a writeable component value. More...

Inheritance diagram for Ref< T >:
IComponentRef

Public Member Functions

unsafe Ref< T > AsTyped< T > ()
 Casts the underlying pointer to T* and returns a typed Ref<T>. More...
 
Ref AsUntyped ()
 Returns an untyped Ref. More...
 
unsafe readonly ref T Value< T > ()
 Casts the underlying pointer to T* and returns a reference to the pointed-at component value. More...
 

Properties

readonly bool HasValue [get]
 Returns true if this reference points at a component value. Only then can Value be used. More...
 
readonly ref T Value [get]
 A reference to the pointed-at component value. More...
 

Detailed Description

A pointer to a writeable component value.

A pointer to a writeable component value with unknown type.

Template Parameters
T

This pointer can be invalidated when frame commands are committed, so it isn't safe to cache.

This pointer can be invalidated when frame commands are committed, so it isn't safe to cache.

Type Constraints
T :unmanaged 
T :IComponent 

Member Function Documentation

◆ AsUntyped()

Ref Ref< T >.AsUntyped ( )
inline

Returns an untyped Ref.

◆ Value< T >()

unsafe readonly ref T Ref< T >.Value< T > ( )
inline

Casts the underlying pointer to T* and returns a reference to the pointed-at component value.

Type Constraints
T :unmanaged 
T :IComponent 

◆ AsTyped< T >()

unsafe Ref<T> Ref< T >.AsTyped< T > ( )
inline

Casts the underlying pointer to T* and returns a typed Ref<T>.

Type Constraints
T :unmanaged 
T :IComponent 

Property Documentation

◆ Value

readonly ref T Ref< T >.Value
get

A reference to the pointed-at component value.

◆ HasValue

readonly bool Ref< T >.HasValue
get

Returns true if this reference points at a component value. Only then can Value be used.

Returns true if this reference points at a component value. Only then can Value<T> be used.