Show / Hide Table of Contents

Class MutRef<T>

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

Inheritance
System.Object
MutRef<T>
Implements
IReadable<T>
IWritable<T>
IValueEquals<MutRef<T>>
IValueEquals<T>
Namespace: FasterGames.Whiskey.Boxes
Assembly: cs.temp.dll.dll
Syntax
public class MutRef<T> : IEquatable<MutRef<T>>, IReadable<T>, IWritable<T>, IValueEquals<MutRef<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>)

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 MutRef<T>.Selector selector
Field Value
Type Description
MutRef.Selector<>

Properties

Value

Element accessor

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

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

Methods

Equals(MutRef<T>)

Declaration
public bool Equals(MutRef<T> other)
Parameters
Type Name Description
MutRef<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(MutRef<T>)

Ensures an inner value matches another.

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

true if equal, false if not equal

Write(T)

Write to the element.

Declaration
public void Write(T value)
Parameters
Type Name Description
T value

element data

Implements

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