#include <ReplicaObject.h>


Public Types | |
| enum | PacketType { kPacket_Unreliable = 0, kPacket_Reliable = 1, kPacket_Certain = 2 } |
Public Member Functions | |
| ReplicaObject () | |
| virtual | ~ReplicaObject () |
| bool | IsReplica (void) const |
| bool | IsMaster (void) const |
| bool | IsPublished (void) const |
| void | Publish (void) |
| void | Unpublish (void) |
| virtual const int | GetClassID (void)=0 |
| virtual void | SetRegistered (bool flag=true)=0 |
| virtual bool | GetRegistered (void)=0 |
| int | GetUniqueID (void) |
| int | GetSessionID (void) |
| ReplicaNet * | GetBoundReplicaNet (void) |
| virtual bool | ApproveFault (void) |
| virtual bool | ApproveMigration (void) |
| virtual void | OwnerChange (void) |
| void | GiveOwnership (int sessionID) |
| void | RequestOwnership (void) |
| virtual float | CalculateDistanceToObject (ReplicaObject *object) |
| float | GetDistanceToObject (ReplicaObject *object) |
| virtual void | SetOpaquePointer (void *data) |
| virtual void * | GetOpaquePointer (void *data=0) |
| DataBlock * | FindDataBlock (void *pdata) |
| void | GiveDeltaHint (float &variable, float delta) |
| void | ContinuityBreak (float &variable, unsigned char breakTypes) |
| void | UpdateSetReliable (void) |
| void | UpdateSetCertain (void) |
| void | UpdateSetUnreliable (void) |
| bool | UpdateIsReliable (void) |
| bool | UpdateIsCertain (void) |
| bool | UpdateIsUnreliable (void) |
| void | SetLoadBalancing (const bool enable=false) |
| void | SetLoadBalancingDefault (const bool defaultValue=false) |
| bool | GetLoadBalancing (void) |
| void | SetLoadScore (const float load=0.0f) |
| void | SetLoadScoreDefault (const float defaultLoad=0.0f) |
| float | GetLoadScore (void) |
| virtual void | PostObjectCreate (void) |
| virtual void | UserRegisterDataBlocks (void) |
| void | AddAutoRegisterDataBlock (DataBlock *const dataBlock) |
| void | SetMessageReflectionID (const int sessionID=kReplicaObjectUnknownUniqueID) |
| int | GetMessageReflectionID (void) const |
| void | SetPropagateToSessionDistance (const float distance=kReplicaObject_InfiniteDistance) |
| void | SetPropagateToSessionDistanceDefault (const float distance=kReplicaObject_InfiniteDistance) |
| float | GetPropagateToSessionDistance (void) const |
| void | SetPropagateToSessionDistanceRecalculationDelay (const float delay=0.1f) |
| void | SetSessionPropagationFilter (const bool enable=false) |
| bool | GetSessionPropagationFilter (void) const |
| void | GetSessionPropagationSet (std::set< int > &theSet) |
| bool | SessionPropagationAddSession (const int sessionID) |
| bool | SessionPropagationRemoveSession (const int sessionID) |
| virtual void | DataBlockPacketDataReceived (const DataBlock *datablock) |
| virtual void | DataBlockPacketDataReceivedPost (const DataBlock *datablock) |
| virtual s_RO_RegistryBlock * | GetRegistryBlock (void) const =0 |
| void | DataSend (const int sessionid, const void *data, const int length, const PacketType type=kPacket_Reliable, const unsigned int band=0) |
| virtual void | CallBackDataReceive (const int fromsessionid, const void *data, const int length, const PacketType type) |
| int | GetProcessingDataBlocksFromSessionID (void) |
| virtual void | CallbackObjectUnpublishPre (void) |
| virtual void | CallbackObjectUnpublishPost (void) |
| bool | GetNewSessionIDAndUniqueID (void) |
| void | DelayedDelete (const float delaySeconds=0.0f) |
| void | DelayedDeleteCancel (void) |
| bool | GetDelayedDelete (void) |
| bool | GetDelayedDelete (float &delaySeconds) |
| void | UpdateSendDormant (const bool dormant=false) |
| bool | GetUpdateSendDormant (void) const |
| void | UpdateSendDormantDelay (const bool dormant=false, const float delaySeconds=0.0f) |
| void | UpdateSendDormantDelayCancel (void) |
| bool | GetUpdateSendDormantDelay (bool &dormant, float &delaySeconds) const |
| virtual void | UpdateSendDormantDelayStateChange (const bool dormant) |
| void | SetBand (const unsigned int band=0) |
| unsigned int | GetBand (void) const |
Static Public Member Functions | |
| static ReplicaObject * | AllocateForReplicaNet (void) |
| static void | DeleteForReplicaNet (ReplicaObject *object) |
Protected Member Functions | |
| virtual void | _Internal_GetUpdateType (void) |
| virtual void | _Internal_SetupLoadBalance (void) |
| virtual void | _Internal_SetupLoadBalanceScore (void) |
| virtual void | _Internal_SetupLoadBalanceDefault (void) |
| virtual void | _Internal_SetupLoadBalanceScoreDefault (void) |
| virtual void | _Internal_SetupOpaquePointer (void) |
| virtual void | _Internal_SetupPropagateDistance (void) |
| virtual void | _Internal_SetupPropagateDistanceDefault (void) |
| virtual void | _Internal_SetupBand (void) |
| void | _Internal_SetFullyQualifiedName (const char *name=0) |
| const char * | _Internal_GetFullyQualifiedName (void) |
| void | _DebugInternal_EmitClassCreate (const int packetSize, const int toSession) |
| void | _DebugInternal_EmitClassDelete (const int packetSize, const int toSession) |
| void | _DebugInternal_EmitClassUnpublish (const int packetSize, const int toSession) |
| virtual void | RegisterDataBlock (DataBlock *block) |
Protected Attributes | |
| bool | mDataBlocksRegistered |
Friends | |
| class | ReplicaNet |
| class | ReplicaNetPrivate |
| struct | SessionUnique |
| class | DataBlock |
| ReplicaObject | ( | ) |
The ctor performs some basic initialisation
| virtual ~ReplicaObject | ( | ) | [virtual] |
The dtor makes sure everything is tidy. If this object has been published the dtor also calls ReplicaNet::RemoveObject(this) to remove the references ReplicaNet holds about this object.
| bool IsReplica | ( | void | ) | const |
| bool IsMaster | ( | void | ) | const |
| bool IsPublished | ( | void | ) | const |
| void Publish | ( | void | ) |
Publish this object on to the network. This uses ReplicaNet::AddObject(this) to add a reference of this object to ReplicaNet. If the object has already been registered with ReplicaNet (i.e. it is a replica or has already been published) this will generate an assert in debug code and have no effect in release code.
| void Unpublish | ( | void | ) |
Unpublish this object from the network. If the object is a master then this will unpublish the object on all replicas. If the object is a replica then this will only unpublish the object on this node. This object will not send network updates using ReplicaNet. The user callback function CallbackObjectUnpublishPre() and CallbackObjectUnpublishPost() will be called and the object will unregister itself from all ReplicaNet object lists but will remain allocated for the user to handle.
| virtual const int GetClassID | ( | void | ) | [pure virtual] |
Gets the class id that is set
| virtual void SetRegistered | ( | bool | flag = true |
) | [pure virtual] |
Sets the registered flag to the bool value
| flag | the value to set the flag to, true is default |
| virtual bool GetRegistered | ( | void | ) | [pure virtual] |
Returns the registered flag status of this class
| int GetUniqueID | ( | void | ) |
Returns the unique id of the object local to the session. To identify an object for the entire network session you need to use GetUniqueID() and GetSessionID().
| int GetSessionID | ( | void | ) |
Returns the session id of the object which is global for the whole network session
| ReplicaNet* GetBoundReplicaNet | ( | void | ) |
Gets the object's bound ReplicaNet class
| virtual bool ApproveFault | ( | void | ) | [virtual] |
Use this virtual callback to approve or deny that this object is fault tolerant and can change owner when a session leaves.
| virtual bool ApproveMigration | ( | void | ) | [virtual] |
Use this virtual callback to approve or deny that this object can migrate when a migrate request is made.
| virtual void OwnerChange | ( | void | ) | [virtual] |
This callback is called by ReplicaNet whenever an object changes owner.
| void GiveOwnership | ( | int | sessionID | ) |
This tries to change the ownership on a ReplicaObject to another session. This only succeeds if the ReplicaObject is a Master object. This only succeeds if the ApproveMigration() callback returns true for the object.
| sessionID | the target sessionID for this object to migrate to |
| void RequestOwnership | ( | void | ) |
This requests a change of the ownership on a ReplicaObject to be the calling session. This only succeeds if the ReplicaObject is a Replica. This only succeeds if the ApproveMigration() callback returns true for the object.
| virtual float CalculateDistanceToObject | ( | ReplicaObject * | object | ) | [virtual] |
The callback for calculating the distance to an object. This can (and should) be replaced by the application's object types. Optimisation note, using ReplicaNet registered observers the target object will usually be a registered observer.
| object | The destination object to use, if this parameter is null then kReplicaObject_InfiniteDistance should be returned. |
| float GetDistanceToObject | ( | ReplicaObject * | object | ) |
Gets the distance to another supplied ReplicaObject. This function applies a caching mechanism to avoid too many unwanted calculations. Optimisation note, using ReplicaNet registered observers the target object will usually be a registered observer.
| object | The destination object to use. If the object pointer is null then kReplicaObject_InfiniteDistance is returned. |
| virtual void SetOpaquePointer | ( | void * | data | ) | [virtual] |
This is a useful virtual call that can be used to set an opaque pointer to classes or data in a ReplicaObject or the derived class
| data | the pointer to the opaque data |
| virtual void* GetOpaquePointer | ( | void * | data = 0 |
) | [virtual] |
This is a useful virtual call that can be used to obtain opaque pointers to classes or data in a ReplicaObject or the derived class
| data | the pointer to some optional data that can be passed in. This defaults to null |
| DataBlock* FindDataBlock | ( | void * | pdata | ) |
Given a pointer to memory this functions finds a data block attached to that memory area
| pdata | the pointer to the memory area |
| void GiveDeltaHint | ( | float & | variable, | |
| float | delta | |||
| ) |
This gives a delta hint for a particular variable that has a float type. The delta should be expressed in units of change per second.
| variable | the variable to give a hint for | |
| delta | the delta hint |
| void ContinuityBreak | ( | float & | variable, | |
| unsigned char | breakTypes | |||
| ) |
This is used to set a continuity break for the data set and provides useful information to the extrapolation algorithm
| variable | the variable to give a hint for | |
| breakTypes | The break types to use for this break. For example : DataBlock::kSuddenChange | DataBlock::kTeleport |
| void UpdateSetReliable | ( | void | ) |
| void UpdateSetCertain | ( | void | ) |
| void UpdateSetUnreliable | ( | void | ) |
| bool UpdateIsReliable | ( | void | ) |
| bool UpdateIsCertain | ( | void | ) |
| bool UpdateIsUnreliable | ( | void | ) |
| void SetLoadBalancing | ( | const bool | enable = false |
) |
Enables or disables load balancing for this ReplicaObject. For this object to migrate due to load balancing ReplicaObject::ApproveMigration() must return true, the corresponding ROL script command can also be used.
| enable | set this to true to enable load balancing. The default is false |
| void SetLoadBalancingDefault | ( | const bool | defaultValue = false |
) |
This sets the default value that the load balancing uses. Setting the default value in the object constructor to the same value that is set for the load balancing will result in a smaller data packet being sent.
| defaultValue | the value that is the default value. The default is false to match the parameter to SetLoadBalancing() |
| bool GetLoadBalancing | ( | void | ) |
Gets the status of the load balancing flag
| void SetLoadScore | ( | const float | load = 0.0f |
) |
| void SetLoadScoreDefault | ( | const float | defaultLoad = 0.0f |
) |
This sets the default value that the load balancing score uses. Setting the default value in the object constructor to the same value that is set for the load balancing will result in a smaller data packet being sent when an object is published. When setting a default value the same value must be set on the master and all replica objects otherwise the different sessions will assume different default values. If a replica is unable to know that other replicas will set the same default value then not using the function will ensure that the correct value is propagated.
| defaultLoad | the value that is the default value. The default is 0.0f to match the parameter to SetLoadScore() |
| float GetLoadScore | ( | void | ) |
| virtual void PostObjectCreate | ( | void | ) | [virtual] |
This virtual method callback is called by ReplicaNet when a class is created and the initial data from the data blocks has been filled in. The user can choose to override this function if needed. The base class method does not need to be called.
| virtual void UserRegisterDataBlocks | ( | void | ) | [virtual] |
Allows the user to expand the datablock mechanism with custom registering of datablocks if needed. It is required that the same DataBlocks are registered in the same order for all master and replica objects. These datablocks are registered after the internal ReplicaObject, ROL derived class datablocks and auto-added datablocks. Any datablocks added by this function should be added using RegisterDataBlock() and not AddAutoRegisterDataBlock() Do not call this function directly, this function is only called by ReplicaNet.
| void AddAutoRegisterDataBlock | ( | DataBlock *const | dataBlock | ) |
This function allows DataBlocks to automatically register when a ReplicaObject is created. It is required that the same DataBlocks are registered in the same order for all master and replica objects.
| dataBlock | the pointer to the DataBlock to register |
| void SetMessageReflectionID | ( | const int | sessionID = kReplicaObjectUnknownUniqueID |
) |
This function allows an object to state which sessionID should be used for sending messages to other sessions. By default the master object is used to send DataBlock and message updates.
| sessionID | the session to be used for sending message updates, the default is kReplicaObjectUnknownUniqueID which signifies that the master sends messages |
| int GetMessageReflectionID | ( | void | ) | const |
This function gets the sessionID used to reflect message updates
| void SetPropagateToSessionDistance | ( | const float | distance = kReplicaObject_InfiniteDistance |
) |
This functions sets the distance that an object has to be within for it to be propagated relative to a session observer. If a session has an observer and the CalculateDistanceToObject() result is greater than the value specified then the session will not receive object updates. If a session has no registered observer then the object will always be propagated to that session. It is therefore a good idea to publish and set the observer for a session before joining a ReplicaNet session so that the joining session does not receive objects that will then quickly get removed again. The default value for a ReplicaObject is to have this distance set to kReplicaObject_InfiniteDistance, which means that the object will always be propogated to a session. This function can only be used if the ReplicaObject is a master and SetSessionPropagationFilter() is not activated. This distance can be changed at runtime. To ensure this functionality is enabled the first use of this function must be before the object is published using the Publish() method. If the ReplicaObject owner changes, notified through the OwnerChange() callback, then SetPropagateToSessionDistance() must be called to enable this functionality on the new master.
| distance | the distance to set, kReplicaObject_InfiniteDistance is the default value |
| void SetPropagateToSessionDistanceDefault | ( | const float | distance = kReplicaObject_InfiniteDistance |
) |
This sets the default value that the propagate distance uses. Setting the default value in the object constructor to the same value that is set for the distance will result in a smaller data packet being sent when an object is published. When setting a default value the same value must be set on the master and all replica objects otherwise the different sessions will assume different default values. If a replica is unable to know that other replicas will set the same default value then not using the function will ensure that the correct value is propagated.
| distance | the value that is the default value. The default is kReplicaObject_InfiniteDistance to match the parameter to SetPropagateToSessionDistance() |
| float GetPropagateToSessionDistance | ( | void | ) | const |
Allows the distance value to be read for this ReplicaObject set by SetPropagateToSessionDistance(). This function can be used on a master or replica ReplicaObject
| void SetPropagateToSessionDistanceRecalculationDelay | ( | const float | delay = 0.1f |
) |
This function sets the minimum recalculation delay that this object will use when it calculates distance based propagation.
If the object owner changes the delay time will revert back to the default value. The object will, if enabled, automatically recalculate the list of sessions to propagate to.
| delay | The recalculation delay in seconds, the default is 0.1 seconds. Values less than 0 are ignored. |
| static ReplicaObject* AllocateForReplicaNet | ( | void | ) | [static] |
This static function can be defined in a derived class to enable the allocation of a ReplicaObjet derived class to be implemented. This allocation must be implemented in such a way that the ReplicaObject constructor is called when this function is called. The default implementation is to use new.
| static void DeleteForReplicaNet | ( | ReplicaObject * | object | ) | [static] |
This static function can be defined in a derived class to enable the de-allocation of a ReplicaObjet derived class to be implemented. This allocation must be implemented in such a way that the ReplicaObject destructor is called when this function is called. The default implementation is to use delete.
| object | A pointer to an object that is derived from ReplicaObject. |
| void SetSessionPropagationFilter | ( | const bool | enable = false |
) |
This allows the session propagation filter mechanism to be enabled or disabled for a master ReplicaObject. When enabled the ReplicaObject will ignore all joining sessions and the user application is then responsible for supplying the session IDs that this object will propagate to. This mechanism effectively turns off all ReplicaNet object propagation functions for this object, including the distance based propagation. This mechanism can only be enabled or disabled before the object is published to ReplicaNet. If the object is set to reflect updates, using SetMessageReflectionID(), then the reflect session ID must also be added to the session propagation list. If the ReplicaObject owner changes, notified through the OwnerChange() callback, then the previous list of propagated sessions is discarded. SetSessionPropagationFilter() must be called to enable this functionality on the new master and the sessions to propagate to must again be added using SessionPropagationAddSession().
| enable | When true enables this mechanism. The default value is false and this mechanism is disabled. |
| bool GetSessionPropagationFilter | ( | void | ) | const |
Allows the status of the session propagation filter mechanism to be read.
| Returns | true if the mechanism is enabled |
| void GetSessionPropagationSet | ( | std::set< int > & | theSet | ) |
Gets the current propagation set.
| theSet | The current set is stored in this reference. |
| bool SessionPropagationAddSession | ( | const int | sessionID | ) |
When the session propagation filter mechanism is enabled this function tells this ReplicaObject to propagate to the supplied session ID. This function will only operate correctly when the session propagation filter mechanism is enabled. The session ID must be a valid ID known to the network session. The session ID from the callback ReplicaNet::JoinerSessionIDPre() can be safely added to objects. If the session ID has already been added to the list (without a corresponding remove) then ReplicaNet will ignore extra additions.
| sessionID | The session ID to propagate to. |
| bool SessionPropagationRemoveSession | ( | const int | sessionID | ) |
When the session propagation filter mechanism is enabled this function tells this ReplicaObject to finish propagating to the supplied session ID. This function will only operate correctly when the session propagation filter mechanism is enabled. The session ID must be a valid ID known to the network session. The session ID from the callback ReplicaNet::LeaverSessionIDPre() can be safely added to objects. If the session ID has already been removed from the list (without a corresponding add) then ReplicaNet will ignore extra remove requests.
| sessionID | The session ID to finish propagating to. |
| virtual void DataBlockPacketDataReceived | ( | const DataBlock * | datablock | ) | [virtual] |
This virtual callback is triggered by ReplicaNet every time an update packet for a DataBlock is received, but before the packet data is processed. See also FindDataBlock()
| datablock | The pointer to the DataBlock that is getting the update. |
| virtual void DataBlockPacketDataReceivedPost | ( | const DataBlock * | datablock | ) | [virtual] |
This virtual callback is triggered by ReplicaNet every time an update packet for a DataBlock is received, after the packet data is processed. See also FindDataBlock()
| datablock | The pointer to the DataBlock that has received the update. |
| virtual s_RO_RegistryBlock* GetRegistryBlock | ( | void | ) | const [pure virtual] |
A pure virtual access method to return the registry block associated with this ReplicaObject class type. This registry block is set when the ReplicaObject derived class is registered with ReplicaNet and the standard interface is implemented by the macro _RO_DO_STD_FRAMEWORK()
For example, to get the registered class name of an unknown "ReplicaObject *theObject" pointer, use the preprocessor to define REPLICANET_VISUALDEBUGGER and then use: theObject->GetRegistryBlock()->GetName().
| void DataSend | ( | const int | sessionid, | |
| const void * | data, | |||
| const int | length, | |||
| const PacketType | type = kPacket_Reliable, |
|||
| const unsigned int | band = 0 | |||
| ) |
Sends raw data from this session to any other session via it's ID or to all sessions by using kReplicaNetBroadcastID. If the node is in a pre-connect state and wants to send data to the master session then use kReplicaNetUnknownUniqueID as the session ID to send to.
| sessionid | the session id to send to or kReplicaNetBroadcastID | |
| data | the pointer to the data to send | |
| length | the length of the data to send. Data packets larger than 512 bytes may be fragmented and sent in separate chunks. | |
| type | The type of data packet to send | |
| band | The band to use for the underlying Transport when sending with the Reliable method. |
| virtual void CallBackDataReceive | ( | const int | fromsessionid, | |
| const void * | data, | |||
| const int | length, | |||
| const PacketType | type | |||
| ) | [virtual] |
Use this virtual callback to process raw data sent by DataSend(). Processing for this function may occur during the thread context of ReplicaNet so processing time used by this function should be kept to a minimum to avoid performance issues.
| fromsessionid | The session id that sent this data. | |
| data | The buffer for the data. | |
| length | The length of the data received. | |
| type | A pointer that can receive the packet type. This parameter can be null in which case the type is not filled in. The default value for this pointer is null. |
| int GetProcessingDataBlocksFromSessionID | ( | void | ) |
When processing DataBlock updates this will return the sessionID of the originator of those updates. Usually this will be the master sessionID of the object however when using a reflecting object or a master callback this function will return these sessionIDs. If no DataBlock is being processed then kReplicaNetUnknownUniqueID will be returned.
| virtual void CallbackObjectUnpublishPre | ( | void | ) | [virtual] |
Use this virtual callback to detect when this object unlinks itself from the ReplicaNet object lists due to ReplicaObject::Unpublish() being used. This is called just before the unlinking procedure. The sessionID and uniqueID values are still valid at this point.
| virtual void CallbackObjectUnpublishPost | ( | void | ) | [virtual] |
Use this virtual callback to detect when this object unlinks itself from the ReplicaNet object lists due to ReplicaObject::Unpublish() being used. This is called just after the unlinking procedure. The old sessionID and uniqueID values are not valid at this point however the object can be published again if required and it will behave as a new master object from this node.
| bool GetNewSessionIDAndUniqueID | ( | void | ) |
Care must be taken when using this function as it forces a new sessionId and uniqueID to be fetched from ReplicaNet.
| void DelayedDelete | ( | const float | delaySeconds = 0.0f |
) |
This will flag this ReplicaObject for a delete by ReplicaNet when delay amount of time elapses, the default is as soon as possible, but will delay the delete until any object DataBlock update finishes. This is especially useful during a network function call since objects must not be deleted during these function calls.
| delaySeconds | The amount of time to wait for the delete. The default is 0.0 seconds, meaning the delete will happen as soon as possible. |
| void DelayedDeleteCancel | ( | void | ) |
Cancels any pending delayed delete set by DelayDelete().
| bool GetDelayedDelete | ( | void | ) |
Returns true if a delay delete is pending.
| bool GetDelayedDelete | ( | float & | delaySeconds | ) |
Returns true if a delay delete is pending. The time is also returned in delaySeconds. If there is no delayed delete then delaySeconds will not be changed.
| void UpdateSendDormant | ( | const bool | dormant = false |
) |
| bool GetUpdateSendDormant | ( | void | ) | const |
Returns the dormant state of this object set by UpdateSendDormant() or by UpdateSendDormantDelay().
| void UpdateSendDormantDelay | ( | const bool | dormant = false, |
|
| const float | delaySeconds = 0.0f | |||
| ) |
Allows the dormant state of this object to be set when delaySeconds has elapsed. Dormant objects use less processor time because DataBlocks are not checked. If true then this object will not send any DataBlock updates. The default value for delaySeconds is 0.0f seconds and with this value this function is exactly the same operation as UpdateSendDormant(). When delaySeconds has elapsed then UpdateSendDormant() will automatically be called with the configured dormant state.
| void UpdateSendDormantDelayCancel | ( | void | ) |
Cancels any request configured by UpdateSendDormantDelay()
| bool GetUpdateSendDormantDelay | ( | bool & | dormant, | |
| float & | delaySeconds | |||
| ) | const |
Returns the configuration of this object set by UpdateSendDormantDelay().
| virtual void UpdateSendDormantDelayStateChange | ( | const bool | dormant | ) | [virtual] |
When the UpdateSendDormantDelay() delaySeconds has elapsed this callback will be called with the new state in dormant. The current dormant state of the object can be read by using GetUpdateSendDormant().
| void SetBand | ( | const unsigned int | band = 0 |
) |
Sets the band used by the underlying Transport when using the Reliable method to send this ReplicaObject update. The default value is 0 which is the same band as the internal session messages.
| unsigned int GetBand | ( | void | ) | const |
This function returns the value set by SetBand()
| virtual void RegisterDataBlock | ( | DataBlock * | block | ) | [protected, virtual] |
Registers a datablock from the derived class to this class. This calls DataBlock::BindReplicaNet(ReplicaObject::GetBoundReplicaNet()), DataBlock::BindReplicaObject(ReplicaObject::this) and DataBlock::SetID(theNextInternalID)