Shadowrun: Awakened 29 September 2011 - Build 871
Classes | Enumerations
ReplicaManager3

Third implementation of object replication.

Classes

class  RakNet::Connection_RM3
 Each remote system is represented by Connection_RM3. Used to allocate Replica3 and track which instances have been allocated. More...
struct  RakNet::DeserializeParameters
struct  RakNet::LastSerializationResult
struct  RakNet::LastSerializationResultBS
class  RakNet::Replica3
 Base class for your replicated objects for the ReplicaManager3 system. More...
class  RakNet::ReplicaManager3
 System to help automate game object construction, destruction, and serialization. More...
struct  RakNet::SerializeParameters

Enumerations

enum  RakNet::RM3ActionOnPopConnection { RakNet::RM3AOPC_DO_NOTHING, RakNet::RM3AOPC_DELETE_REPLICA, RakNet::RM3AOPC_DELETE_REPLICA_AND_BROADCAST_DESTRUCTION }
enum  RakNet::RM3ConstructionState {
  RakNet::RM3CS_SEND_CONSTRUCTION, RakNet::RM3CS_ALREADY_EXISTS_REMOTELY, RakNet::RM3CS_ALREADY_EXISTS_REMOTELY_DO_NOT_CONSTRUCT, RakNet::RM3CS_NEVER_CONSTRUCT,
  RakNet::RM3CS_NO_ACTION
}
 Return codes for Connection_RM3::GetConstructionState() and Replica3::QueryConstruction() More...
enum  RakNet::RM3DestructionState { RakNet::RM3DS_SEND_DESTRUCTION, RakNet::RM3DS_DO_NOT_QUERY_DESTRUCTION, RakNet::RM3DS_NO_ACTION }
enum  RakNet::RM3QuerySerializationResult { RakNet::RM3QSR_CALL_SERIALIZE, RakNet::RM3QSR_DO_NOT_CALL_SERIALIZE, RakNet::RM3QSR_NEVER_CALL_SERIALIZE }
enum  RakNet::RM3SerializationResult {
  RakNet::RM3SR_BROADCAST_IDENTICALLY, RakNet::RM3SR_BROADCAST_IDENTICALLY_FORCE_SERIALIZATION, RakNet::RM3SR_SERIALIZED_UNIQUELY, RakNet::RM3SR_SERIALIZED_ALWAYS,
  RakNet::RM3SR_SERIALIZED_ALWAYS_IDENTICALLY, RakNet::RM3SR_DO_NOT_SERIALIZE, RakNet::RM3SR_NEVER_SERIALIZE_FOR_THIS_CONNECTION
}
enum  RakNet::SendSerializeIfChangedResult { RakNet::SSICR_SENT_DATA, RakNet::SSICR_DID_NOT_SEND_DATA, RakNet::SSICR_NEVER_SERIALIZE }

Enumeration Type Documentation

Enumerator:
RM3AOPC_DO_NOTHING 
RM3AOPC_DELETE_REPLICA 
RM3AOPC_DELETE_REPLICA_AND_BROADCAST_DESTRUCTION 

Definition at line 705 of file ReplicaManager3.h.

Indicates what state the object should be in for the remote system

Enumerator:
RM3CS_SEND_CONSTRUCTION 

This object should exist on the remote system. Send a construction message if necessary If the NetworkID is already in use, it will not do anything If it is not in use, it will create the object, and then call DeserializeConstruction

RM3CS_ALREADY_EXISTS_REMOTELY 

This object should exist on the remote system. The other system already has the object, and the object will never be deleted. This is true of objects that are loaded with the level, for example. Treat it as if it existed, without sending a construction message. Will call SerializeConstructionExisting() to the object on the remote system

RM3CS_ALREADY_EXISTS_REMOTELY_DO_NOT_CONSTRUCT 

Same as RM3CS_ALREADY_EXISTS_REMOTELY but does not call SerializeConstructionExisting()

RM3CS_NEVER_CONSTRUCT 

This object will never be sent to this system.

RM3CS_NO_ACTION 

Don't do anything this tick. Will query again next tick.

Definition at line 614 of file ReplicaManager3.h.

If this object already exists for this system, should it be removed?

Enumerator:
RM3DS_SEND_DESTRUCTION 

This object should not exist on the remote system. Send a destruction message if necessary.

RM3DS_DO_NOT_QUERY_DESTRUCTION 

This object will never be destroyed by a per-tick query. Don't call again.

RM3DS_NO_ACTION 

Don't do anything this tick. Will query again next tick.

Definition at line 640 of file ReplicaManager3.h.

First pass at topology to see if an object should be serialized

Enumerator:
RM3QSR_CALL_SERIALIZE 

Call Serialize() to see if this object should be serializable for this connection.

RM3QSR_DO_NOT_CALL_SERIALIZE 

Do not call Serialize() this tick to see if this object should be serializable for this connection.

RM3QSR_NEVER_CALL_SERIALIZE 

Never call Serialize() for this object and connection. This system will not serialize this object for this topology.

Definition at line 694 of file ReplicaManager3.h.

Return codes when constructing an object

Enumerator:
RM3SR_BROADCAST_IDENTICALLY 

This object serializes identically no matter who we send to We also send it to every connection (broadcast). Efficient for memory, speed, and bandwidth but only if the object is always broadcast identically.

RM3SR_BROADCAST_IDENTICALLY_FORCE_SERIALIZATION 

Same as RM3SR_BROADCAST_IDENTICALLY, but assume the object needs to be serialized, do not check with a memcmp Assume the object changed, and serialize it Use this if you know exactly when your object needs to change. Can be faster than RM3SR_BROADCAST_IDENTICALLY. An example of this is if every member variable has an accessor, changing a member sets a flag, and you check that flag in Replica3::QuerySerialization() The opposite of this is RM3SR_DO_NOT_SERIALIZE, in case the object did not change

RM3SR_SERIALIZED_UNIQUELY 

Either this object serializes differently depending on who we send to or we send it to some systems and not others. Inefficient for memory and speed, but efficient for bandwidth However, if you don't know what to return, return this

RM3SR_SERIALIZED_ALWAYS 

Do not compare against last sent value. Just send even if the data is the same as the last tick If the data is always changing anyway, or you want to send unreliably, this is a good method of serialization Can send unique data per connection if desired. If same data is sent to all connections, use RM3SR_SERIALIZED_ALWAYS_IDENTICALLY for even better performance Efficient for memory and speed, but not necessarily bandwidth

RM3SR_SERIALIZED_ALWAYS_IDENTICALLY 

Even faster than RM3SR_SERIALIZED_ALWAYS Serialize() will only be called for the first system. The remaining systems will get the same data as the first system.

RM3SR_DO_NOT_SERIALIZE 

Do not serialize this object this tick, for this connection. Will query again next autoserialize timer.

RM3SR_NEVER_SERIALIZE_FOR_THIS_CONNECTION 

Never serialize this object for this connection Useful for objects that are downloaded, and never change again Efficient

Definition at line 654 of file ReplicaManager3.h.

Enumerator:
SSICR_SENT_DATA 
SSICR_DID_NOT_SEND_DATA 
SSICR_NEVER_SERIALIZE 

Definition at line 346 of file ReplicaManager3.h.


Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net