Space Engineers
Classes | Public Member Functions | List of all members
VRage.Replication.MyEventsBuffer Class Reference
Inheritance diagram for VRage.Replication.MyEventsBuffer:

Public Member Functions

delegate void Handler (BitStream stream, NetworkId objectInstance, NetworkId blockedNetId, uint eventId, EndpointId sender)
 
delegate bool IsBlockedHandler (NetworkId objectInstance, NetworkId blockedNetId)
 
 MyEventsBuffer (int eventCapacity=32)
 
void Dispose ()
 
void EnqueueEvent (BitStream stream, NetworkId targetObjectId, NetworkId blockingObjectId, uint eventId, EndpointId sender)
 Enqueues event that have to be done on target object. More...
 
void EnqueueBarrier (NetworkId targetObjectId, NetworkId blockingObjectId)
 Enqueues barrier for an entity that is targeting network object with blocking event. WARNING: Have to be in pair with blocking event! More...
 
void RemoveEvents (NetworkId objectInstance)
 Removes all events from target id. More...
 
bool ContainsEvents (NetworkId netId)
 
bool ProcessEvents (NetworkId targetObjectId, Handler eventHandler, IsBlockedHandler isBlockedHandler, NetworkId caller)
 Tries to process events for prarticular object id (network id). More...
 
string GetEventsBufferStat ()
 Gets events buffer statistics. More...
 

Detailed Description

Definition at line 12 of file MyEventBuffer.cs.

Constructor & Destructor Documentation

VRage.Replication.MyEventsBuffer.MyEventsBuffer ( int  eventCapacity = 32)
inline

Definition at line 58 of file MyEventBuffer.cs.

Member Function Documentation

bool VRage.Replication.MyEventsBuffer.ContainsEvents ( NetworkId  netId)
inline

Definition at line 222 of file MyEventBuffer.cs.

void VRage.Replication.MyEventsBuffer.Dispose ( )
inline

Definition at line 73 of file MyEventBuffer.cs.

void VRage.Replication.MyEventsBuffer.EnqueueBarrier ( NetworkId  targetObjectId,
NetworkId  blockingObjectId 
)
inline

Enqueues barrier for an entity that is targeting network object with blocking event. WARNING: Have to be in pair with blocking event!

Parameters
targetObjectIdNetwork object id that will get barrier event.
blockingObjectIdNetwork object that have blocking event.

Definition at line 157 of file MyEventBuffer.cs.

void VRage.Replication.MyEventsBuffer.EnqueueEvent ( BitStream  stream,
NetworkId  targetObjectId,
NetworkId  blockingObjectId,
uint  eventId,
EndpointId  sender 
)
inline

Enqueues event that have to be done on target object.

Parameters
streamStream with event data.
targetObjectIdObject id that is a target of the event.
blockingObjectIdObject id that is blocking target to be processed. 'NetworkId.Invalid' if none.
eventIdEvent id.
senderEndpoint.

Definition at line 125 of file MyEventBuffer.cs.

string VRage.Replication.MyEventsBuffer.GetEventsBufferStat ( )
inline

Gets events buffer statistics.

Returns
Formatted events buffer statistics.

Definition at line 404 of file MyEventBuffer.cs.

delegate void VRage.Replication.MyEventsBuffer.Handler ( BitStream  stream,
NetworkId  objectInstance,
NetworkId  blockedNetId,
uint  eventId,
EndpointId  sender 
)
delegate bool VRage.Replication.MyEventsBuffer.IsBlockedHandler ( NetworkId  objectInstance,
NetworkId  blockedNetId 
)
bool VRage.Replication.MyEventsBuffer.ProcessEvents ( NetworkId  targetObjectId,
Handler  eventHandler,
IsBlockedHandler  isBlockedHandler,
NetworkId  caller 
)
inline

Tries to process events for prarticular object id (network id).

Parameters
targetObjectIdTarget object network id.
eventHandlerHandler for processing events.
isBlockedHandlerHandler for checking if processing of events should be canceled.
callerParent Network id from which this is called. Set NetworkId.Invalid if no parent.
Returns
True if all sucessfull.

Definition at line 240 of file MyEventBuffer.cs.

void VRage.Replication.MyEventsBuffer.RemoveEvents ( NetworkId  objectInstance)
inline

Removes all events from target id.

Parameters
objectInstanceTarget object network id.

Definition at line 180 of file MyEventBuffer.cs.


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