Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

RakNet::Replica2 Class Reference
[ReplicaManager2]

Base class for game objects that use the ReplicaManager2 system. More...

#include <ReplicaManager2.h>

Inherits NetworkIDObject.

Collaboration diagram for RakNet::Replica2:
Collaboration graph
[legend]

List of all members.

Classes

struct  AutoSerializeEvent

Public Member Functions

 Replica2 ()
virtual ~Replica2 ()
void SetReplicaManager (ReplicaManager2 *rm)
ReplicaManager2GetReplicaManager (void) const
virtual void SendConstruction (SystemAddress recipientAddress, SerializationType serializationType=UNDEFINED_REASON)
virtual void SendDestruction (SystemAddress recipientAddress, SerializationType serializationType=UNDEFINED_REASON)
virtual void SendSerialize (SystemAddress recipientAddress, SerializationType serializationType=UNDEFINED_REASON)
virtual void SendVisibility (SystemAddress recipientAddress, SerializationType serializationType=UNDEFINED_REASON)
virtual void BroadcastConstruction (SerializationContext *serializationContext=0)
virtual void BroadcastSerialize (SerializationContext *serializationContext=0)
virtual void BroadcastDestruction (SerializationContext *serializationContext=0)
virtual void BroadcastVisibility (bool isVisible, SerializationContext *serializationContext=0)
virtual bool SerializeConstruction (RakNet::BitStream *bitStream, SerializationContext *serializationContext)=0
virtual bool SerializeDestruction (RakNet::BitStream *bitStream, SerializationContext *serializationContext)
virtual bool Serialize (RakNet::BitStream *bitStream, SerializationContext *serializationContext)
virtual bool SerializeVisibility (RakNet::BitStream *bitStream, SerializationContext *serializationContext)
virtual void DeserializeDestruction (RakNet::BitStream *bitStream, SerializationType serializationType, SystemAddress sender, RakNetTime timestamp)
virtual void Deserialize (RakNet::BitStream *bitStream, SerializationType serializationType, SystemAddress sender, RakNetTime timestamp)
virtual void DeserializeVisibility (RakNet::BitStream *bitStream, SerializationType serializationType, SystemAddress sender, RakNetTime timestamp)
virtual BooleanQueryResult QueryConstruction (Connection_RM2 *connection)
virtual BooleanQueryResult QueryVisibility (Connection_RM2 *connection)
virtual bool QueryIsConstructionAuthority (void) const
virtual bool QueryIsDestructionAuthority (void) const
virtual bool QueryIsVisibilityAuthority (void) const
virtual bool QueryIsSerializationAuthority (void) const
virtual bool AllowRemoteConstruction (SystemAddress sender, RakNet::BitStream *replicaData, SerializationType type, RakNetTime timestamp)
virtual void AddAutoSerializeTimer (RakNetTime interval, SerializationType serializationType=AUTOSERIALIZE_DEFAULT, RakNetTime countdown=(RakNetTime)-1)
virtual void ElapseAutoSerializeTimers (RakNetTime timeElapsed, bool resynchOnly)
RakNetTime GetTimeToNextAutoSerialize (SerializationType serializationType=AUTOSERIALIZE_DEFAULT)
virtual void BroadcastAutoSerialize (SerializationContext *serializationContext, RakNet::BitStream *serializedObject)
virtual void CancelAutoSerializeTimer (SerializationType serializationType=AUTOSERIALIZE_DEFAULT)
virtual void ClearAutoSerializeTimers (void)
 Remove and deallocate all previously added autoSerialize timers.
virtual void OnAutoSerializeTimerElapsed (SerializationType serializationType, RakNet::BitStream *output, RakNet::BitStream *lastOutput, RakNetTime lastAutoSerializeCountdown, bool resynchOnly)
virtual void ForceElapseAllAutoserializeTimers (bool resynchOnly)
virtual void OnConstructionComplete (RakNet::BitStream *replicaData, SystemAddress sender, SerializationType type, ReplicaManager2 *replicaManager, RakNetTime timestamp, NetworkID networkId, bool networkIDCollision)

Protected Member Functions

virtual void ReceiveSerialize (SystemAddress sender, RakNet::BitStream *serializedObject, SerializationType serializationType, RakNetTime timestamp, DataStructures::OrderedList< SystemAddress, SystemAddress > &exclusionList)
virtual void ReceiveDestruction (SystemAddress sender, RakNet::BitStream *serializedObject, SerializationType serializationType, RakNetTime timestamp, DataStructures::OrderedList< SystemAddress, SystemAddress > &exclusionList)
virtual void DeleteOnReceiveDestruction (SystemAddress sender, RakNet::BitStream *serializedObject, SerializationType serializationType, RakNetTime timestamp, DataStructures::OrderedList< SystemAddress, SystemAddress > &exclusionList)
virtual void ReceiveVisibility (SystemAddress sender, RakNet::BitStream *serializedObject, SerializationType serializationType, RakNetTime timestamp, DataStructures::OrderedList< SystemAddress, SystemAddress > &exclusionList)
virtual Replica2ReceiveConstructionReply (SystemAddress sender, BitStream *replicaData, bool constructionAllowed)
void DereferenceFromDestruction (void)

Protected Attributes

bool hasClientID
unsigned char clientID
ReplicaManager2rm2
DataStructures::Map
< SerializationType,
AutoSerializeEvent * > 
autoSerializeTimers

Static Protected Attributes

static unsigned char clientSharedID = 0
static Replica2clientPtrArray [256]

Friends

class ReplicaManager2
class Connection_RM2

Detailed Description

Base class for game objects that use the ReplicaManager2 system.

All game objects that want to use the ReplicaManager2 functionality must inherit from Replica2.
Generally you will want to implement at a minimum Serialize(), Deserialize(), and SerializeConstruction()

Definition at line 451 of file ReplicaManager2.h.


Constructor & Destructor Documentation

Replica2::Replica2 (  ) 

Definition at line 1083 of file ReplicaManager2.cpp.

Replica2::~Replica2 (  )  [virtual]

Definition at line 1090 of file ReplicaManager2.cpp.

Here is the call graph for this function:


Member Function Documentation

void Replica2::AddAutoSerializeTimer ( RakNetTime  interval,
SerializationType  serializationType = AUTOSERIALIZE_DEFAULT,
RakNetTime  countdown = (RakNetTime)-1 
) [virtual]

Adds a timer that will elapse every countdown milliseconds, calling Serialize with AUTOSERIALIZE_DEFAULT or whatever value was passed to serializationType Every time this timer elapses, the value returned from Serialize() will be compared to the last value returned by Serialize(). If different, SendSerialize() will be called automatically. It is possible to create your own AUTOSERIALIZE enumerations and thus control which parts of the object is serialized Use CancelAutoSerializeTimer() or ClearAutoSerializeTimers() to stop the timer. If this timer already exists, it will simply override the existing countdown This timer will automatically repeat every countdown milliseconds

Note:
The same data is sent to all participants when the autoserialize timer completes. If the data sent depends on the system to be sent to, do not use autoserialize. This is an optimization to save memory.
Parameters:
[in] interval Time in milliseconds between autoserialize ticks. Use 0 to process immediately, and every tick
[in] serializationType User-defined identifier for what type of serialization operation to perform. Returned in Deserialize() as the serializationType parameter.
[in] countdown Amount of time before doing the next autoserialize. Defaults to interval

Definition at line 1670 of file ReplicaManager2.cpp.

Here is the call graph for this function:

bool Replica2::AllowRemoteConstruction ( SystemAddress  sender,
RakNet::BitStream replicaData,
SerializationType  type,
RakNetTime  timestamp 
) [virtual]

CALLBACK: If QueryIsConstructionAuthority() is false for a remote system, should that system be able to create this kind of object?

Parameters:
[in] sender Which system sent this message to us? Also happens to be the system that is requesting to create an object
[in] replicaData Construction data used to create this object
[in] type Which type of serialization operation was performed
[in] timestamp Written timestamp with the packet. 0 if not used.
Returns:
True to allow remote construction of this object. If true, we will reply with SEND_CONSTRUCTION_REPLY_ACCEPTED_TO_CLIENT and the network ID will be set on the requester.

Definition at line 1586 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

void Replica2::BroadcastAutoSerialize ( SerializationContext serializationContext,
RakNet::BitStream serializedObject 
) [virtual]

Do the actual send call when needed to support autoSerialize If you want to do different types of send calls (UNRELIABLE for example) override this function.

Parameters:
[in] serializationContext Describes the recipient, sender. serializationContext::timestamp is an [out] parameter which if you write to, will be send along with the message
[in] serializedObject Data to pass to ReplicaManager2::SendSerialize()

Definition at line 1665 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::BroadcastConstruction ( SerializationContext serializationContext = 0  )  [virtual]

Construct this object on other systems

Parameters:
[in] serializationContext Which system to send to, an input timestamp, and the SerializationType. 0 to use defaults, no timestamp.

Definition at line 1311 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::BroadcastDestruction ( SerializationContext serializationContext = 0  )  [virtual]

Destroy this object on all current connections Triggers a call to SerializeDestruction() for each connection (you can serialize differently per connection).

Parameters:
[in] serializationContext Which system to send to, an input timestamp, and the SerializationType. 0 to use defaults, no timestamp.

Definition at line 1390 of file ReplicaManager2.cpp.

Here is the call graph for this function:

void Replica2::BroadcastSerialize ( SerializationContext serializationContext = 0  )  [virtual]

Serialize this object to all current connections Triggers a call to SerializeConstruction() for each connection (you can serialize differently per connection).

Parameters:
[in] serializationContext Which system to send to, an input timestamp, and the SerializationType. 0 to use defaults, no timestamp.

Definition at line 1228 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::BroadcastVisibility ( bool  isVisible,
SerializationContext serializationContext = 0 
) [virtual]

Update the visibility state of this object on all other systems Use SEND_VISIBILITY_TRUE_TO_SYSTEM or SEND_VISIBILITY_FALSE_TO_SYSTEM in serializationContext::serializationType Triggers a call to SerializeVisibility() for each connection (you can serialize differently per connection).

Parameters:
[in] serializationContext Which system to send to, an input timestamp, and the SerializationType. 0 to use defaults, no timestamp, true visibility

Definition at line 1421 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::CancelAutoSerializeTimer ( SerializationType  serializationType = AUTOSERIALIZE_DEFAULT  )  [virtual]

Stop calling an autoSerialize timer previously setup with AddAutoSerializeTimer()

Parameters:
[in] serializationType Corresponding value passed to serializationType

Definition at line 1732 of file ReplicaManager2.cpp.

Here is the call graph for this function:

void Replica2::ClearAutoSerializeTimers ( void   )  [virtual]

Remove and deallocate all previously added autoSerialize timers.

Definition at line 1746 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::DeleteOnReceiveDestruction ( SystemAddress  sender,
RakNet::BitStream serializedObject,
SerializationType  serializationType,
RakNetTime  timestamp,
DataStructures::OrderedList< SystemAddress, SystemAddress > &  exclusionList 
) [protected, virtual]

Definition at line 1514 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

void Replica2::DereferenceFromDestruction ( void   )  [protected]

Definition at line 1382 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::Deserialize ( RakNet::BitStream bitStream,
SerializationType  serializationType,
SystemAddress  sender,
RakNetTime  timestamp 
) [virtual]

CALLBACK: Receives data written by Serialize()

Parameters:
[in] bitStream Data sent
[in] serializationType SerializationContext::serializationType
[in] sender Which system sent this message to us
[in] timestamp If a timestamp was written, will be whatever was written adjusted to the local system time. 0 if not used.

Definition at line 1134 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

void Replica2::DeserializeDestruction ( RakNet::BitStream bitStream,
SerializationType  serializationType,
SystemAddress  sender,
RakNetTime  timestamp 
) [virtual]

CALLBACK: Receives data written by SerializeDestruction()

Parameters:
[in] bitStream Data sent
[in] serializationType SerializationContext::serializationType
[in] sender Which system sent this message to us
[in] timestamp If a timestamp was written, will be whatever was written adjusted to the local system time. 0 if not used.

Definition at line 1126 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

void Replica2::DeserializeVisibility ( RakNet::BitStream bitStream,
SerializationType  serializationType,
SystemAddress  sender,
RakNetTime  timestamp 
) [virtual]

CALLBACK: Receives data written by SerializeVisibility()

Parameters:
[in] bitStream Data sent
[in] serializationType SerializationContext::serializationType
[in] sender Which system sent this message to us
[in] timestamp If a timestamp was written, will be whatever was written adjusted to the local system time. 0 if not used.

Definition at line 1141 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

void Replica2::ElapseAutoSerializeTimers ( RakNetTime  timeElapsed,
bool  resynchOnly 
) [virtual]

Elapse time for all timers added with AddAutoSerializeTimer() Only necessary to call this if you call Replica2::SetDoReplicaAutoSerializeUpdate(false) (which defaults to true)

Parameters:
[in] timeElapsed How many milliseconds have elapsed since the last call
[in] resynchOnly True to only update what was considered the last send, without actually doing a send.

Definition at line 1609 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::ForceElapseAllAutoserializeTimers ( bool  resynchOnly  )  [virtual]

Immediately elapse all autoserialize timers Used internally when a Deserialize() event occurs, so that the deserialize does not trigger an autoserialize itself

Definition at line 1595 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ReplicaManager2 * Replica2::GetReplicaManager ( void   )  const

Returns what was passed to SetReplicaManager(), or 0 if no value ever passed

Returns:
Registered instance of ReplicaManager2

Definition at line 1101 of file ReplicaManager2.cpp.

RakNetTime Replica2::GetTimeToNextAutoSerialize ( SerializationType  serializationType = AUTOSERIALIZE_DEFAULT  ) 

Returns how many milliseconds are remaining until the next autoserialize update

Parameters:
[in] serializationType User-defined identifier for what type of serialization operation to perform. Returned in Deserialize() as the serializationType parameter.
Returns:
How many milliseconds are remaining until the next autoserialize update. Returns -1 if no such autoserialization timer is in place.

Definition at line 1723 of file ReplicaManager2.cpp.

Here is the call graph for this function:

void Replica2::OnAutoSerializeTimerElapsed ( SerializationType  serializationType,
RakNet::BitStream output,
RakNet::BitStream lastOutput,
RakNetTime  lastAutoSerializeCountdown,
bool  resynchOnly 
) [virtual]

A timer has elapsed. Compare the last value sent to the current value, and if different, send the new value

Definition at line 1642 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::OnConstructionComplete ( RakNet::BitStream replicaData,
SystemAddress  sender,
SerializationType  type,
ReplicaManager2 replicaManager,
RakNetTime  timestamp,
NetworkID  networkId,
bool  networkIDCollision 
) [virtual]

A call to Connection_RM2 Construct() has completed and the object is now internally referenced

Parameters:
[in] replicaData Whatever was written bitStream in Replica2::SerializeConstruction()
[in] type Whatever was written serializationType in Replica2::SerializeConstruction()
[in] replicaManager ReplicaManager2 instance that created this class.
[in] timestamp timestamp sent with Replica2::SerializeConstruction(), 0 for none.
[in] networkId NetworkID that will be assigned automatically to the new object after this function returns
[in] networkIDCollision True if the network ID that should be assigned to this object is already in use. Usuallly this is because the object already exists, and you should just read your data and return 0.

Definition at line 1599 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

BooleanQueryResult Replica2::QueryConstruction ( Connection_RM2 connection  )  [virtual]

CALLBACK: For a given connection, should this object exist? Checked every Update cycle if ReplicaManager2::SetAutoUpdateScope() parameter construction is true Defaults to BQR_ALWAYS

Note:
This query is NOT used for ReplicaManager2::BroadcastConstruction() or SendConstruction(), which forces the operation to occur. If you DO want to use the query, use ReplicaManager2::Reference() and the next time RakPeer::Receive() is called it will occur.
Parameters:
[in] connection Which connection we are referring to. 0 means unknown, in which case the system is checking for BQR_ALWAYS or BQR_NEVER as an optimization.
Returns:
BQR_NO and the object will be destroyed. BQR_YES and the object will be created. BQR_ALWAYS is YES for all connections, and is optimized to only be checked once.

Definition at line 1558 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

bool Replica2::QueryIsConstructionAuthority ( void   )  const [virtual]

CALLBACK: Does this system have control over construction of this object? While not strictly required, it is best to have this consistently return true for only one system. Otherwise systems may fight and override each other. Defaults to NetworkIDManager::IsNetworkIDAuthority();

Returns:
True if an authority over this operation, for this object instance

Definition at line 1570 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Replica2::QueryIsDestructionAuthority ( void   )  const [virtual]

CALLBACK: Does this system have control over deletion of this object? While not strictly required, it is best to have this consistently return true for only one system. Otherwise systems may fight and override each other. Defaults to NetworkIDManager::IsNetworkIDAuthority();

Returns:
True if an authority over this operation, for this object instance

Definition at line 1574 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Replica2::QueryIsSerializationAuthority ( void   )  const [virtual]

CALLBACK: Does this system have control over serialization of object members of this object? It is reasonable to have this be true for more than one system, but you would want to serialize different variables so those systems do not conflict. Defaults to NetworkIDManager::IsNetworkIDAuthority();

Returns:
True if an authority over this operation, for this object instance

Definition at line 1582 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Replica2::QueryIsVisibilityAuthority ( void   )  const [virtual]

CALLBACK: Does this system have control over visibility of this object? While not strictly required, it is best to have this consistently return true for only one system. Otherwise systems may fight and override each other. Defaults to NetworkIDManager::IsNetworkIDAuthority();

Returns:
True if an authority over this operation, for this object instance

Definition at line 1578 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

BooleanQueryResult Replica2::QueryVisibility ( Connection_RM2 connection  )  [virtual]

CALLBACK: For a given connection, should this object be visible (updatable?) Checked every Update cycle if ReplicaManager2::SetAutoUpdateScope() parameter serializationVisiblity is true Defaults to BQR_ALWAYS

Note:
This query is NOT used for ReplicaManager2::BroadcastVisibility() or SendVisibility(), which forces the operation to occur. If you DO want to use the query, use ReplicaManager2::Reference() and the next time RakPeer::Receive() is called it will occur.
Parameters:
[in] connection Which connection we are referring to. 0 means unknown, in which case the system is checking for BQR_ALWAYS or BQR_NEVER as an optimization.
Returns:
BQR_NO or BQR_YES and as this value changes per connection, you will get a call to DeserializeVisibility().

Definition at line 1564 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

Replica2 * Replica2::ReceiveConstructionReply ( SystemAddress  sender,
BitStream replicaData,
bool  constructionAllowed 
) [protected, virtual]

Definition at line 1368 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

void Replica2::ReceiveDestruction ( SystemAddress  sender,
RakNet::BitStream serializedObject,
SerializationType  serializationType,
RakNetTime  timestamp,
DataStructures::OrderedList< SystemAddress, SystemAddress > &  exclusionList 
) [protected, virtual]

Definition at line 1483 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::ReceiveSerialize ( SystemAddress  sender,
RakNet::BitStream serializedObject,
SerializationType  serializationType,
RakNetTime  timestamp,
DataStructures::OrderedList< SystemAddress, SystemAddress > &  exclusionList 
) [protected, virtual]

Definition at line 1268 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::ReceiveVisibility ( SystemAddress  sender,
RakNet::BitStream serializedObject,
SerializationType  serializationType,
RakNetTime  timestamp,
DataStructures::OrderedList< SystemAddress, SystemAddress > &  exclusionList 
) [protected, virtual]

Definition at line 1524 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::SendConstruction ( SystemAddress  recipientAddress,
SerializationType  serializationType = UNDEFINED_REASON 
) [virtual]

Construct this object on other systems Triggers a call to SerializeConstruction()

Note:
If using peer-to-peer, NETWORK_ID_SUPPORTS_PEER_TO_PEER should be defined in RakNetDefines.h
Parameters:
[in] recipientAddress Which system to send to
[in] serializationType What type of command this is. Use UNDEFINED_REASON to have a type chosen automatically

Definition at line 1148 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::SendDestruction ( SystemAddress  recipientAddress,
SerializationType  serializationType = UNDEFINED_REASON 
) [virtual]

Destroy this object on other systems Triggers a call to SerializeDestruction()

Parameters:
[in] recipientAddress Which system to send to
[in] serializationType What type of command this is. Use UNDEFINED_REASON to have a type chosen automatically

Definition at line 1182 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::SendSerialize ( SystemAddress  recipientAddress,
SerializationType  serializationType = UNDEFINED_REASON 
) [virtual]

Serialize this object to another system Triggers a call to Serialize()

Parameters:
[in] recipientAddress Which system to send to
[in] serializationType What type of command this is. Use UNDEFINED_REASON to have a type chosen automatically

Definition at line 1196 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Replica2::SendVisibility ( SystemAddress  recipientAddress,
SerializationType  serializationType = UNDEFINED_REASON 
) [virtual]

Update the visibility of this object on another system Triggers a call to SerializeVisibility()

Parameters:
[in] recipientAddress Which system to send to
[in] serializationType What type of command this is. Use UNDEFINED_REASON to have a type chosen automatically

Definition at line 1212 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Replica2::Serialize ( RakNet::BitStream bitStream,
SerializationContext serializationContext 
) [virtual]

CALLBACK: Override in order to write to bitStream data to send as regular class serialization, for normal per-tick data. Will be received by Deserialize()

Parameters:
[out] bitStream Data to send
[in] serializationContext Describes which system we are sending to, and a timestamp as an out parameter
Returns:
Return false to cancel the operation, true to process

Definition at line 1112 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

virtual bool RakNet::Replica2::SerializeConstruction ( RakNet::BitStream bitStream,
SerializationContext serializationContext 
) [pure virtual]

CALLBACK: Override in order to write to bitStream data identifying this class for the class factory. Will be received by Connection_RM2::Construct() to create an instance of this class.

Parameters:
[out] bitStream Data used to identify this class, along with any data you also want to send when constructing the class
[in] serializationContext serializationType passed to Replica2::SendConstruction(), along with destination system, and a timestamp you can write to.
Returns:
Return false to cancel the construction, true to process

Here is the caller graph for this function:

bool Replica2::SerializeDestruction ( RakNet::BitStream bitStream,
SerializationContext serializationContext 
) [virtual]

CALLBACK: Override in order to write to bitStream data to send along with destruction requests. Will be received by DeserializeDestruction()

Parameters:
[out] bitStream Data to send
[in] serializationContext Describes which system we are sending to, and a timestamp as an out parameter
Returns:
Return false to cancel the operation, true to process

Definition at line 1105 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

bool Replica2::SerializeVisibility ( RakNet::BitStream bitStream,
SerializationContext serializationContext 
) [virtual]

CALLBACK: Override in order to write to bitStream data to send along with visibility changes. Will be received by DeserializeVisibility()

Parameters:
[out] bitStream Data to send
[in] serializationContext Describes which system we are sending to, and a timestamp as an out parameter
Returns:
Return false to cancel the operation, true to process

Definition at line 1119 of file ReplicaManager2.cpp.

Here is the caller graph for this function:

void Replica2::SetReplicaManager ( ReplicaManager2 rm  ) 

Sets the replica manager to use with this Replica. Will also set the NetworkIDManager associated with RakPeerInterface::SetNetworkIDManager() Call this before using any of the functions below!

Parameters:
[in] rm A pointer to your instance of ReplicaManager 2

Definition at line 1095 of file ReplicaManager2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class Connection_RM2 [friend]

Definition at line 688 of file ReplicaManager2.h.

friend class ReplicaManager2 [friend]

Definition at line 687 of file ReplicaManager2.h.


Member Data Documentation

Definition at line 707 of file ReplicaManager2.h.

unsigned char RakNet::Replica2::clientID [protected]

Definition at line 694 of file ReplicaManager2.h.

Replica2 * Replica2::clientPtrArray [static, protected]

Definition at line 691 of file ReplicaManager2.h.

unsigned char Replica2::clientSharedID = 0 [static, protected]

Definition at line 690 of file ReplicaManager2.h.

Definition at line 693 of file ReplicaManager2.h.

Definition at line 695 of file ReplicaManager2.h.


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