Quantum 3 3.0.5

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

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

Public Member Functions

readonly override int GetHashCode ()
 Computes the hash code for the current NullableFPVector2 object. More...
 
readonly FPVector2 ValueOrDefault (FPVector2 v)
 If HasValue is true, returns Value. Otherwise returns v . More...
 

Static Public Member Functions

static implicit operator NullableFPVector2 (FPVector2 v)
 Implicitly converts v to NullableFPVector2. More...
 
static void Serialize (NullableFPVector2 *ptr, IDeterministicFrameSerializer serializer)
 Serializes a NullableFPVector2 object using the given IDeterministicFrameSerializer. More...
 

Public Attributes

long _hasValue
 If 1, then _value is valid. More...
 
FPVector2 _value
 The value. More...
 

Static Public Attributes

const int SIZE = sizeof(long) + FPVector2.SIZE
 Size of the struct in bytes. More...
 

Properties

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

Detailed Description

A serializable equivalent of Nullable<FPVector2>.

Member Function Documentation

◆ ValueOrDefault()

readonly FPVector2 Photon.Deterministic.NullableFPVector2.ValueOrDefault ( FPVector2  v)
inline

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

Parameters
v
Returns

◆ operator NullableFPVector2()

static implicit Photon.Deterministic.NullableFPVector2.operator NullableFPVector2 ( FPVector2  v)
inlinestatic

Implicitly converts v to NullableFPVector2.

Parameters
v
Returns

◆ Serialize()

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

Serializes a NullableFPVector2 object using the given IDeterministicFrameSerializer.

Parameters
ptrA pointer to the NullableFPVector2 object.
serializerThe IDeterministicFrameSerializer used for serialization.

◆ GetHashCode()

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

Computes the hash code for the current NullableFPVector2 object.

Returns
A 32-bit signed integer hash code.

Member Data Documentation

◆ SIZE

const int Photon.Deterministic.NullableFPVector2.SIZE = sizeof(long) + FPVector2.SIZE
static

Size of the struct in bytes.

◆ _hasValue

long Photon.Deterministic.NullableFPVector2._hasValue

If 1, then _value is valid.

◆ _value

FPVector2 Photon.Deterministic.NullableFPVector2._value

The value.

Property Documentation

◆ HasValue

readonly Boolean Photon.Deterministic.NullableFPVector2.HasValue
get

Returns true if this nullable has a value.

◆ Value

readonly FPVector2 Photon.Deterministic.NullableFPVector2.Value
get

Returns current value.

Exceptions
NullReferenceExceptionIf HasValue is false