Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
VRage.Sync.Sync< T > Class Template Reference
Inheritance diagram for VRage.Sync.Sync< T >:
VRage.Sync.SyncBase VRage.Library.Collections.IBitSerializable

Public Member Functions

 Sync (int id, MySerializeInfo serializeInfo)
 
override string ToString ()
 
void ValidateAndSet (T newValue)
 Validates the value and sets it (when valid). More...
 
override SyncBase Clone (int newId)
 
override bool Serialize (BitStream stream, bool validate)
 When reading, returns false when validation was required and failed, otherwise true. More...
 
- Public Member Functions inherited from VRage.Sync.SyncBase
 SyncBase (Type valueType, int id, MySerializeInfo serializeInfo)
 

Static Public Member Functions

static implicit operator T (Sync< T > sync)
 
- Static Public Member Functions inherited from VRage.Sync.SyncBase
static implicit operator BitReaderWriter (SyncBase sync)
 

Public Attributes

SyncValidate< T > Validate
 Validate handler is raised on server after deserialization. More...
 
- Public Attributes inherited from VRage.Sync.SyncBase
readonly int Id
 
readonly Type ValueType
 
readonly MySerializeInfo SerializeInfo
 

Static Public Attributes

static readonly MySerializer< T > TypeSerializer = MyFactory.GetSerializer<T>()
 

Properties

Value [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from VRage.Sync.SyncBase
void RaiseValueChanged ()
 
- Static Protected Member Functions inherited from VRage.Sync.SyncBase
static void CopyValueChanged (SyncBase from, SyncBase to)
 
- Events inherited from VRage.Sync.SyncBase
Action< SyncBaseValueChanged
 ValueChanged event is raised when value is set locally (settings Value property) or remotely (through deserialization). When validation fails, value is not changed and ValueChanged is not raised. More...
 

Detailed Description

Definition at line 58 of file Sync.cs.

Constructor & Destructor Documentation

VRage.Sync.Sync< T >.Sync ( int  id,
MySerializeInfo  serializeInfo 
)
inline

Definition at line 76 of file Sync.cs.

Member Function Documentation

override SyncBase VRage.Sync.Sync< T >.Clone ( int  newId)
inlinevirtual

Implements VRage.Sync.SyncBase.

Definition at line 124 of file Sync.cs.

static implicit VRage.Sync.Sync< T >.operator T ( Sync< T >  sync)
inlinestatic

Definition at line 157 of file Sync.cs.

override bool VRage.Sync.Sync< T >.Serialize ( BitStream  stream,
bool  validate 
)
inlinevirtual

When reading, returns false when validation was required and failed, otherwise true.

Implements VRage.Sync.SyncBase.

Definition at line 137 of file Sync.cs.

override string VRage.Sync.Sync< T >.ToString ( )
inline

Definition at line 87 of file Sync.cs.

void VRage.Sync.Sync< T >.ValidateAndSet ( newValue)
inline

Validates the value and sets it (when valid).

Definition at line 119 of file Sync.cs.

Member Data Documentation

readonly MySerializer<T> VRage.Sync.Sync< T >.TypeSerializer = MyFactory.GetSerializer<T>()
static

Definition at line 60 of file Sync.cs.

SyncValidate<T> VRage.Sync.Sync< T >.Validate

Validate handler is raised on server after deserialization.

Definition at line 73 of file Sync.cs.

Property Documentation

T VRage.Sync.Sync< T >.Value
getset

Definition at line 65 of file Sync.cs.


The documentation for this class was generated from the following file: