#include <VariableListDeltaTracker.h>
Public Member Functions | |
template<class VarType > | |
bool | WriteVar (const VarType &varData) |
template<class VarType > | |
bool | WriteVarToBitstream (const VarType &varData, RakNet::BitStream *bitStream) |
Calls WriteVar. If the variable has changed, writes true, and writes the variable. Otherwise writes false. | |
template<class VarType > | |
bool | WriteVarToBitstream (const VarType &varData, RakNet::BitStream *bitStream, unsigned char *bArray, unsigned short writeOffset) |
Calls WriteVarToBitstream(). Additionally, adds the boolean result of WriteVar() to boolean bit array. | |
void | FlagDirtyFromBitArray (unsigned char *bArray) |
Static Public Member Functions | |
template<class VarType > | |
static bool | ReadVarFromBitstream (const VarType &varData, RakNet::BitStream *bitStream) |
Paired with a call to WriteVarToBitstream(), will read a variable if it had changed. Otherwise the values remains the same. |
void RakNet::VariableListDeltaTracker::FlagDirtyFromBitArray | ( | unsigned char * | bArray | ) |
Variables flagged dirty will cause WriteVar() to return true, even if the variable had not otherwise changed This updates all the variables in the list, where in each index varsWritten is true, so will the variable at the corresponding index be flagged dirty
bool RakNet::VariableListDeltaTracker::WriteVar | ( | const VarType & | varData | ) | [inline] |
Records the passed value of the variable to memory, and returns true if the value is different from the write before that (or if it is the first write)