Show / Hide Table of Contents

Class Ref<T>

A IReadable<T> reference to some data of type {T}.

Inheritance
System.Object
Ref<T>
Implements
IReadable<T>
IValueEquals<Ref<T>>
IValueEquals<T>
Namespace: FasterGames.Whiskey.Boxes
Assembly: cs.temp.dll.dll
Syntax
public class Ref<T> : IEquatable<Ref<T>>, IReadable<T>, IValueEquals<Ref<T>>, IValueEquals<T>
Type Parameters
Name Description
T

the referenced data type

Remarks

The data itself, may be direct (e.g. a constant) or indirect (e.g. inside a Box<T>)

Constructors

Ref()

Default ctor

Declaration
public Ref()

Ref(T)

Value ctor

Declaration
public Ref(T raw)
Parameters
Type Name Description
T raw

raw value to store

Ref(Box<T>)

Value ctor

Declaration
public Ref(Box<T> box)
Parameters
Type Name Description
Box<T> box

box value to store

Fields

box

Storage for boxed data

Declaration
protected Box<T> box
Field Value
Type Description
Box<T>

raw

Storage for raw data

Declaration
protected T raw
Field Value
Type Description
T

selector

The data type to store and access

Declaration
protected Ref<T>.Selector selector
Field Value
Type Description
Ref.Selector<>

table

Storage for the table

Declaration
protected Table<T> table
Field Value
Type Description
Table<T>

Properties

Value

Element accessor

Declaration
public T Value { get; }
Property Value
Type Description
T
Remarks

If the particular operation isn't supported (e.g. read-only) will throw

Methods

Equals(Ref<T>)

Declaration
public bool Equals(Ref<T> other)
Parameters
Type Name Description
Ref<T> other
Returns
Type Description
System.Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

Read()

Read the element.

Declaration
public T Read()
Returns
Type Description
T

element data

ValueEquals(T)

Ensures an inner value matches another.

Declaration
public bool ValueEquals(T other)
Parameters
Type Name Description
T other

other value

Returns
Type Description
System.Boolean

true if equal, false if not equal

ValueEquals(Ref<T>)

Ensures an inner value matches another.

Declaration
public bool ValueEquals(Ref<T> other)
Parameters
Type Name Description
Ref<T> other
Returns
Type Description
System.Boolean

true if equal, false if not equal

Implements

IReadable<T>
IValueEquals<T>
IValueEquals<T>
In This Article
Back to top Copyright FasterGames ©