Quantum 3 3.0.12

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Photon.Deterministic.NullableNonNegativeFP Struct Reference

A serializable equivalent of Nullable<FP>. More...

Public Member Functions

readonly override int GetHashCode ()
 Computes the hash code for the current instance of the FP struct. More...
 
readonly override string ToString ()
 Returns a string representation of the current value. More...
 
readonly FP ValueOrDefault ()
 If HasValue is true, returns Value. Otherwise returns zero. More...
 

Static Public Member Functions

static implicit operator NullableNonNegativeFP (FP v)
 Implicitly converts the specified value of type FP to NullableNonNegativeFP. More...
 
static void Serialize (NullableNonNegativeFP *ptr, IDeterministicFrameSerializer serializer)
 Serialize a NullableNonNegativeFP pointer using the provided IDeterministicFrameSerializer. More...
 

Public Attributes

ulong _value
 The value. More...
 

Static Public Attributes

const int SIZE = sizeof(ulong)
 Size of the struct in bytes. More...
 

Properties

readonly Boolean HasValue [get]
 Returns true if this nullable has a value. More...
 
readonly FP Value [get]
 Returns current value. More...
 

Detailed Description

A serializable equivalent of Nullable<FP>.

Member Function Documentation

◆ ValueOrDefault()

readonly FP Photon.Deterministic.NullableNonNegativeFP.ValueOrDefault ( )
inline

If HasValue is true, returns Value. Otherwise returns zero.

Returns

◆ operator NullableNonNegativeFP()

static implicit Photon.Deterministic.NullableNonNegativeFP.operator NullableNonNegativeFP ( FP  v)
inlinestatic

Implicitly converts the specified value of type FP to NullableNonNegativeFP.

Parameters
vThe value to be converted.
Returns
A NullableNonNegativeFP representing the converted value.
Exceptions
ArgumentOutOfRangeExceptionThrown when the value is less than zero.

◆ Serialize()

static void Photon.Deterministic.NullableNonNegativeFP.Serialize ( NullableNonNegativeFP ptr,
IDeterministicFrameSerializer  serializer 
)
inlinestatic

Serialize a NullableNonNegativeFP pointer using the provided IDeterministicFrameSerializer.

Parameters
ptrThe NullableNonNegativeFP pointer to serialize.
serializerThe IDeterministicFrameSerializer used for serialization.

◆ ToString()

readonly override string Photon.Deterministic.NullableNonNegativeFP.ToString ( )
inline

Returns a string representation of the current value.

Returns

◆ GetHashCode()

readonly override int Photon.Deterministic.NullableNonNegativeFP.GetHashCode ( )
inline

Computes the hash code for the current instance of the FP struct.

Returns
A 32-bit signed integer hash code.

Member Data Documentation

◆ SIZE

const int Photon.Deterministic.NullableNonNegativeFP.SIZE = sizeof(ulong)
static

Size of the struct in bytes.

◆ _value

ulong Photon.Deterministic.NullableNonNegativeFP._value

The value.

Property Documentation

◆ HasValue

readonly Boolean Photon.Deterministic.NullableNonNegativeFP.HasValue
get

Returns true if this nullable has a value.

◆ Value

readonly FP Photon.Deterministic.NullableNonNegativeFP.Value
get

Returns current value.

Exceptions
NullReferenceExceptionIf HasValue is false