SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
SLNet::VariableDeltaSerializer Class Reference

Class to compare memory values of variables in a current state to a prior state Results of the comparisons will be written to a bitStream, such that only changed variables get written
Can be used with ReplicaManager3 to Serialize a Replica3 per-variable, rather than comparing the entire object against itself
Usage:
BR> More...

`#include <slikenet/VariableDeltaSerializer.h>`

## Classes

struct | ChangedVariablesList
struct | DeserializationContext
struct | RemoteSystemVariableHistory
struct | SerializationContext

## Public Member Functions

| VariableDeltaSerializer ()
| ~VariableDeltaSerializer ()
void | BeginUnreliableAckedSerialize (SerializationContext *context, RakNetGUID _guid, BitStream *_bitStream, uint32_t _sendReceipt)

Call before doing one or more SerializeVariable calls when the data will be sent UNRELIABLE_WITH_ACK_RECEIPT The last value of each variable will be saved per remote system. Additionally, a history of _sendReceipts is stored to determine what to resend on packetloss. When variables are lost, they will be flagged dirty and always resent to the system that lost it Disadvantages: Every variable for every remote system is copied internally, in addition to a history list of what variables changed for which _sendReceipt. Very memory and CPU intensive for multiple connections. Advantages: When data needs to be resent by RakNet, RakNet can only resend the value it currently has. This allows the application to control the resend, sending the most recent value of the variable. The end result is that bandwidth is used more efficiently because old data is never sent.

void | BeginUniqueSerialize (SerializationContext *context, RakNetGUID _guid, BitStream *_bitStream)

Call before doing one or more SerializeVariable calls for data that may be sent differently to every remote system (such as an invisibility flag that only teammates can see) The last value of each variable will be saved per remote system. Unlike BeginUnreliableAckedSerialize(), send receipts are not necessary Disadvantages: Every variable for every remote system is copied internally. Very memory and CPU intensive for multiple connections. Advantages: When data is sent differently depending on the recipient, this system can make things easier to use and is as efficient as it can be.

void | BeginIdenticalSerialize (SerializationContext *context, bool _isFirstSerializeToThisSystem, BitStream *_bitStream)

Call before doing one or more SerializeVariable calls for data that is sent with the same value to every remote system (such as health, position, etc.) This is the most common type of serialization, and also the most efficient Disadvantages: A copy of every variable still needs to be held, although only once Advantages: After the first serialization, the last serialized bitStream will be used for subsequent sends.

void | EndSerialize (SerializationContext *context)
| Call after BeginUnreliableAckedSerialize(), BeginUniqueSerialize(), or BeginIdenticalSerialize(), then after calling SerializeVariable() one or more times.
void | BeginDeserialize (DeserializationContext *context, BitStream *_bitStream)
| Call when you receive the BitStream written by SerializeVariable(), before calling DeserializeVariable()
void | EndDeserialize (DeserializationContext *context)
void | AddRemoteSystemVariableHistory (RakNetGUID guid)
void | RemoveRemoteSystemVariableHistory (RakNetGUID guid)
void | OnPreSerializeTick (void)
void | OnMessageReceipt (RakNetGUID guid, uint32_t receiptId, bool messageArrived)
template<class VarType >
void | SerializeVariable (SerializationContext *context, const VarType &variable)
template<class VarType >
bool | DeserializeVariable (DeserializationContext *context, VarType &variable)

## Protected Member Functions

void | FreeVarsAssociatedWithReceipt (RakNetGUID guid, uint32_t receiptId)
void | DirtyAndFreeVarsAssociatedWithReceipt (RakNetGUID guid, uint32_t receiptId)
unsigned int | GetVarsWrittenPerRemoteSystemListIndex (RakNetGUID guid)
void | RemoveRemoteSystemVariableHistory (void)
RemoteSystemVariableHistory * | GetRemoteSystemVariableHistory (RakNetGUID guid)
ChangedVariablesList * | AllocChangedVariablesList (void)
void | FreeChangedVariablesList (ChangedVariablesList *changedVariables)
void | StoreChangedVariablesList (RemoteSystemVariableHistory *variableHistory, ChangedVariablesList *changedVariables, uint32_t sendReceipt)
RemoteSystemVariableHistory * | StartVariableHistoryWrite (RakNetGUID guid)
unsigned int | GetRemoteSystemHistoryListIndex (RakNetGUID guid)

## Static Protected Member Functions

static int | UpdatedVariablesListPtrComp (const uint32_t &key, ChangedVariablesList *const &data)

## Protected Attributes

DataStructures::List < RemoteSystemVariableHistory * > | remoteSystemVariableHistoryList
DataStructures::MemoryPool < ChangedVariablesList > | updatedVariablesMemoryPool
bool | didComparisonThisTick
SLNet::BitStream | identicalSerializationBs

## Detailed Description

Class to compare memory values of variables in a current state to a prior state Results of the comparisons will be written to a bitStream, such that only changed variables get written
Can be used with ReplicaManager3 to Serialize a Replica3 per-variable, rather than comparing the entire object against itself
Usage:
BR>

1. Call BeginUnreliableAckedSerialize(), BeginUniqueSerialize(), or BeginIdenticalSerialize(). In the case of Replica3, this would be in the Serialize() call
2. For each variable of the type in step 1, call Serialize(). The same variables must be serialized every tick()
3. Call EndSerialize()
4. Repeat step 1 for each of the other categories of how to send varaibles
   BR> On the receiver:
   BR>

1. Call BeginDeserialize(). In the case of Replica3, this would be in the Deserialize() call
2. Call DeserializeVariable() for each variable, in the same order as was Serialized()
3. Call EndSerialize()
   See Also
     The ReplicaManager3 sample

Definition at line 45 of file VariableDeltaSerializer.h.

## Class Documentation

struct SLNet::VariableDeltaSerializer::ChangedVariablesList

Definition at line 224 of file VariableDeltaSerializer.h.

Class Members
unsigned char | bitField |
unsigned short | bitWriteIndex |
uint32_t | sendReceipt |

struct SLNet::VariableDeltaSerializer::DeserializationContext

Definition at line 73 of file VariableDeltaSerializer.h.

Class Members
BitStream * | bitStream |

struct SLNet::VariableDeltaSerializer::RemoteSystemVariableHistory

Definition at line 238 of file VariableDeltaSerializer.h.

Class Members
RakNetGUID | guid |
OrderedList< uint32_t, ChangedVariablesList *, UpdatedVariablesListPtrComp > | updatedVariablesHistory |
VariableListDeltaTracker | variableListDeltaTracker |

## Constructor & Destructor Documentation

VariableDeltaSerializer::VariableDeltaSerializer | ( |  | ) |

Definition at line 20 of file VariableDeltaSerializer.cpp.

References didComparisonThisTick.

VariableDeltaSerializer::~VariableDeltaSerializer | ( |  | ) |

Definition at line 21 of file VariableDeltaSerializer.cpp.

References RemoveRemoteSystemVariableHistory().

## Member Function Documentation

void VariableDeltaSerializer::AddRemoteSystemVariableHistory | ( | RakNetGUID | guid | ) |

BeginUnreliableAckedSerialize() and BeginUniqueSerialize() require knowledge of when connections are added and dropped Call AddRemoteSystemVariableHistory() and RemoveRemoteSystemVariableHistory() to notify the system of these events

Parameters

  [in] | _guid | Which system we are sending to

Definition at line 133 of file VariableDeltaSerializer.cpp.

VariableDeltaSerializer::ChangedVariablesList * VariableDeltaSerializer::AllocChangedVariablesList | ( | void |  | ) |

protected

Definition at line 237 of file VariableDeltaSerializer.cpp.

References _FILE_AND_LINE_, DataStructures::MemoryPool< MemoryBlockType >::Allocate(), SLNet::VariableDeltaSerializer::ChangedVariablesList::bitField, SLNet::VariableDeltaSerializer::ChangedVariablesList::bitWriteIndex, and updatedVariablesMemoryPool.

Referenced by BeginUnreliableAckedSerialize().

void VariableDeltaSerializer::BeginDeserialize | ( | DeserializationContext * | context,
|  | BitStream * | _bitStream
| ) |  |

Call when you receive the BitStream written by SerializeVariable(), before calling DeserializeVariable()

Parameters

  [in] | context | Holds the context of this group of deserialize calls. This can be a stack object just passed to the function.
  [in] | _bitStream | Pass the bitStream originally passed to and written to by serialize calls

Definition at line 123 of file VariableDeltaSerializer.cpp.

References SLNet::VariableDeltaSerializer::DeserializationContext::bitStream.

void VariableDeltaSerializer::BeginIdenticalSerialize | ( | SerializationContext * | context,
|  | bool | _isFirstSerializeToThisSystem,
|  | BitStream * | _bitStream
| ) |  |

Call before doing one or more SerializeVariable calls for data that is sent with the same value to every remote system (such as health, position, etc.) This is the most common type of serialization, and also the most efficient Disadvantages: A copy of every variable still needs to be held, although only once Advantages: After the first serialization, the last serialized bitStream will be used for subsequent sends.

Precondition
  Call OnPreSerializeTick() before doing any calls to BeginIdenticalSerialize() for each of your objects, once per game tick

Parameters

  [in] | context | Holds the context of this group of serialize calls. This can be a stack object just passed to the function.
  [in] | _isFirstSerializeToThisSystem | Pass true if this is the first time ever serializing to this system (the initial download). This way all variables will be written, rather than checking against prior sent values.
  [in] | _bitSteam | Which bitStream to write to

Definition at line 66 of file VariableDeltaSerializer.cpp.

References SLNet::VariableDeltaSerializer::SerializationContext::anyVariablesWritten, SLNet::VariableDeltaSerializer::SerializationContext::bitStream, SLNet::VariableDeltaSerializer::SerializationContext::guid, SLNet::VariableDeltaSerializer::SerializationContext::newSystemSend, RELIABLE, SLNet::VariableDeltaSerializer::SerializationContext::serializationMode, StartVariableHistoryWrite(), SLNet::UNASSIGNED_RAKNET_GUID(), SLNet::VariableDeltaSerializer::SerializationContext::variableHistory, and SLNet::VariableDeltaSerializer::SerializationContext::variableHistoryIdentical.

void VariableDeltaSerializer::BeginUniqueSerialize | ( | SerializationContext * | context,
|  | RakNetGUID | _guid,
|  | BitStream * | _bitStream
| ) |  |

Call before doing one or more SerializeVariable calls for data that may be sent differently to every remote system (such as an invisibility flag that only teammates can see) The last value of each variable will be saved per remote system. Unlike BeginUnreliableAckedSerialize(), send receipts are not necessary Disadvantages: Every variable for every remote system is copied internally. Very memory and CPU intensive for multiple connections. Advantages: When data is sent differently depending on the recipient, this system can make things easier to use and is as efficient as it can be.

Precondition
  AddRemoteSystemVariableHistory() and RemoveRemoteSystemVariableHistory() must be called for new and lost connections

Parameters

  [in] | context | Holds the context of this group of serialize calls. This can be a stack object just passed to the function.
  [in] | _guid | Which system we are sending to
  [in] | _bitSteam | Which bitStream to write to

Definition at line 51 of file VariableDeltaSerializer.cpp.

References SLNet::VariableDeltaSerializer::SerializationContext::anyVariablesWritten, SLNet::VariableDeltaSerializer::SerializationContext::bitStream, SLNet::VariableDeltaSerializer::SerializationContext::guid, SLNet::VariableDeltaSerializer::SerializationContext::newSystemSend, RakAssert, RELIABLE, SLNet::VariableDeltaSerializer::SerializationContext::serializationMode, StartVariableHistoryWrite(), SLNet::UNASSIGNED_RAKNET_GUID(), SLNet::VariableDeltaSerializer::SerializationContext::variableHistory, and SLNet::VariableDeltaSerializer::SerializationContext::variableHistoryUnique.

void VariableDeltaSerializer::BeginUnreliableAckedSerialize | ( | SerializationContext * | context,
|  | RakNetGUID | _guid,
|  | BitStream * | _bitStream,
|  | uint32_t | _sendReceipt
| ) |  |

Call before doing one or more SerializeVariable calls when the data will be sent UNRELIABLE_WITH_ACK_RECEIPT The last value of each variable will be saved per remote system. Additionally, a history of _sendReceipts is stored to determine what to resend on packetloss. When variables are lost, they will be flagged dirty and always resent to the system that lost it Disadvantages: Every variable for every remote system is copied internally, in addition to a history list of what variables changed for which _sendReceipt. Very memory and CPU intensive for multiple connections. Advantages: When data needs to be resent by RakNet, RakNet can only resend the value it currently has. This allows the application to control the resend, sending the most recent value of the variable. The end result is that bandwidth is used more efficiently because old data is never sent.

Precondition
  Upon getting ID_SND_RECEIPT_LOSS or ID_SND_RECEIPT_ACKED call OnMessageReceipt()
  AddRemoteSystemVariableHistory() and RemoveRemoteSystemVariableHistory() must be called for new and lost connections

Parameters

  [in] | context | Holds the context of this group of serialize calls. This can be a stack object just passed to the function.
  [in] | _guid | Which system we are sending to
  [in] | _bitSteam | Which bitStream to write to
  [in] | _sendReceipt | Returned from RakPeer::IncrementNextSendReceipt() and passed to the Send() or SendLists() function. Identifies this update for ID_SND_RECEIPT_LOSS and ID_SND_RECEIPT_ACKED

Definition at line 36 of file VariableDeltaSerializer.cpp.

References AllocChangedVariablesList(), SLNet::VariableDeltaSerializer::SerializationContext::anyVariablesWritten, SLNet::VariableDeltaSerializer::SerializationContext::bitStream, SLNet::VariableDeltaSerializer::SerializationContext::changedVariables, SLNet::VariableDeltaSerializer::SerializationContext::guid, SLNet::VariableDeltaSerializer::SerializationContext::newSystemSend, RakAssert, SLNet::VariableDeltaSerializer::SerializationContext::sendReceipt, SLNet::VariableDeltaSerializer::SerializationContext::serializationMode, StartVariableHistoryWrite(), SLNet::UNASSIGNED_RAKNET_GUID(), UNRELIABLE_WITH_ACK_RECEIPT, SLNet::VariableDeltaSerializer::SerializationContext::variableHistory, and SLNet::VariableDeltaSerializer::SerializationContext::variableHistoryUnique.

template<class VarType >

bool SLNet::VariableDeltaSerializer::DeserializeVariable | ( | DeserializationContext * | context,
|  | VarType & | variable
| ) |  |

inline

Call to deserialize into a variable

Precondition
  You have called BeginDeserialize()

Note
  Be sure to call EndDeserialize() after finishing all deserializations

Parameters

  [in] | context | Same context pointer passed to BeginDeserialize()
  [in] | variable | A variable to write to the bitStream passed to context

Definition at line 213 of file VariableDeltaSerializer.h.

References SLNet::VariableDeltaSerializer::DeserializationContext::bitStream, and SLNet::VariableListDeltaTracker::ReadVarFromBitstream().

void VariableDeltaSerializer::DirtyAndFreeVarsAssociatedWithReceipt | ( | RakNetGUID | guid,
|  | uint32_t | receiptId
| ) |  |

protected

Definition at line 186 of file VariableDeltaSerializer.cpp.

References SLNet::VariableListDeltaTracker::FlagDirtyFromBitArray(), FreeChangedVariablesList(), DataStructures::OrderedList< key_type, data_type, default_comparison_function >::GetIndexFromKey(), GetVarsWrittenPerRemoteSystemListIndex(), remoteSystemVariableHistoryList, DataStructures::OrderedList< key_type, data_type, default_comparison_function >::RemoveAtIndex(), SLNet::VariableDeltaSerializer::RemoteSystemVariableHistory::updatedVariablesHistory, and SLNet::VariableDeltaSerializer::RemoteSystemVariableHistory::variableListDeltaTracker.

Referenced by OnMessageReceipt().

void VariableDeltaSerializer::EndDeserialize | ( | DeserializationContext * | context | ) |

Parameters

  [in] | context | Same context pointer passed to BeginDeserialize()

Definition at line 128 of file VariableDeltaSerializer.cpp.

void VariableDeltaSerializer::EndSerialize | ( | SerializationContext * | context | ) |

Call after BeginUnreliableAckedSerialize(), BeginUniqueSerialize(), or BeginIdenticalSerialize(), then after calling SerializeVariable() one or more times.

Parameters

  [in] | context | Same context pointer passed to BeginUnreliableAckedSerialize(), BeginUniqueSerialize(), or BeginIdenticalSerialize()

Definition at line 78 of file VariableDeltaSerializer.cpp.

References SLNet::VariableDeltaSerializer::SerializationContext::anyVariablesWritten, SLNet::VariableDeltaSerializer::SerializationContext::bitStream, SLNet::VariableDeltaSerializer::SerializationContext::changedVariables, didComparisonThisTick, FreeChangedVariablesList(), identicalSerializationBs, SLNet::BitStream::Reset(), SLNet::BitStream::ResetReadPointer(), SLNet::VariableDeltaSerializer::SerializationContext::sendReceipt, SLNet::VariableDeltaSerializer::SerializationContext::serializationMode, StoreChangedVariablesList(), UNRELIABLE_WITH_ACK_RECEIPT, SLNet::VariableDeltaSerializer::SerializationContext::variableHistory, SLNet::VariableDeltaSerializer::SerializationContext::variableHistoryIdentical, and SLNet::BitStream::Write().

void VariableDeltaSerializer::FreeChangedVariablesList | ( | ChangedVariablesList * | changedVariables | ) |

protected

Definition at line 244 of file VariableDeltaSerializer.cpp.

References _FILE_AND_LINE_, DataStructures::MemoryPool< MemoryBlockType >::Release(), and updatedVariablesMemoryPool.

Referenced by DirtyAndFreeVarsAssociatedWithReceipt(), EndSerialize(), FreeVarsAssociatedWithReceipt(), and RemoveRemoteSystemVariableHistory().

void VariableDeltaSerializer::FreeVarsAssociatedWithReceipt | ( | RakNetGUID | guid,
|  | uint32_t | receiptId
| ) |  |

protected

Definition at line 168 of file VariableDeltaSerializer.cpp.

References FreeChangedVariablesList(), DataStructures::OrderedList< key_type, data_type, default_comparison_function >::GetIndexFromKey(), GetVarsWrittenPerRemoteSystemListIndex(), remoteSystemVariableHistoryList, DataStructures::OrderedList< key_type, data_type, default_comparison_function >::RemoveAtIndex(), and SLNet::VariableDeltaSerializer::RemoteSystemVariableHistory::updatedVariablesHistory.

Referenced by OnMessageReceipt().

unsigned int VariableDeltaSerializer::GetRemoteSystemHistoryListIndex | ( | RakNetGUID | guid | ) |

protected

Definition at line 273 of file VariableDeltaSerializer.cpp.

References remoteSystemVariableHistoryList, and DataStructures::List< list_type >::Size().

Referenced by GetRemoteSystemVariableHistory(), and StartVariableHistoryWrite().

VariableDeltaSerializer::RemoteSystemVariableHistory * VariableDeltaSerializer::GetRemoteSystemVariableHistory | ( | RakNetGUID | guid | ) |

protected

Definition at line 231 of file VariableDeltaSerializer.cpp.

References GetRemoteSystemHistoryListIndex(), and remoteSystemVariableHistoryList.

unsigned int VariableDeltaSerializer::GetVarsWrittenPerRemoteSystemListIndex | ( | RakNetGUID | guid | ) |

protected

Definition at line 206 of file VariableDeltaSerializer.cpp.

References remoteSystemVariableHistoryList, and DataStructures::List< list_type >::Size().

Referenced by DirtyAndFreeVarsAssociatedWithReceipt(), FreeVarsAssociatedWithReceipt(), and RemoveRemoteSystemVariableHistory().

void VariableDeltaSerializer::OnMessageReceipt | ( | RakNetGUID | guid,
|  | uint32_t | receiptId,
|  | bool | messageArrived
| ) |  |

Call when getting ID_SND_RECEIPT_LOSS or ID_SND_RECEIPT_ACKED for a particular system Example:

uint32_t msgNumber; memcpy(&msgNumber, packet->data+1, 4); DataStructures::List<Replica3*> replicaListOut; replicaManager.GetReplicasCreatedByMe(replicaListOut); unsigned int idx; for (idx=0; idx < replicaListOut.GetSize(); idx++) { ((SampleReplica*)replicaListOut[idx])->NotifyReplicaOfMessageDeliveryStatus(packet->guid,msgNumber, packet->data[0]==ID_SND_RECEIPT_ACKED); }

Parameters

  [in] | guid | Which system we are sending to
  [in] | receiptId | Encoded in bytes 1-4 inclusive of ID_SND_RECEIPT_LOSS and ID_SND_RECEIPT_ACKED
  [in] | messageArrived | True for ID_SND_RECEIPT_ACKED, false otherwise

Definition at line 26 of file VariableDeltaSerializer.cpp.

References DirtyAndFreeVarsAssociatedWithReceipt(), and FreeVarsAssociatedWithReceipt().

void VariableDeltaSerializer::OnPreSerializeTick | ( | void |  | ) |

BeginIdenticalSerialize() requires knowledge of when serialization has started for an object across multiple systems This way it can setup the flag to do new comparisons against the last sent values, rather than just resending the last sent bitStream For Replica3, overload and call this from Replica3::OnUserReplicaPreSerializeTick()

Definition at line 287 of file VariableDeltaSerializer.cpp.

References didComparisonThisTick.

void VariableDeltaSerializer::RemoveRemoteSystemVariableHistory | ( | RakNetGUID | guid | ) |

BeginUnreliableAckedSerialize() and BeginUniqueSerialize() require knowledge of when connections are added and dropped Call AddRemoteSystemVariableHistory() and RemoveRemoteSystemVariableHistory() to notify the system of these events

Parameters

  [in] | _guid | Which system we are sending to

Definition at line 138 of file VariableDeltaSerializer.cpp.

References FreeChangedVariablesList(), GetVarsWrittenPerRemoteSystemListIndex(), remoteSystemVariableHistoryList, DataStructures::List< list_type >::RemoveAtIndexFast(), and DataStructures::List< list_type >::Size().

void VariableDeltaSerializer::RemoveRemoteSystemVariableHistory | ( | void |  | ) |

protected

Definition at line 216 of file VariableDeltaSerializer.cpp.

References _FILE_AND_LINE_, DataStructures::List< list_type >::Clear(), FreeChangedVariablesList(), remoteSystemVariableHistoryList, and DataStructures::List< list_type >::Size().

Referenced by ~VariableDeltaSerializer().

template<class VarType >

void SLNet::VariableDeltaSerializer::SerializeVariable | ( | SerializationContext * | context,
|  | const VarType & | variable
| ) |  |

inline

Call to Serialize a variable Will write to the bitSteam passed to context true, variableValue if the variable has changed or has never been written. Otherwise will write false.

Precondition
  You have called BeginUnreliableAckedSerialize(), BeginUniqueSerialize(), or BeginIdenticalSerialize()
  Will also require calling OnPreSerializeTick() if using BeginIdenticalSerialize()

Note
  Be sure to call EndSerialize() after finishing all serializations

Parameters

  [in] | context | Same context pointer passed to BeginUnreliableAckedSerialize(), BeginUniqueSerialize(), or BeginIdenticalSerialize()
  [in] | variable | A variable to write to the bitStream passed to context

Definition at line 165 of file VariableDeltaSerializer.h.

References SLNet::VariableDeltaSerializer::SerializationContext::anyVariablesWritten, SLNet::VariableDeltaSerializer::ChangedVariablesList::bitField, SLNet::VariableDeltaSerializer::SerializationContext::bitStream, SLNet::VariableDeltaSerializer::ChangedVariablesList::bitWriteIndex, SLNet::VariableDeltaSerializer::SerializationContext::changedVariables, SLNet::VariableListDeltaTracker::IsPastEndOfList(), SLNet::VariableDeltaSerializer::SerializationContext::newSystemSend, SLNet::VariableDeltaSerializer::SerializationContext::serializationMode, UNRELIABLE_WITH_ACK_RECEIPT, SLNet::VariableDeltaSerializer::SerializationContext::variableHistory, SLNet::VariableDeltaSerializer::SerializationContext::variableHistoryIdentical, SLNet::VariableDeltaSerializer::RemoteSystemVariableHistory::variableListDeltaTracker, SLNet::BitStream::Write(), and SLNet::VariableListDeltaTracker::WriteVarToBitstream().

VariableDeltaSerializer::RemoteSystemVariableHistory * VariableDeltaSerializer::StartVariableHistoryWrite | ( | RakNetGUID | guid | ) |

protected

Definition at line 254 of file VariableDeltaSerializer.cpp.

References _FILE_AND_LINE_, GetRemoteSystemHistoryListIndex(), SLNet::VariableDeltaSerializer::RemoteSystemVariableHistory::guid, DataStructures::List< list_type >::Push(), remoteSystemVariableHistoryList, SLNet::VariableListDeltaTracker::StartWrite(), and SLNet::VariableDeltaSerializer::RemoteSystemVariableHistory::variableListDeltaTracker.

Referenced by BeginIdenticalSerialize(), BeginUniqueSerialize(), and BeginUnreliableAckedSerialize().

void VariableDeltaSerializer::StoreChangedVariablesList | ( | RemoteSystemVariableHistory * | variableHistory,
|  | ChangedVariablesList * | changedVariables,
|  | uint32_t | sendReceipt
| ) |  |

protected

Definition at line 248 of file VariableDeltaSerializer.cpp.

References _FILE_AND_LINE_, DataStructures::OrderedList< key_type, data_type, default_comparison_function >::Insert(), SLNet::VariableDeltaSerializer::ChangedVariablesList::sendReceipt, and SLNet::VariableDeltaSerializer::RemoteSystemVariableHistory::updatedVariablesHistory.

Referenced by EndSerialize().

int SLNet::VariableDeltaSerializer::UpdatedVariablesListPtrComp | ( | const uint32_t & | key,
|  | ChangedVariablesList *const & | data
| ) |  |

staticprotected

Definition at line 159 of file VariableDeltaSerializer.cpp.

References SLNet::VariableDeltaSerializer::ChangedVariablesList::sendReceipt.

## Member Data Documentation

bool SLNet::VariableDeltaSerializer::didComparisonThisTick

protected

Definition at line 251 of file VariableDeltaSerializer.h.

Referenced by EndSerialize(), OnPreSerializeTick(), and VariableDeltaSerializer().

SLNet::BitStream SLNet::VariableDeltaSerializer::identicalSerializationBs

protected

Definition at line 252 of file VariableDeltaSerializer.h.

Referenced by EndSerialize().

DataStructures::List<RemoteSystemVariableHistory*> SLNet::VariableDeltaSerializer::remoteSystemVariableHistoryList

protected

A list of RemoteSystemVariableHistory indexed by guid, one per connection that we serialize to List is added to when SerializeConstruction is called, and removed from when SerializeDestruction is called, or when a given connection is dropped

Definition at line 246 of file VariableDeltaSerializer.h.

Referenced by DirtyAndFreeVarsAssociatedWithReceipt(), FreeVarsAssociatedWithReceipt(), GetRemoteSystemHistoryListIndex(), GetRemoteSystemVariableHistory(), GetVarsWrittenPerRemoteSystemListIndex(), RemoveRemoteSystemVariableHistory(), and StartVariableHistoryWrite().

DataStructures::MemoryPool<ChangedVariablesList> SLNet::VariableDeltaSerializer::updatedVariablesMemoryPool

protected

Definition at line 249 of file VariableDeltaSerializer.h.

Referenced by AllocChangedVariablesList(), and FreeChangedVariablesList().

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

- Source/include/slikenet/VariableDeltaSerializer.h
- Source/src/VariableDeltaSerializer.cpp