ReplicaNet: ReplicaNet Index Page

ReplicaNet Index Page

1

Introduction

RNReplicaNet::ReplicaNet is a management class that enables different RNReplicaNet::ReplicaObject derived C++ classes to be created, destroyed and updated across a network of computers without having to worry about specific network programing knowledge.
To enable integration between the ReplicaNet system and the user classes a tool is used to create extra class definitions to be used in the project.
ReplicaNet uses an XPSession as the base network layer and expands upon it.

Using ReplicaNet

Include files are in the Includes directory. Use "RNReplicaNet/Inc/ReplicaNet.h" to access all of the C++ interface to the RNReplicaNet::ReplicaNet class.
RNReplicaNet::ReplicaNet is primarily a multi-threaded library as the session framework uses threads to reduce CPU load. Single-threading is supported by means of using a RNReplicaNet::ReplicaNet::Poll() call to ensure data is processed regularly.
To allow ReplicaNet to include debugging information, that can be used with the ReplicaNet Visual Debugger, use the preprocessor to define REPLICANET_VISUALDEBUGGER , however please note including this define adds extra debugging information as plain text that may not be wanted in final publicly released versions of applications.

Using ReplicaNet

Libraries for static linking are called:
RNReplicaNetDM and RNReplicaNetRM for debug and release multi-thread applications.
RNReplicaNetDS and RNReplicaNetRS for debug and release single-thread applications.
RNReplicaNetDMDLL and RNReplicaNetRMDLL for debug and release multi-thread DLL applications such as MFC types of project.

The following library files can be used to force the module to use DLL files to link at runtime.
DLLRNReplicaNetDM and DLLRNReplicaNetRM for debug and release multi-thread applications.
DLLRNReplicaNetDS and DLLRNReplicaNetRS for debug and release single-thread applications.
DLLRNReplicaNetDMDLL and DLLRNReplicaNetRMDLL for debug and release multi-thread DLL applications such as MFC types of project.

The libraries that start with "DLL" will force the library DLL to be loaded at run time. When using the DLL libraries you must define DOREPNETEXPORTAPI in the preprocessor. This ensures importing of the correct dll functions. It also automatically does #include "RNPlatform/Inc/MemoryTracking.h" The memory tracking header is needed to ensure that the dll calling method accounts for memory properly. The automatic inclusion of the header during DLL builds can be turned off by defining REPLICANET_NOAUTOMATICINCLUDEMEMORYTRACKING For non-dll builds the memory tracking header is not included. Specifically for ReplicaNet and DLL builds, "REPLICANET_DLLPREREGISTER()" must used called before the ReplicaNet class is allocated. Calling this is guaranteed to not cause any memory allocation. This ties the object classes to the DLL. "REPLICANET_DLLPREREGISTER()" can also be called in a non-DLL build without any adverse side effects.
The memory tracking header ("RNPlatform/Inc/MemoryTracking.h") can be auto included by defining REPLICANET_ALWAYSDOMEMORYTRACKING for non-dll based builds.
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: File Index

ReplicaNet File List

Here is a list of all documented files with brief descriptions:
DataBlock.h [code]
DataBlock_Function.h [code]
DataBlock_NData.h [code]
DataBlock_Predict_Float.h [code]
Define_RO.h [code]
ReplicaNet.h [code]
ReplicaObject.h [code]
RO_RegistryBlock.h [code]
ROConstants.h [code]
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
RNReplicaNet::DataBlock
RNReplicaNet::DataBlock_Function
RNReplicaNet::DataBlock_NData
RNReplicaNet::DataBlock_Predict_Float
RNReplicaNet::DataBlockReason
RNReplicaNet::ReplicaNet
RNReplicaNet::ReplicaNetDLLRegister
RNReplicaNet::ReplicaObject
RNReplicaNet::s_RO_RegistryBlock
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::DataBlock Class Reference

RNReplicaNet::DataBlock

RNReplicaNet::DataBlock Class Reference

#include <DataBlock.h>

Inheritance diagram for RNReplicaNet::DataBlock:

[legend]
Collaboration diagram for RNReplicaNet::DataBlock:

[legend]
List of all members.

Public Types

enum | ContinuityBreakTypes { kStop = 1, kSuddenChange = 2, kTeleport = 4 }

Public Member Functions

DataBlock ()
virtual | ~DataBlock ()
virtual void | Poll (DataBlockReason *reason=0)
virtual void | ParseMessage (MessageHelper *message)
void | SetVariableName (const char *name=0)
void | BindReplicaNet (ReplicaNet *current)
void | BindReplicaObject (ReplicaObject *object)
void | SetReliableFlag (bool reliable=false)
bool | GetReliableFlag (void)
void | SetCertainFlag (bool certain=false)
bool | GetCertainFlag (void)
void | SetAutomaticUpdatesFlag (bool automatic=true)
bool | GetAutomaticUpdatesFlag (void)
virtual void | GiveDeltaHint (void *pdata, int dataLen)
void | GiveDeltaHint (float delta)
virtual void | ContinuityBreak (unsigned char breakTypes)
virtual bool | IsAttached (void *data)
virtual bool | IsAllocated (void) const
void | SetIsAllocated (const bool isAllocated=true)
void | SetUpdateDelayMinimum (const float delay=0.0f)
float | GetUpdateDelayMinimum (void) const
void | SetForceSendMaximumUpdates (const int updates=0)
int | GetForceSendMaximumUpdates (void) const
void | SetForceSendTimeDelay (const float delay=0.0f)
float | GetForceSendTimeDelay (void) const

Protected Member Functions

void | SetID (int id)
const char * | GetROName (ReplicaObject *from=0)
void | EmitBaseDebugInfo (const char *name, const char *className, DataBlockReason *reason)
void | EmitBaseDebugInfoUpdates (const char *name, const char *className, DataBlockReason *reason)
std::string | GetVariableName (void)

Protected Attributes

short | mID
ReplicaNet * | mBoundReplicaNet
ReplicaObject * | mBoundObject
bool | mReliable
bool | mCertain
bool | mAutomaticUpdates
bool | mIsAllocated
bool | mDebugOn
char * | mDebugText
float | mUpdateDelayMinimum
int | mForceSendMaximumUpdates
float | mForceSendTimeDelay
char * | mVariableName

Friends

class | ReplicaObject

Detailed Description

A ReplicaObject derived class can have any number of variables that need to be shared to the corresponding replicas.
A data block is a class that monitors for a change of a specific variable in a master object and if needed creates a data packet that is sent around the session to other replicas.
It is possible for a DataBlock to receive kDataBlockReason_CalculateMasterPoll and kDataBlockReason_ReplicaPrepAfterTakeover, thus allowing a DataBlock to be a master and a replica at the same time and this can allow a DataBlock to reflect propagated values. Each new data type that can get shared across a network creates a new class that inherits from this one

Member Enumeration Documentation

enum RNReplicaNet::DataBlock::ContinuityBreakTypes

Enums for the continuity break function

Enumeration values:
kStop | Indicates the data set value has stopped changing for the time being
kSuddenChange | Indicates a sudden change in direction or movement
kTeleport | Indicates the value has a large dislocation i.e. An object has teleported

Constructor & Destructor Documentation

RNReplicaNet::DataBlock::DataBlock ( )

The ctor performs some basic initialisation

virtual RNReplicaNet::DataBlock::~DataBlock ( ) [virtual]

The dtor makes sure everything is tidy

Member Function Documentation

void RNReplicaNet::DataBlock::BindReplicaNet ( ReplicaNet * current )

Bind this data block with the ReplicaNet pointer. This is called from ReplicaObject::RegisterDataBlock()

Parameters:
current the ReplicaNet pointer

void RNReplicaNet::DataBlock::BindReplicaObject ( ReplicaObject * object )

Bind this data block with the ReplicaObject pointer. This is called from ReplicaObject::RegisterDataBlock()

Parameters:
current the ReplicaObject pointer

virtual void RNReplicaNet::DataBlock::ContinuityBreak ( unsigned char breakTypes ) [virtual]

This is used to set a continuity break for the data set and provides useful information to the extrapolation algorithm

Parameters:
breakTypes The break types to use for this break. For example : DataBlock::ContinuityBreakTypes::kSuddenChange | DataBlock::ContinuityBreakTypes::kTeleport

Reimplemented in RNReplicaNet::DataBlock_Predict_Float.

bool RNReplicaNet::DataBlock::GetAutomaticUpdatesFlag ( void )

Gets the automatic update flag for a particular data set

Returns:
if this data block is meant to be automatically updated true is returned

bool RNReplicaNet::DataBlock::GetCertainFlag ( void )

Gets the reliable flag for a particular data set

Returns:
if this data block is meant to be reliable true is returned

int RNReplicaNet::DataBlock::GetForceSendMaximumUpdates ( void ) const

This function returns the value set by SetUpdateDelayMaximum()

Returns:
The value.

float RNReplicaNet::DataBlock::GetForceSendTimeDelay ( void ) const

This function returns the value set by SetUpdateDelayMaximum()

Returns:
The value.

bool RNReplicaNet::DataBlock::GetReliableFlag ( void )

Gets the reliable flag for a particular data set

Returns:
if this data block is meant to be reliable true is returned

float RNReplicaNet::DataBlock::GetUpdateDelayMinimum ( void ) const

This function returns the value set by SetUpdateDelayMinimum()

Returns:
The value.

void RNReplicaNet::DataBlock::GiveDeltaHint ( float delta ) [inline]

This is a feedback function that enables an application to give a delta hint to a DataBlock. This float type call maps to the opaque data type call

Parameters:
This delta hint is a float type

Reimplemented in RNReplicaNet::DataBlock_Predict_Float.

virtual void RNReplicaNet::DataBlock::GiveDeltaHint | ( | void * | pdata,
 |  | int | dataLen
 | ) | [virtual]

This is a feedback function that enables an application to give a delta hint to a DataBlock

Parameters:
pdata | the pointer to the data type to give a hint for
dataLem | the length of the data type

Reimplemented in RNReplicaNet::DataBlock_Predict_Float.

virtual bool RNReplicaNet::DataBlock::IsAllocated ( void ) const [virtual]

This virtual function allows the DataBlock to say how is was allocated.

Returns:
Returns true if the DataBlock was allocated using 'new' as a pointer returned.

virtual bool RNReplicaNet::DataBlock::IsAttached ( void * data ) [virtual]

Given a data pointer this function identifies if this data block is attached to the pointer.

Returns:
returns true if the data pointer is attached to this data block.

Reimplemented in RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock_NData, and RNReplicaNet::DataBlock_Predict_Float.

virtual void RNReplicaNet::DataBlock::ParseMessage ( MessageHelper * message ) [virtual]

This parses a message for the derived class of this data block

Parameters:
message The current message buffer that contains the packet data

Reimplemented in RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock_NData, and RNReplicaNet::DataBlock_Predict_Float.

virtual void RNReplicaNet::DataBlock::Poll ( DataBlockReason * reason = 0 ) [virtual]

A poll function that is called by ReplicaNet to check for updates to this particular data block. If this virtual method is implemented by a derived class this base class method should be called before a data packet is created.

Parameters:
reason the reason code that is passed in to this class to enable a response to be calculated

Reimplemented in RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock_NData, and RNReplicaNet::DataBlock_Predict_Float.

void RNReplicaNet::DataBlock::SetAutomaticUpdatesFlag ( bool automatic = true )

Sets the automatic update flag for a particular data set. By default a datablock will calculate the best time to create an update for a particular set of data. If the automatic updates are switched off then the datablock relies on hints from the user to calculate updates.

Parameters:
automatic set to true if this data block is meant to be automatically updated. The default is true

void RNReplicaNet::DataBlock::SetCertainFlag ( bool certain = false )

Sets the certain flag for a particular data set

Parameters:
certain set to true if this data block is meant to be certain and the reliable update is set to be false. The default is false

void RNReplicaNet::DataBlock::SetForceSendMaximumUpdates ( const int updates = 0 )

This sets the maximum number of consecutive force updates that can be sent from this DataBlock to each ReplicaObject. Forced updates are sent for this DataBlock to a ReplicaObject if the time since the last update, either due to the update filter policy or due to a forced update, is greater than the time set by SetForceSendTimeDelay(). Usually the best possible approximation of the DataBlock change calculated at the time is used. If a normal DataBlock update is sent, in other words an update falls within the DataBlock update filter policy, then the trigger for forced updates is set allowing consecutive forced updates to be started. This feature is useful for unreliable updates where DataBlocks that do not change often usually causing fewer DataBlock updates can be refreshed or force updated. It is a good idea, but not required, to set SetForceSendTimeDelay() before setting this value to be anything greater than 0 because the default value of 0.0f for SetForceSendTimeDelay() could cause many quick consecutive updates to be sent. This can be changed by the user at any time. The default value is 0 which disables this mechanism. The actual mechanism is implemented by the derived DataBlock. For user extended DataBlocks this mechanism can be ignored if the DataBlock filter policy method does not require this functionality.

void RNReplicaNet::DataBlock::SetForceSendTimeDelay ( const float delay = 0.0f )

This sets a time delay from the previous DataBlock update to a ReplicaObject before another forced send update is required. Setting this to be 0.2f causes a forced send update to be sent if the time since the last DataBlock update is more than 0.2f seconds. Therefore if SetForceSendTimeDelay(0.3f) and SetForceSendMaximumUpdates(3) is used, then a DataBlock that stops changing will get 3 extra updates with a delay of 0.3f of a second between each update. This setting for forced updates overrides the SetUpdateDelayMaximum() setting. This can be changed by the user at any time. The default value is 0.0f which then causes delays to be sent every internal ReplicaNet poll as required by SetMaximumForceSendUpdates() The actual mechanism is implemented by the derived DataBlock. For user extended DataBlocks this mechanism can be ignored if the DataBlock filter policy method does not require this functionality.

void RNReplicaNet::DataBlock::SetID ( int id ) [protected]

This sets the ID of the data block when it is used in a ReplicaObject. This function is called from ReplicaObject::RegisterDataBlock()

void RNReplicaNet::DataBlock::SetIsAllocated ( const bool isAllocated = true )

Defines how the DataBlock was allocated.

Parameters:
isAllocated Set this to be true is the DataBlock was allocated by using 'new' and a pointer returned. This is the default value.

void RNReplicaNet::DataBlock::SetReliableFlag ( bool reliable = false )

Sets the reliable flag for a particular data set

Parameters:
reliable set to true if this data block is meant to be reliable and the certain update is set to be false. The default is false

void RNReplicaNet::DataBlock::SetUpdateDelayMinimum ( const float delay = 0.0f )

This sets the minimum possible delay between each update, due to a DataBlock filter condition being met, for this datablock to each ReplicaObject. This allows the bandwidth for this DataBlock to be fine tuned. A value of 1.0f will mean a maximum of 1 update per second to each ReplicaObject. A value of 0.2f will mean a maximum possible 5 updates due to filter conditions per second, one every 0.2 seconds, to each ReplicaObject. This setting is separate from SetForceSendTimeDelay() This can be changed by the user at any time. The default value is 0.0f which disables this mechanism. The actual mechanism is implemented by the derived DataBlock. For user extended DataBlocks this mechanism can be ignored if the DataBlock filter policy method does not require this functionality.

Parameters:
delay The minimum delay in seconds.

void RNReplicaNet::DataBlock::SetVariableName ( const char * name = 0 )

Sets the name of the variable attached to this DataBlock which is then used to output extended debugging information using the registered DebugHandler if available. The default value for the variable name is null. This function is used by ReplicaNet and the standard DataBlocks added to objects using the ROL Language if the preprocessor define REPLICANET_VISUALDEBUGGER is used. For user allocated DataBlocks this function can be used to set extra debugging information, such as the variable name, useful to the author. Each DataBlock implementation can choose to not output debug information if there is no name set. The standard DataBlocks included with ReplicaNet output the DataBlock class name with a unique hex number identifier prefixed with "<Unknown>" if the variable name is null.

Parameters:
name The name of the variable.

The documentation for this class was generated from the following file:
  • DataBlock.h
Generated on Sun Oct 30 01:11:56 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::DataBlock_Function Class Reference

RNReplicaNet::DataBlock_Function

RNReplicaNet::DataBlock_Function Class Reference

#include <DataBlock_Function.h>

Inheritance diagram for RNReplicaNet::DataBlock_Function:

[legend]
Collaboration diagram for RNReplicaNet::DataBlock_Function:

[legend]
List of all members.

Public Member Functions

DataBlock_Function ()
virtual | ~DataBlock_Function ()
virtual void | Poll (DataBlockReason *reason)
virtual void | ParseMessage (MessageHelper *message)
void | RegisterInClassPointer (void *classp, void *funcp)
void | AddFunctionStateChange (void *data, int len, const char *debug=0)
bool | IsAttached (void *data)

Static Public Member Functions

static DataBlock_Function * | Register (void *classp, void *funcp)
static void | SetSessionIDFilter (const int numSessionIDs=0, const int *sessionIDs=0)

Detailed Description

This DataBlock derived class enables class member functions to be called on replicas of an object.
This DataBlock does not do any latency compensation or prediction.
This DataBlock does not use the rules set by SetUpdateDelayMinimum() and SetForceSendMaximumUpdates() because the frequency of calling member functions and hence the frequency of DataBlock updates is defined by the application.
For security reasons only the master can send function calls to other replicas. A replica does not send any function updates to other replicas directly and will only send to the master. Therefore many of the macros, like ALL_REPLICAS_FUNCTION_CALL(), will operate differently depending on if the object is a master or a replica. You can use these macros to call network class member functions:
GLOBAL_FUNCTION_CALL()
Example: GLOBAL_FUNCTION_CALL(ASampleMemberFunction(foo,bar,wibble));
From a master this calls the function on the master and all replicas.
From a replica this only calls the function on the current replica and the master.

ALL_REPLICAS_FUNCTION_CALL()
Example: ALL_REPLICAS_FUNCTION_CALL(ASampleMemberFunction(foo));
From a master this calls the function on the all replicas.
From a replica this only calls the function on the master.

MASTER_FUNCTION_CALL()
Example: MASTER_FUNCTION_CALL(ASampleMemberFunction(bar,wibble));
From a master this calls the function on the all replicas.
From a replica this only calls the function on the master.
ALL_REPLICAS_FUNCTION_CALL() and MASTER_FUNCTION_CALL() have identical implementation, the naming is different to improve code readability.

NOMINATED_REPLICAS_FUNCTION_CALL()
Example: NOMINATED_REPLICAS_FUNCTION_CALL(numSessionIDs,sessionIDs,APublicFunction(random_int,random_float));
From a master this uses DataBlock_Function::SetSessionIDFilter() to propagate function calls to selected session IDs. From a replica this calls the function on the master regardless of the session ID list.

Constructor & Destructor Documentation

RNReplicaNet::DataBlock_Function::DataBlock_Function ( )

The ctor performs some basic initialisation

virtual RNReplicaNet::DataBlock_Function::~DataBlock_Function ( ) [virtual]

The dtor makes sure everything is tidy

Member Function Documentation

bool RNReplicaNet::DataBlock_Function::IsAttached ( void * data ) [virtual]

Given a data pointer this function identifies if this data block is attached to the pointer.

Returns:
returns true if the data pointer is attached to this data block.

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Function::ParseMessage ( MessageHelper * message ) [virtual]

This parses a message for the derived class of this data block

Parameters:
message The current message buffer that contains the packet data

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Function::Poll ( DataBlockReason * reason ) [virtual]

A poll function that is called by ReplicaNet to check for updates to this particular data block. If this virtual method is implemented by a derived class this base class method should be called before a data packet is created.

Parameters:
reason the reason code that is passed in to this class to enable a response to be calculated

Reimplemented from RNReplicaNet::DataBlock.

static DataBlock_Function* RNReplicaNet::DataBlock_Function::Register | ( | void * | classp,
 |  | void * | funcp
 | ) | [static]

This registers the memory area with this data block type and returns a new pointer

Parameters:
classp | is the pointer to this class that is passed through the message pipeline
funcp | the actual function pointer to call that cracks the message
Returns:
Returns a pointer that can be used to attach to a ReplicaObject

void RNReplicaNet::DataBlock_Function::RegisterInClassPointer | ( | void * | classp,
 |  | void * | funcp
 | ) | [inline]

This registers the memory area with this data block type. This is used when the memory is in datablocks that are allocated as part of a bigger class.

Parameters:
classp | is the pointer to this class that is passed through the message pipeline
funcp | the actual function pointer to call that cracks the message

static void RNReplicaNet::DataBlock_Function::SetSessionIDFilter | ( | const int | numSessionIDs = 0,
 |  | const int * | sessionIDs = 0
 | ) | [static]

This configures the next networked function call from a master object to send the function call to the nominated sessionIDs. After the function call is completed all subsequent network function calls are sent without this filter unless this function is used. The NOMINATED_REPLICAS_FUNCTION_CALL() macro also uses this function.
Care must be taken when using this static function that multi-threaded ReplicaObject derived classes do not interrupt calls to this function and the subsequent network function call. The array pointed to by this function must persist until the subsequent network function call.

Parameters:
numSessionIDs | The number of session IDs in the array.
sessionIDs | An array of session IDs that will receive the next network function call.

The documentation for this class was generated from the following file:
  • DataBlock_Function.h
Generated on Sun Oct 30 01:11:57 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::DataBlock_NData Class Reference

RNReplicaNet::DataBlock_NData

RNReplicaNet::DataBlock_NData Class Reference

#include <DataBlock_NData.h>

Inheritance diagram for RNReplicaNet::DataBlock_NData:

[legend]
Collaboration diagram for RNReplicaNet::DataBlock_NData:

[legend]
List of all members.

Public Member Functions

DataBlock_NData ()
virtual | ~DataBlock_NData ()
virtual void | Poll (DataBlockReason *reason)
virtual void | ParseMessage (MessageHelper *message)
void | RegisterInClassPointer (void *const data, const int size)
void | SetDefaultData (const void *data)
bool | IsAttached (void *data)
void | SetEndianTest (const bool test=true)
bool | GetEndianTest (void) const

Static Public Member Functions

static DataBlock_NData * | Register (void *const data, const int size)

Classes

struct | SessionBlock_NData

Detailed Description

This DataBlock derived class scans the registered area for changes and if needed creates a packet detailing those changes
This DataBlock does not do any lag compensation or prediction. It just informs each replica of a change when one is made. By default the DataBlock will preserve the endian format of the data. To disable the endian check, an example would be for string data, then SetEndianTest(false) or the ROL command DisableEndianTest();

Constructor & Destructor Documentation

RNReplicaNet::DataBlock_NData::DataBlock_NData ( )

The ctor performs some basic initialisation

virtual RNReplicaNet::DataBlock_NData::~DataBlock_NData ( ) [virtual]

The dtor makes sure everything is tidy

Member Function Documentation

bool RNReplicaNet::DataBlock_NData::IsAttached ( void * data ) [virtual]

Given a data pointer this function identifies if this data block is attached to the pointer.

Returns:
returns true if the data pointer is attached to this data block.

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_NData::ParseMessage ( MessageHelper * message ) [virtual]

This parses a message for the derived class of this data block

Parameters:
message The current message buffer that contains the packet data

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_NData::Poll ( DataBlockReason * reason ) [virtual]

A poll function that is called by ReplicaNet to check for updates to this particular data block. If this virtual method is implemented by a derived class this base class method should be called before a data packet is created.

Parameters:
reason the reason code that is passed in to this class to enable a response to be calculated

Reimplemented from RNReplicaNet::DataBlock.

static DataBlock_NData* RNReplicaNet::DataBlock_NData::Register | ( | void *const | data,
 |  | const int | size
 | ) | [static]

This registers the memory area with this data block type and returns a new pointer

Parameters:
data | the start of the memory to check
size | the size of the data block
Returns:
Returns a pointer that can be used to attach to a ReplicaObject

void RNReplicaNet::DataBlock_NData::RegisterInClassPointer | ( | void *const | data,
 |  | const int | size
 | ) | [inline]

This registers the memory area with this data block type. This is used when the memory is in datablocks that are allocated as part of a bigger class.

Parameters:
data | the start of the memory to check
size | the size of the data block

void RNReplicaNet::DataBlock_NData::SetDefaultData ( const void * data )

This allows a block of memory to be passed in that shows a default state of the data block. This default memory state is copied so it can be temporary. When a session joins or an object is created, the datablock states are serialised. By setting a default state the user can avoid the extra data being sent out for the datablock state.

Parameters:
data the pointer to the memory.

The documentation for this class was generated from the following file:
  • DataBlock_NData.h
Generated on Sun Oct 30 01:11:57 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::DataBlock_Predict_Float Class Reference

RNReplicaNet::DataBlock_Predict_Float

RNReplicaNet::DataBlock_Predict_Float Class Reference

#include <DataBlock_Predict_Float.h>

Inheritance diagram for RNReplicaNet::DataBlock_Predict_Float:

[legend]
Collaboration diagram for RNReplicaNet::DataBlock_Predict_Float:

[legend]
List of all members.

Public Member Functions

DataBlock_Predict_Float ()
virtual | ~DataBlock_Predict_Float ()
virtual void | Poll (DataBlockReason *reason)
virtual void | ParseMessage (MessageHelper *message)
virtual void | GiveDeltaHint (void *pdata, int dataLen)
virtual void | GiveDeltaHint (const float delta)
virtual void | ContinuityBreak (unsigned char breakTypes)
bool | IsAttached (void *data)
void | RegisterInClassPointer (float *data)
void | SetMinError (float minerror=0.1f)
void | SetMaxError (float maxerror=1.0f)
void | SetMinDistance (float distance=0.1f)
void | SetMaxDistance (float distance=1.0f)
void | SetInterpolationFilter (float interpolation=0.1f)
void | SetQuadratic (void)
void | SetLinear (void)

Static Public Member Functions

static DataBlock_Predict_Float * | Register (float *data)

Classes

struct | MasterData
struct | ReplicaData
struct | SessionBlock_Predict_Float

Detailed Description

This DataBlock derived class tries to perform data prediction on float variable types
This class operates on three levels.
1) It constantly checks the data value and notes down changes based on what it thinks are continuity changes using the extrapolation model for the master side.
2) Each {value,delta and time} update sent to a replica object is stored and using this information the extrapolation is checked against what the current value is doing. If the extrapolation is too far off based on the input tollerance values then the master copy of the extrapolation data is used to calculate a new more accurate prediction model.
3) The replica version of this class receives {value,delta and time} updates and extrapolates these.

Constructor & Destructor Documentation

RNReplicaNet::DataBlock_Predict_Float::DataBlock_Predict_Float ( )

The ctor performs some basic initialisation

virtual RNReplicaNet::DataBlock_Predict_Float::~DataBlock_Predict_Float ( ) [virtual]

The dtor makes sure everything is tidy

Member Function Documentation

virtual void RNReplicaNet::DataBlock_Predict_Float::ContinuityBreak ( unsigned char breakTypes ) [virtual]

This is used to set a continuity break for the data set and provides useful information to the extrapolation algorithm

Parameters:
breakTypes The break types to use for this break. For example : DataBlock::ContinuityBreakTypes::kSuddenChange | DataBlock::ContinuityBreakTypes::kTeleport

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Predict_Float::GiveDeltaHint ( const float delta ) [virtual]

This is a feedback function that enables an application to give a delta hint to a DataBlock. This float type call maps to the opaque data type call

Parameters:
This delta hint is a float type

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Predict_Float::GiveDeltaHint | ( | void * | pdata,
 |  | int | dataLen
 | ) | [virtual]

This is a feedback function that enables an application to give a delta hint to a DataBlock

Parameters:
pdata | the pointer to the data type to give a hint for
dataLem | the length of the data type

Reimplemented from RNReplicaNet::DataBlock.

bool RNReplicaNet::DataBlock_Predict_Float::IsAttached ( void * data ) [virtual]

Given a data pointer this function identifies if this data block is attached to the pointer.

Returns:
returns true if the data pointer is attached to this data block.

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Predict_Float::ParseMessage ( MessageHelper * message ) [virtual]

This parses a message for the derived class of this data block

Parameters:
message The current message buffer that contains the packet data

Reimplemented from RNReplicaNet::DataBlock.

virtual void RNReplicaNet::DataBlock_Predict_Float::Poll ( DataBlockReason * reason ) [virtual]

A poll function that is called by ReplicaNet to check for updates to this particular data block. If this virtual method is implemented by a derived class this base class method should be called before a data packet is created.

Parameters:
reason the reason code that is passed in to this class to enable a response to be calculated

Reimplemented from RNReplicaNet::DataBlock.

static DataBlock_Predict_Float* RNReplicaNet::DataBlock_Predict_Float::Register ( float * data ) [static]

This registers the memory area with this data block type and returns a new pointer

Parameters:
data the start of the memory to check
Returns:
Returns a pointer that can be used to attach to a ReplicaObject

void RNReplicaNet::DataBlock_Predict_Float::RegisterInClassPointer ( float * data ) [inline]

This registers the memory area with this data block type. This is used when the memory is in datablocks that are allocated as part of a bigger class.

Parameters:
data the start of the memory to check

void RNReplicaNet::DataBlock_Predict_Float::SetInterpolationFilter ( float interpolation = 0.1f )

This sets the interpolation filter factor to use when extrapolating this variable type
0 < interpolation <= 1.0f
1.0f Is very hard interpolation and 0.1f is very soft. 0.1f Is the default.

Parameters:
interpolation the interpolation to use

void RNReplicaNet::DataBlock_Predict_Float::SetLinear ( void ) [inline]

For distance based interpolation this makes the calculation based on a linear formula. The default is linear.

void RNReplicaNet::DataBlock_Predict_Float::SetMaxDistance ( float distance = 1.0f )

Sets the maximum distance start point for the maximum error to take effect

Parameters:
the distance

void RNReplicaNet::DataBlock_Predict_Float::SetMaxError ( float maxerror = 1.0f )

This sets the maximum error that is tolerated for this variable type

Parameters:
maxerror the maximum error to tolerate

void RNReplicaNet::DataBlock_Predict_Float::SetMinDistance ( float distance = 0.1f )

Sets the minimum distance start point for the minimum error to take effect

Parameters:
the distance

void RNReplicaNet::DataBlock_Predict_Float::SetMinError ( float minerror = 0.1f )

This sets the minimum error that is tolerated for this variable type

Parameters:
minerror the minimum error to tolerate

void RNReplicaNet::DataBlock_Predict_Float::SetQuadratic ( void ) [inline]

For distance based interpolation this makes the calculation based on a quadratic formula. The default is linear.

The documentation for this class was generated from the following file:
  • DataBlock_Predict_Float.h
Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::DataBlockReason Struct Reference

RNReplicaNet::DataBlockReason

RNReplicaNet::DataBlockReason Struct Reference

#include <DataBlock.h>

Collaboration diagram for RNReplicaNet::DataBlockReason:

[legend]
List of all members.

Public Member Functions

DataBlockReason (int code=kDataBlockReason_NormalPoll, int session=-1, ReplicaObject *object=0)

Public Attributes

int | mReasonCode
int | mSessionReference
MessageHelper * | mMessageHelper
ReplicaObject * mObserver
float | mFloatValue
float | mFloatTime
float | mFloatLocalTime

Detailed Description

A parameter block that is used to pass state information to a DataBlock

Constructor & Destructor Documentation

RNReplicaNet::DataBlockReason::DataBlockReason | ( | int | code = kDataBlockReason_NormalPoll,
 |  | int | session = -1,
 |  | ReplicaObject * | object = 0
 | ) | [inline]

This structure ctor sets a reason code by default if none is passed in

Parameters:
code | The reason code to use,kDataBlockReason_NormalPoll by default
session | The session ID to set in the data block, -1 by default

Member Data Documentation

float RNReplicaNet::DataBlockReason::mFloatValue

A general purpose float value that is dependant on the reason code

MessageHelper* RNReplicaNet::DataBlockReason::mMessageHelper

The message helper for this data block

ReplicaObject* RNReplicaNet::DataBlockReason::mObserver

A reference to the observer object for this session reference

int RNReplicaNet::DataBlockReason::mReasonCode

The reason code

int RNReplicaNet::DataBlockReason::mSessionReference

The reference session ID

The documentation for this struct was generated from the following file:
  • DataBlock.h
Generated on Sun Oct 30 01:11:56 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::ReplicaNet Class Reference

RNReplicaNet::ReplicaNet

RNReplicaNet::ReplicaNet Class Reference

#include <ReplicaNet.h>

Collaboration diagram for RNReplicaNet::ReplicaNet:

[legend]
List of all members.

Public Types

enum Error {
kReplicaNet_EOK = 0, kReplicaNet_EERROR = -1, kReplicaNet_ETRANSPORT_CLOSED = -2, kReplicaNet_ETRANSPORT_ERROR = -3,
kReplicaNet_EEND_RECORDING = -4
}
enum | PacketType { kPacket_Unreliable = 0, kPacket_Reliable = 1, kPacket_Certain = 2 }
enum | OnError { kMigrateObjects = 0, kDeleteObjects, kLeaveObjects }

Public Member Functions

ReplicaNet ()
virtual | ~ReplicaNet ()
virtual void | PreRegisterReplicas (void)
int | GetSessionID (void)
void | AddObject (ReplicaObject *const object)
void | RemoveObject (ReplicaObject *const object)
int | GetGameChannel (void)
void | SetGameChannel (const int channel=TransportAnyGameChannel)
void | SessionCreate (const std::string name)
void | SessionCreate (const std::string name, const std::string protocols)
std::string | SessionExportURL (void)
void | SessionJoin (const std::string url)
void | SessionFind (void)
std::string | SessionEnumerateFound (void)
void | LockObjects (void)
void | UnLockObjects (void)
float | GetNetworkSendRate (void)
float | GetNetworkReceiveRate (void)
int | GetNetworkPacketsLost (void)
virtual float | GetTime (void)
virtual float | GetLocalTime (void)
void | SetObserver (ReplicaObject *const object=0)
ReplicaObject * | GetObserver (void)
void | Poll (void)
void | SetPollLayerBelow (bool enable=true)
bool | GetPollLayerBelow (void)
void | SetPollLayerBelowForXPSession (bool enable=true)
bool | GetPollLayerBelowForXPSession (void)
void | SetManualPoll (void)
void | SetAutomaticPoll (void)
void | SetManualPollXPSession (void)
void | SetAutomaticPollXPSession (void)
void | SetManualPollXPURL (void)
void | SetAutomaticPollXPURL (void)
void | GiveOwnership (ReplicaObject *const object, const int sessionID)
void | RequestOwnership (ReplicaObject *const object)
void | SetCanSpider (const bool canSpider=true)
bool | GetCanSpider (void)
float | GetLatencyToMasterSession (void)
void | SetLatencyRecalculationDelay (const float seconds=1.0f)
bool | IsStable (void)
bool | IsMaster (void)
void | SetCanBecomeMaster (const bool canBeMaster=true)
bool | GetCanBecomeMaster (void)
Error | GetStatus (void)
Error | GetSessionErrorReason (void)
void | SetOnSessionError (const OnError whatToDo=kMigrateObjects)
OnError | GetOnSessionErrorMigrateObjects (void)
void | SetCanAcceptObjects (bool accept=true)
bool | GetCanAcceptObjects (void)
void | SetEncryption (const bool enable=false)
bool | GetEncryption (void)
void | SetLoadBalancing (const bool enable=false)
bool | GetLoadBalancing (void)
void | SetMaximumLoad (float load=0.0f)
float | GetMaximumLoad (int sessionID=kReplicaNetUnknownUniqueID)
float | GetTotalLoad (int sessionID=kReplicaNetUnknownUniqueID)
void | ObjectListBeginIterate (void)
void | ObjectListFinishIterate (void)
ReplicaObject * | ObjectListIterate (void)
virtual void | JoinerSessionIDPre (const int sessionID)
virtual void | JoinerSessionIDPost (const int sessionID)
virtual void | LeaverSessionIDPre (const int sessionID)
virtual void | LeaverSessionIDPost (const int sessionID)
void | Disconnect (const int sessionID=kReplicaNetUnknownUniqueID)
bool | GetPreConnectStatus (void)
void | SetPreConnect (const bool enable=false)
bool | GetPreConnect (void)
void | PreConnectHasFinished (void)
void | SetDataRetention (const bool enable=false)
bool | GetDataRetention (void) const
void | DataSend (const int sessionid, const void *data, const int length, const PacketType type=kPacket_Reliable)
bool | DataReceive (int *const fromsessionid, void *const data, int *const length, PacketType *const type=0)
void | SetDataBlockUpdatePolicy (const bool automatic=true)
bool | GetDataBlockUpdatePolicy (void) const
void | ProcessDataBlockUpdate (void)
void | SetAutomaticPacketCompression (const bool enable=false)
bool | GetAutomaticPacketCompression (void)
void | GetCompressionStatistics (int *const before=0, int *const after=0, const bool reset=false)
void | GetMergedStatistics (int *const sent=0, int *const received=0, const bool reset=false)
int | GetMasterSessionID (void)
std::string | GetURLFromSessionID (const int sessionID)
void | SetClientOnly (const bool isClient=false)
bool | GetClientOnly (void)
bool | GetBandwidthFromSessionID (const int sessionID, Transport::Bandwidth *const bandwidth, int *const output, int *const input)
virtual ReplicaObject * | CallBackAllocate (const int classID, const int sessionID, const int uniqueID)
virtual ReplicaObject * | CallBackDelete (ReplicaObject *object)
bool | BeginSessionRecord (void)
void | StopSessionRecord (void)
virtual bool | CallbackSessionRecord (const void *data, const int length)
bool | GetSessionRecord (void) const
bool | BeginSessionPlayback (void)
void | StopSessionPlayback (void)
void | SetPlaybackSpeed (const float speed=1.0f)
bool | PlaybackAdvanceTo (const float time)
virtual bool | CallbackSessionPlayback (void *data, const int length)
bool | GetSessionPlayback (void) const
void | SetPlaybackAllowMasterReplicaObjects (const bool allow=false)
bool | GetPlaybackAllowMasterReplicaObjects (void)
void | SetAllowConnections (const bool allow=true)
bool | GetAllowConnections (void)
void | SetNodeBuffers (const bool enable=false)
bool | GetNodeBuffers (void)

Static Public Member Functions

static ReplicaNet * | GetCurrentReplicaNet (void)
static void | SetCurrentReplicaNet (ReplicaNet *const replicanet)

Friends

class | ReplicaObject
class | ReplicaNetPrivate
class | ReplicaNetDLLRegister

Detailed Description

The main class for ReplicaNet. This class handles everything to do with the management of all ReplicaObject types that are allocated to a network session.
ReplicaNet uses XPSession to manage a network session which includes session migration and client-server or peer-to-peer network topology.
Each instance of ReplicaNet can be configured depending on the intended use on a per-machine basis. As an example a Massively Multiplayer Online (MMO) server node could use:
SetLoadBalancing(true);		// This is optional and should only be used if you expect your server objects to be moved between other nodes that use this flag.
SetCanAcceptObjects(true);	// In the event of a server node failure this node can accept fault tolerant objects.
SetCanBecomeMaster(true);	// In the event of the master server node failure this node is capable of becoming the new master.
SetCanSpider(true);			// This node will advertise a connection that can be used to communicate directly to other nodes.
// Adding packet buffering using the TransportConfig class will reduce the number of packets sent over the wire.
TransportConfig::SetPacketBufferTime(1.0f / 50.0f);
TransportConfig::SetPacketBufferEnable(true);
// Using multi-threaded libraries does help performance for a server that is going to have a high load and automatically uses multiple CPU cores or Hyper-Threads if the hardware/OS support is available.
SetAutomaticPoll();			// Allow automatic polling of ReplicaNet.
SetAutomaticPollXPSession();// Allow automatic polling of XPSession.
SetAutomaticPollXPURL();	// Allow automatic polling of XPURL and Transports.
SetPollLayerBelow(false);	// Separates the ReplicaNet thread from the XPSession thread.
SetPollLayerBelowForXPSession(false);	// Separates the XPSession thread from the XPURL threads.
SetNodeBuffers(true);		// This uses extra memory for low-latency cross thread buffers to improve threading performance.
Spidering can also be set to be on for server nodes and this this helps to distribute network bandwidth.

For the clients:

SetLoadBalancing(false);
SetCanAcceptObjects(false);
SetCanBecomeMaster(false);
SetCanSpider(false);
SetClientOnly(true);		// This lowers bandwidth to this node and ensures only this node sends object updates to server nodes.
// Adding packet buffering using the TransportConfig class will reduce the number of packets sent over the wire.
TransportConfig::SetPacketBufferTime(1.0f / 50.0f);
TransportConfig::SetPacketBufferEnable(true);
Note that all the clients are not going to have peer connections to other clients. This is what you want for a MMO.

Or for a traditional peer-to-peer LAN/WAN type of game with host and object migration:

SetLoadBalancing(false);
SetCanAcceptObjects(true);
SetCanBecomeMaster(true);
SetCanSpider(true);
// Adding packet buffering using the TransportConfig class will reduce the number of packets sent over the wire.
TransportConfig::SetPacketBufferTime(1.0f / 50.0f);
TransportConfig::SetPacketBufferEnable(true);

These options are explained below in the documentation.

ReplicaNet can also send and receive raw data packets from the session for those applications that do not always want to use the data driven ReplicaObject methods of propagation.
The terms "Reliable", "Unreliable" and "Certain" are references to the three packet delivery types used by ReplicaNet, XPSession and XPURL Transport classes.
"Reliable" guarantees delivery of data in the same order it was sent.
"Certain" guarantees delivery of data but the order the data is received may not be preserved.
"Unreliable" does not guarantee delivery of data and the order of the data when it is received may not be preserved.
In general it is a good idea to not use too many "Reliable" updates because this method is quite expensive in terms of network and memory performance. If one packet gets lost it will delay the delivery of all other Reliable data until that packet is resent. The better choice would be to use "Certain" because this is less expensive in terms of memory and network performance. Also if one Certain packet is lost the delivery of other Certain packets is not delayed. Generally use Reliable for those events that absolutely must occur in the same order they were sent.
For most ReplicaObject updates use the Certain update type because generally it doesn't matter if an object is sometimes created in a different order to other objects. By default ReplicaObject uses the Reliable method to give the most reliable performance for easier first-pass testing of new networked software. This means network performance can be improved by using the ROL code:

object ObjectFoo
{
    networking
    {
    ... Some member variables ...
    }

    // Set Certain updates for this object.
    Certain();
}
The default for ReplicaObject class member variables (the DataBlock derived classes) is to use Unreliable packets. For example it generally doesn't matter if a position update packet is lost because another update will be transmitted at some point in the near future. Remember that each network shared ReplicaObject class member variable using a DataBlock can have a different packet update type.

Member Enumeration Documentation

enum RNReplicaNet::ReplicaNet::Error

Standard ReplicaNet errors

Enumeration values:
kReplicaNet_EOK | No error.
kReplicaNet_EERROR | A fatal error happened, like the connection broke and cannot be recovered.

Constructor & Destructor Documentation

RNReplicaNet::ReplicaNet::ReplicaNet ( )

The ctor performs some basic initialisation

virtual RNReplicaNet::ReplicaNet::~ReplicaNet ( ) [virtual]

The dtor makes sure everything is tidy

Member Function Documentation

void RNReplicaNet::ReplicaNet::AddObject ( ReplicaObject *const object )

Adds a ReplicaObject class to this ReplicaNet class. The object can be a master or replica. The object is added via this call when it is 1) Published or 2) Allocated as a replica.

Parameters:
object the object to add

bool RNReplicaNet::ReplicaNet::BeginSessionPlayback ( void )

Starts playback of a recorded network session. This function must be called before any ReplicaObject derived classes are published and before any network session is joined or created using this ReplicaNet instance. All of the session events are then simulated from the recording so a SessionJoin() or SessionCreate() is not required. CallbackSessionPlayback() will then be called when ReplicaNet needs to read in data. The user must implement reading this data.

Returns:
Success returns true, failure returns false.

bool RNReplicaNet::ReplicaNet::BeginSessionRecord ( void )

Starts recording the network session. When the ReplicaNet session is created or joined recording of the entire session will begin. This function may be called at any time, for example before the session is created, joined or during the period when the session is running. CallbackSessionRecord() will then be called when ReplicaNet needs to save data. The user must implement storing this data.

Returns:
Success returns true, failure returns false.

virtual ReplicaObject* RNReplicaNet::ReplicaNet::CallBackAllocate | ( | const int | classID,
 |  | const int | sessionID,
 |  | const int | uniqueID
 | ) | [virtual]

This virtual callback method may be implemented to override any ROL registered ReplicaObject factory allocate function. If a ReplicaObject is returned then ReplicaObject::GetClassID() must be implemented in the derived class in such a way as to return the correct classID.

Parameters:
classID | The classID of the object to create.
sessionID | The sessionID of the object to create.
uniqueID | The uniqueID of the object to create.
Returns:
The default implementation is to return null which allows ReplicaNet to use the ROL registered factory.

virtual ReplicaObject* RNReplicaNet::ReplicaNet::CallBackDelete ( ReplicaObject * object ) [virtual]

This virtual callback method may be implemented to override any ROL registered ReplicaObject factory delete function.

Parameters:
object The classID of the object to delete.
Returns:
The default implementation is to return the input object pointer, this allows ReplicaNet to use the ROL registered factory on the returned object pointer. For example it would also be possible to return a different object pointer to that passed into the callback. Returning null will signal to ReplicaNet that the object has been handled.

virtual bool RNReplicaNet::ReplicaNet::CallbackSessionPlayback | ( | void * | data,
 |  | const int | length
 | ) | [virtual]

This callback is called when ReplicaNet wants to get data from a session recording. The user must implement this function.

Parameters:
data | The destination data pointer for the data to be stored.
length | The requested amount of data in bytes that ReplicaNet wants. If the user cannot supply the exact length of data then false should be returned.
Returns:
Success returns true, failure returns false.

virtual bool RNReplicaNet::ReplicaNet::CallbackSessionRecord | ( | const void * | data,
 |  | const int | length
 | ) | [virtual]

This callback is called when ReplicaNet wants to save data from a recording session. The user must implement this function.

Parameters:
data | The data to store.
length | The size in bytes of the data to store.
Returns:
Success returns true, failure returns false.

bool RNReplicaNet::ReplicaNet::DataReceive | ( | int *const | fromsessionid,
 |  | void *const | data,
 |  | int *const | length,
 |  | PacketType *const | type = 0
 | ) |

Receives raw data and responds with what session sent this data. See also SetDataRetention().

Parameters:
fromsessionid | The session id that sent this data.
data | The buffer for the data.
length | The length of the data received, which should not be greater than 512 bytes.
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.
Returns:
True if data was received

void RNReplicaNet::ReplicaNet::DataSend | ( | const int | sessionid,
 |  | const void * | data,
 |  | const int | length,
 |  | const PacketType | type = kPacket_Reliable
 | ) |

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. See also SetDataRetention().

Parameters:
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, which should not be greater than 512 bytes.
type | The type of data packet to send

void RNReplicaNet::ReplicaNet::Disconnect ( const int sessionID = kReplicaNetUnknownUniqueID )

This forces a disconnect from the supplied sessionID or if the sessionID is not supplied then all session nodes are disconnected. The disconnect is immediate and initiates the fault tolerant mechanism for XPSession and ReplicaNet on other connected session nodes. This means if the session was a master session node then the other session nodes will try to find a new master if this mechanism is enabled. In the case of a ReplicaNet session node having objects, these objects will attempt to use the fault recovery and migration if it is enabled.

Parameters:
sessionID The sessionID to disconnect from. The default is to disconnect from all sessionIDs.

bool RNReplicaNet::ReplicaNet::GetAllowConnections ( void )

Returns the value configured by SetAllowConnections() the value.

bool RNReplicaNet::ReplicaNet::GetAutomaticPacketCompression ( void )

Gets the value configured by SetAutomaticPacketCompression()

Returns:
Returns true is the automatic packet compression is enabled.

bool RNReplicaNet::ReplicaNet::GetBandwidthFromSessionID | ( | const int | sessionID,
 |  | Transport::Bandwidth *const | bandwidth,
 |  | int *const | output,
 |  | int *const | input
 | ) |

Attempts to read the configured bandwidth for a route to a specific session ID. If the session ID is not directly connected to this node then this function will return false and the contents of the output and input pointers will be left unchanged. If this node can supply bandwidth information about a session ID then this function will return true and the bandwidth, output, input pointers will contain the values as used by SetBandwidthLimit(), SetMaximumOutputBandwidth() and SetMaximumInputBandwidth(). Note that output and input bandwidth will appear to be exchanged because the output of one end of transport connection is really the input of the other end of the connection.

Parameters:
sessionID | The session ID of the required node.
bandwidth | A pointer to accept the Transport::Bandwidth value.
output | A pointer to accept the output bandwidth value.
input | A pointer to accept the input bandwidth value.
Returns:
Success returns true, failure returns false.

bool RNReplicaNet::ReplicaNet::GetCanAcceptObjects ( void )

Allows the status of SetCanAcceptObjects() to be read

Returns:
the status of SetCanAcceptObjects()

bool RNReplicaNet::ReplicaNet::GetCanBecomeMaster ( void )

Allows the state to be read

Returns:
the status of the becoming a master state

bool RNReplicaNet::ReplicaNet::GetCanSpider ( void )

This allows the spidering state to be read /return the status of the spidering state

bool RNReplicaNet::ReplicaNet::GetClientOnly ( void )

Gets the client only configuration set by SetClientOnly().

Returns:
The configuration set by SetClientOnly().

void RNReplicaNet::ReplicaNet::GetCompressionStatistics | ( | int *const | before = 0,
 |  | int *const | after = 0,
 |  | const bool | reset = false
 | ) |

Gets the compression statistics totals for packets sent from this session node.

Parameters:
before | The total number of bytes before compression. This can be null.
after | The total number of bytes after compression. This can be null.
reset | If true, after returning the information to the caller both totals are reset back to zero. The default value is false.

static ReplicaNet* RNReplicaNet::ReplicaNet::GetCurrentReplicaNet ( void ) [static]

Static function to return the current ReplicaNet class that is being used

Returns:
returns the current ReplcaNet class in use

bool RNReplicaNet::ReplicaNet::GetDataBlockUpdatePolicy ( void ) const

Returns the state set by SetDataBlockUpdatePolicy().

Returns:
the state set by SetDataBlockUpdatePolicy().

bool RNReplicaNet::ReplicaNet::GetDataRetention ( void ) const

Allows the raw data retention policy to be read.

Returns:
The data retention policy.

bool RNReplicaNet::ReplicaNet::GetEncryption ( void )

Gets the status of the encryption flag for this session

Returns:
true if encryption is enabled

int RNReplicaNet::ReplicaNet::GetGameChannel ( void )

Gets the current channel number

Returns:
the channel number

float RNReplicaNet::ReplicaNet::GetLatencyToMasterSession ( void )

This allows the latency to the master session to be read. This is the time taken for a packet to reach the master session.

Returns:
the latency to the master session

bool RNReplicaNet::ReplicaNet::GetLoadBalancing ( void )

Gets the status of the load balancing flag

Returns:
true if load balancing is enabled

virtual float RNReplicaNet::ReplicaNet::GetLocalTime ( void ) [virtual]

Gets the current local time. This time is local to the session and is not synchronised to the session master clock. This function is virtual allowing the application to provide their own source for time. If providing a custom source of time and recording a session or playing a session recording then care must be taken to provide proper synchronisation of time.

Returns:
the float time 1.0 units == 1 second

int RNReplicaNet::ReplicaNet::GetMasterSessionID ( void )

Gets the master session unique ID. If the session is not connected then the return value is kReplicaNetUnknownUniqueID.

Returns:
the master session unique ID

float RNReplicaNet::ReplicaNet::GetMaximumLoad ( int sessionID = kReplicaNetUnknownUniqueID )

Gets the maximum load set by SetMaximumLoad() or the maximum load for a supplied session ID if one is supplied

Parameters:
sessionID the session ID to return the load value for
Returns:
the load setting

void RNReplicaNet::ReplicaNet::GetMergedStatistics | ( | int *const | sent = 0,
 |  | int *const | received = 0,
 |  | const bool | reset = false
 | ) |

Gets the merged packet statistics totals for connections managed by this session node.

Parameters:
sent | The total number of merged sent packets. This can be null.
received | The total number of merged sent packets. This can be null.
reset | If true, after returning the information to the caller both totals are reset back to zero. The default value is false.

int RNReplicaNet::ReplicaNet::GetNetworkPacketsLost ( void )

Gets the number of packets lost so far by the network layer.

Returns:
the number of packets lost.

float RNReplicaNet::ReplicaNet::GetNetworkReceiveRate ( void )

Gets the current network receive transfer rate in bytes per second

Returns:
bytes per second

float RNReplicaNet::ReplicaNet::GetNetworkSendRate ( void )

Gets the current network send transfer rate in bytes per second

Returns:
bytes per second

bool RNReplicaNet::ReplicaNet::GetNodeBuffers ( void )

Returns the value configured by SetNodeBuffers()

Returns:
The value.

ReplicaObject* RNReplicaNet::ReplicaNet::GetObserver ( void )

Gets the current observer ReplicaObject.

Returns:
returns the point to the object that is the observer, or NULL if there is no observer.

OnError RNReplicaNet::ReplicaNet::GetOnSessionErrorMigrateObjects ( void )

Allows the status of SetOnSessionErrorMigrateObjects() to be read

Returns:
the status of SetOnSessionErrorMigrateObjects()

bool RNReplicaNet::ReplicaNet::GetPlaybackAllowMasterReplicaObjects ( void )

Returns the value configured by SetPlaybackAllowMasterReplicaObjects().

bool RNReplicaNet::ReplicaNet::GetPollLayerBelow ( void )

Allows the state of SetPollLayerBelow() to be read. If the library is always single threading then this function will always return true.

Returns:
the state of SetPollLayerBelow()

bool RNReplicaNet::ReplicaNet::GetPollLayerBelowForXPSession ( void )

This calls XPSession::GetPollLayerBelow(). Please see the documentation in XPSession for more information.

Returns:
the state of XPSession::GetPollLayerBelow()

bool RNReplicaNet::ReplicaNet::GetPreConnect ( void )

Allows the status of the pre-connect mechanism for this session node.

Returns:
Returns true if the pre-connect mechanism is enabled.

bool RNReplicaNet::ReplicaNet::GetPreConnectStatus ( void )

Allows the status of the pre-connect mechanism to be tested.

Returns:
When GetPreConnectStatus() returns true after this session node starts a join then this session node is in a pre-connect state.

Error RNReplicaNet::ReplicaNet::GetSessionErrorReason ( void )

This can be used to read extended information when ReplicaNet encounters a session error.

Parameters:
error The error can be:
kReplicaNet_EOK for when there is no session error.
kReplicaNet_EERROR for undefined errors.
kReplicaNet_ETRANSPORT_CLOSED for when the session is disconnected or closed.
kReplicaNet_ETRANSPORT_ERROR when the session is abnormally terminated due to a transport timeout.

int RNReplicaNet::ReplicaNet::GetSessionID ( void )

Gets the session ID from the session associated with the ReplicaNet class

bool RNReplicaNet::ReplicaNet::GetSessionPlayback ( void ) const

Allows the playback status of the session to be read.

Returns:
If true this means BeginSessionPlayback() has been used and the session is currently playing back a recording.

bool RNReplicaNet::ReplicaNet::GetSessionRecord ( void ) const

Allows the recording status of the session to be read.

Returns:
If true this means BeginSessionRecord() has been used and the session is currently recording.

Error RNReplicaNet::ReplicaNet::GetStatus ( void )

Gets the session status.

Returns:
the session status will be either kReplicaNet_EOK or kReplicaNet_EERROR.

virtual float RNReplicaNet::ReplicaNet::GetTime ( void ) [virtual]

Gets the current system time of this ReplicaNet session synchronised with the time on the session master. This function is virtual allowing the application to provide their own source for time. If providing a custom source of time and recording a session or playing a session recording then care must be taken to provide proper synchronisation of time.

Returns:
the float time 1.0 units == 1 second

float RNReplicaNet::ReplicaNet::GetTotalLoad ( int sessionID = kReplicaNetUnknownUniqueID )

Gets the total load for a session ID. If the session ID is set to be kReplicaNetUnknownUniqueID then the load for the current session is returned

Parameters:
sessionID the session ID to return the load value for
Returns:
the total load for a session ID

std::string RNReplicaNet::ReplicaNet::GetURLFromSessionID ( const int sessionID )

Attempts to resolve the URL of the session unique ID from the point of view of this session node. If the session unique ID is not known to the session then the result is a null string. If the session unique ID is not directly connected to this node, for example the spider connection was broken, then this function is not guaranteed to produce a URL and can return a null string.

void RNReplicaNet::ReplicaNet::GiveOwnership | ( | ReplicaObject *const | object,
 |  | const int | sessionID
 | ) |

This tries to change the ownership on a ReplicaObject to another session. This only works if the ReplicaObject is a Master object and approves migration.

Parameters:
object | the pointer to the ReplicaObject
sessionID | the target sessionID for this object to migrate to

bool RNReplicaNet::ReplicaNet::IsMaster ( void )

Returns true if this ReplicaNet session is the master session

Returns:
true if this session is the master

bool RNReplicaNet::ReplicaNet::IsStable ( void )

This allows the user to check if the session is really stable.

Returns:
returns true if the session is stable

virtual void RNReplicaNet::ReplicaNet::JoinerSessionIDPost ( const int sessionID ) [virtual]

This virtual callback method allows a derived ReplicaNet class to be notified when a session ID joins the network session.
Sessions should not be disconnected by the user during this callback because all ReplicaObjects will see the sessionID join and then very quickly leave. To be able to disconnect potentially joining sessions use the SetPreConnect() mechanism. This method is called by ReplicaNet after all of the internal routines are run when a session joins.

virtual void RNReplicaNet::ReplicaNet::JoinerSessionIDPre ( const int sessionID ) [virtual]

This virtual callback method allows a derived ReplicaNet class to be notified when a session ID joins the network session.
Sessions should not be disconnected by the user during this callback because all ReplicaObjects will see the sessionID join and then very quickly leave. To be able to disconnect potentially joining sessions use the SetPreConnect() mechanism. This method is called by ReplicaNet before all of the internal routines are run when a session joins.

virtual void RNReplicaNet::ReplicaNet::LeaverSessionIDPost ( const int sessionID ) [virtual]

This virtual callback method allows a derived ReplicaNet class to be notified when a session ID leaves the network session.
This method is called by ReplicaNet after any of the internal routines are run when a session leaves.

virtual void RNReplicaNet::ReplicaNet::LeaverSessionIDPre ( const int sessionID ) [virtual]

This virtual callback method allows a derived ReplicaNet class to be notified when a session ID leaves the network session.
This method is called by ReplicaNet before any of the internal routines are run when a session leaves.

void RNReplicaNet::ReplicaNet::LockObjects ( void )

This function locks the object lists so that the user application can guarantee that objects won't be created or deleted while accessing the objects created by ReplicaNet

void RNReplicaNet::ReplicaNet::ObjectListBeginIterate ( void )

Starts iterating through all the allocated objects, effectively locking the list until ObjectListFinishIterate() is called.

void RNReplicaNet::ReplicaNet::ObjectListFinishIterate ( void )

Unlocks the iterated list of objects. The list is unlocked automatically if ObjectListIterate() returns null.

ReplicaObject* RNReplicaNet::ReplicaNet::ObjectListIterate ( void )

Iterates through the object list.

Returns:
the pointer to the next object known to this ReplicaNet session or returns null if there are no more objects.

bool RNReplicaNet::ReplicaNet::PlaybackAdvanceTo ( const float time )

This advances the playback simulation to a specified network time.

Parameters:
time The network time to advance to.
Returns:
True is returned if the simulation time has been advanced. False is returned if time is already in the past.

void RNReplicaNet::ReplicaNet::Poll ( void )

This polls ReplicaNet. Normally an application will yield enough time during threads for ReplicaNet to function. Sometimes an application that uses a lot of 3D graphics can lock out other threads for quite some time. In these cases you may call ReplicaNet::Poll() to yield some time to ReplicaNet to perform housekeeping. This method also calls the XPSession::Poll() and XPURL::Poll() methods.
Single threaded considerations:
When using the single threaded libraries this method should be called regularly.

void RNReplicaNet::ReplicaNet::PreConnectHasFinished ( void )

If the pre-connect mechanism is enabled then this function must be called by the joining session node when packets have been exchanged to the satisfaction of the joining session node.

virtual void RNReplicaNet::ReplicaNet::PreRegisterReplicas ( void ) [virtual]

This registers all of the objects used in the application to the ReplicaNet class. This is used by ReplicaNet when a new node is allocated.

void RNReplicaNet::ReplicaNet::ProcessDataBlockUpdate ( void )

If SetDataBlockUpdatePolicy(false) is used this function must be called by the user. See SetDataBlockUpdatePolicy() for more informaiton. If automatic updates are being used calling this function has no effect.

void RNReplicaNet::ReplicaNet::RemoveObject ( ReplicaObject *const object )

Removes a ReplicaObject class from this ReplicaNet class. The object can be a master or replica. This routine does not free an object it only removes the ReplicaNet reference to the object. If the object is a master then this calls also notifies other ReplicaNet session nodes that this object should be deleted from the session.

Parameters:
object the object to remove

void RNReplicaNet::ReplicaNet::RequestOwnership ( ReplicaObject *const object )

This requests a change of the ownership on a ReplicaObject to be the calling session. This only works if the ReplicaObject is a Replica object and approves migration.

Parameters:
object the pointer to the ReplicaObject

void RNReplicaNet::ReplicaNet::SessionCreate | ( | const std::string | name,
 |  | const std::string | protocols
 | ) |

Creates a new session using the supplied protocols.

Parameters:
name | The name to give to the ReplicaNet session
protocols | The list of protocols to use separated by commas. e.g. "UDP@,STREAMTCPIP@"

void RNReplicaNet::ReplicaNet::SessionCreate ( const std::string name )

Creates a new session using the available protocols.

Parameters:
name The name to give to the ReplicaNet session

std::string RNReplicaNet::ReplicaNet::SessionEnumerateFound ( void )

Enumerates any found sessions

Returns:
the URL of a session or a "" string

std::string RNReplicaNet::ReplicaNet::SessionExportURL ( void )

Exports a URL that can be used to connect to this session in future

Returns:
the full URL for the ReplicaNet session

void RNReplicaNet::ReplicaNet::SessionFind ( void )

Tries to find sessions

void RNReplicaNet::ReplicaNet::SessionJoin ( const std::string url )

Tries to connect this session to the supplied URL

Parameters:
url the url of the ReplicaNet session to connect to

void RNReplicaNet::ReplicaNet::SetAllowConnections ( const bool allow = true )

Enables or disables any further connection attempts to this session.

Parameters:
allow Set this to be true to allow connections to this session. False will stop any further connection attempts to this session and the connecting session will get kReplicaNet_ETRANSPORT_CLOSED from GetSessionErrorReason().

void RNReplicaNet::ReplicaNet::SetAutomaticPacketCompression ( const bool enable = false )

Enables or disables the automatic packet compression test. If enabled XPSession will test each packet sent to see if it can be compressed and if there is a space saving then the packet is compressed before sending.

Parameters:
enable Enable or disable automatic packet compression. The default is false to disable automatic packet compression.

void RNReplicaNet::ReplicaNet::SetAutomaticPoll ( void )

Sets the automatic Poll() method In multi-threading libraries this restarts the automatic polling thread so that an application does not need the call Poll()
In single-threading libraries this method has no effect and does not start a thread.
The default multi-threading library behaviour is to enable multi-threading automatic polls,
The default single-threading library behaviour is to use manual polls,

void RNReplicaNet::ReplicaNet::SetAutomaticPollXPSession ( void )

This allows the poll method to be set for the XPSession layer that is used by this session.

void RNReplicaNet::ReplicaNet::SetAutomaticPollXPURL ( void )

This allows the poll method to be set for the XPURL layer that is used by this session.

void RNReplicaNet::ReplicaNet::SetCanAcceptObjects ( bool accept = true )

Allows the user to set if this ReplicaNet session can accept objects via migration

Parameters:
accept Set this to be true if this session can accept objects through migration
However if this session becomes a master and no other sessions can accept objects then this session uses the rule from SetOnSessionError() and flags a session error if objects are left when using kLeaveObjects. The default value is true
Once a session is created or joined this parameter cannot be changed.

void RNReplicaNet::ReplicaNet::SetCanBecomeMaster ( const bool canBeMaster = true )

This allows the session to set if it can become a master due to a fault being found from another session

Parameters:
canBeMaster Pass in true to enable this session to become a master if needed.
The default is true
Once a session is created or joined this parameter cannot be changed.
Currently a session can only become a master if it is enabled for spidering however.

void RNReplicaNet::ReplicaNet::SetCanSpider ( const bool canSpider = true )

This allows the user to enable or disable spidering of network connections

Parameters:
canSpider Pass in true to enable spidering or false to disable spidering The default is true

void RNReplicaNet::ReplicaNet::SetClientOnly ( const bool isClient = false )

Sets the client only flag for this session node. The default value is false which means this node will get joiner and leaver messages. If this is set to be true then this node will only get joiner/leaver messages for spider nodes or nodes that can become master nodes. This must not be changed after the session is used for joining a session. Setting this to option be true also automatically sets to be false SetCanBecomeMaster() and SetCanSpider()

Parameters:
isClient The default value is false.

static void RNReplicaNet::ReplicaNet::SetCurrentReplicaNet ( ReplicaNet *const replicanet ) [static]

Static function to set the current ReplicaNet class that is being used

Parameters:
replicanet the ReplicaNet class pointer

void RNReplicaNet::ReplicaNet::SetDataBlockUpdatePolicy ( const bool automatic = true )

This sets the update policy for all registered DataBlock classes for every ReplicaObject. By default ReplicaNet will automatically update the each DataBlock when the Poll() method is called or regularly when using threads. However by calling this method with false will disable the automatic updates and the user must then call ProcessDataBlockUpdate() to update each DataBlock. This is useful if the user wants to uncouple the DataBlock updates from the internal ReplicaNet operations.

Parameters:
automatic Enable or disable automatic DataBlock updates. The default is true, which enables automatic updates.

void RNReplicaNet::ReplicaNet::SetDataRetention ( const bool enable = false )

Allows the raw data retention policy to be configured. By default ReplicaNet will discard raw data packets from the DataSend() or DataReceive() mechanism.

Parameters:
enable Set this to be true to enable retention of raw data packets. The default value is false, which means ReplicaNet will discard any raw data packets.

void RNReplicaNet::ReplicaNet::SetEncryption ( const bool enable = false )

Enables or disables encryption for this session

Parameters:
enable set this to be true to enable encryption for data sent from this session. The default is false

void RNReplicaNet::ReplicaNet::SetGameChannel ( const int channel = TransportAnyGameChannel )

Sets the current channel number. If no channel number is passed then TransportAnyGameChannel is used.

Parameters:
channel The channel number to use.

void RNReplicaNet::ReplicaNet::SetLatencyRecalculationDelay ( const float seconds = 1.0f )

This allows the latency recalculation delay to be set. The default value is 1 second meaning there is a ping packet sent every second.

Parameters:
seconds The number of seconds before latency is recalculated.

void RNReplicaNet::ReplicaNet::SetLoadBalancing ( const bool enable = false )

Enables or disables load balancing for this ReplicaNet session.

Parameters:
enable set this to true to enable load balancing. The default is false Once a session is created or joined this parameter cannot be changed.

void RNReplicaNet::ReplicaNet::SetManualPoll ( void )

Sets the manual Poll() method for this class only.
For multi-threaded libraries this turns off the automatic polling method.
This allows an application to time exactly when polls are done.
Doing this allows the extrapolation and prediction routines to calculate a more reliable set of data to send to other sessions.
The application must call Poll() on a regular basis. A good place is just before or after the frame update is done.

void RNReplicaNet::ReplicaNet::SetManualPollXPSession ( void )

This allows the poll method to be set for the XPSession layer that is used by this session.

void RNReplicaNet::ReplicaNet::SetManualPollXPURL ( void )

This allows the poll method to be set for the XPURL layer that is used by this session.

void RNReplicaNet::ReplicaNet::SetMaximumLoad ( float load = 0.0f )

SetMaximumLoad() sets the maximum load that the current session ID will try to have. This is specifically for when ReplicaNet::SetLoadBalancing(true) is used. Each object can have a 'load' value set by using ReplicaObject::SetLoadBalancing(true) and also setting the load value by using ReplicaObject::SetLoadScore(float). When the total load for the master objects for a session ID exceeds the SetMaximumLoad() value then the session tries to migrate objects to a session ID that has a smaller load. This allows a system to be scaled such that if the server cluster was becoming full then another machine in the cluster could be started and some objects would be migrated to the new machine. The definition and scale of load "units" is left to the user to define.

Parameters:
load the load in load "units" Once a session is created or joined this parameter cannot be changed.

void RNReplicaNet::ReplicaNet::SetNodeBuffers ( const bool enable = false )

Enables or disables buffering for this session node. With buffering enabled extra memory is used to improve multi-threaded performance when this node is used by another thread.

Parameters:
enable The default is false which disables extra buffering.

void RNReplicaNet::ReplicaNet::SetObserver ( ReplicaObject *const object = 0 )

Sets a ReplicaObject as the observer for this ReplicaNet session.

Parameters:
object the object to use as an observer. Pass in NULL or omit the parameter to unset the observer.

void RNReplicaNet::ReplicaNet::SetOnSessionError ( const OnError whatToDo = kMigrateObjects )

If a session error happens then this enables the user to decide if all ReplicaObjects should be tested for migration to this session. A session error happens when the master session disconnects and a new master cannot be found.

Parameters:
enable Set this to be true if all objects should be tested for migration to this session on an error condition
The default is kMigrateObjects which takes all the objects from other sessions and converts them to be master objects if possible.
kDeleteObjects Causes objects that belong to other sessions to be deleted.
kLeaveObjects Causes objects that belong to other sessions to be unchanged and no migration checks are used.
Once a session is created or joined this parameter cannot be changed.

void RNReplicaNet::ReplicaNet::SetPlaybackAllowMasterReplicaObjects ( const bool allow = false )

When playing back a recorded session the defines the if a recorded master ReplicaObject derived classes is kept as a master or is marked as a replica. For some applications it may be useful to always playback classes as replicas so that the application code does not try to control what was a master class.

Parameters:
allow If this is true, what were recorded master classes will stay as masters. If this is false, what were master classes will be replicas when the recorded session is played back. The default is false.

void RNReplicaNet::ReplicaNet::SetPlaybackSpeed ( const float speed = 1.0f )

Sets the speed of the playback.

Parameters:
speed The speed for the playback. Smaller values produce slower playback and larger values produce faster playback. The default is 1.0.

void RNReplicaNet::ReplicaNet::SetPollLayerBelow ( bool enable = true )

This allows the user to determine if during a Poll() the layer below also gets called. For single threaded applications this function has no effect as the layer below always has the Poll() called. The default is true.
The layer below in this case is XPSession.

Parameters:
enable Enable or disable layer below polling.

void RNReplicaNet::ReplicaNet::SetPollLayerBelowForXPSession ( bool enable = true )

This calls XPSession::SetPollLayerBelow(). Please see the documentation in XPSession for more information. The default is true.

Parameters:
enable Enable or disable layer below polling.

void RNReplicaNet::ReplicaNet::SetPreConnect ( const bool enable = false )

Enables or disables the pre-connect mechanism for session nodes that are joining a session. When this mechanism is enabled the joining session node will be able to exchange packets with the master session node before the node properly joins the session. The function PreConnectHasFinished() can be called to signal that the node wishes to complete a connect to the session. This function should only be used before a session node is used to join the session. The function IsStable() will not return true until the pre-connect is finished.
The intended for this mechanism is as follows:
1) SetPreConnect(true) and attempts to join a session.
2) When GetPreConnectStatus() returns true after this session node starts a join then this session node is in a pre-connect state.
3) This node will send one or more user defined packets that signal that the session wants to exchange certain pre-connect data to the master session using DataSendToSession() and session ID kReplicaNetUnknownUniqueID. Using the reliable packet type is recommended but not mandatory.
4) The master session will receive user data packets and detecting that pre-connect data has been received will in reply send a user data message to the effect that it has received this information.
5) The joining node receives pre-connect data from the master session, verifies the data and either completes the pre-connect by calling PreConnectHasFinished() or uses Disconnect() to abort the connection.

Parameters:
enable Set this to be true to enable the pre-connect mechanism for this session node. If false then the session node will discard all pre-connect packets and the preconnection mechanism is assumed to be disabled. The default is false.

void RNReplicaNet::ReplicaNet::StopSessionPlayback ( void )

Stops playback of a recorded network session.

void RNReplicaNet::ReplicaNet::StopSessionRecord ( void )

Stops recording the network session.

void RNReplicaNet::ReplicaNet::UnLockObjects ( void )

This unlocks the object lists from a previous LockObjects() call

The documentation for this class was generated from the following file:
  • ReplicaNet.h
Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::ReplicaNetDLLRegister Class Reference

RNReplicaNet::ReplicaNetDLLRegister

RNReplicaNet::ReplicaNetDLLRegister Class Reference

#include <ReplicaNet.h>

List of all members.

Public Member Functions

void Call (ReplicaNet *repNet)

Detailed Description

This internal class provides an interface that allows static forward library linkage or DLL linkage with an application to enable object IDs to be registered

The documentation for this class was generated from the following file:
  • ReplicaNet.h
Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::ReplicaObject Class Reference

RNReplicaNet::ReplicaObject

RNReplicaNet::ReplicaObject Class Reference

#include <ReplicaObject.h>

Collaboration diagram for RNReplicaNet::ReplicaObject:

[legend]
List of all members.

Public Member Functions

ReplicaObject ()
virtual | ~ReplicaObject ()
bool | IsReplica (void) const
bool | IsMaster (void) const
void | Publish (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 s_RO_RegistryBlock * | GetRegistryBlock (void) const =0

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)
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)
virtual void | RegisterDataBlock (DataBlock *block)

Protected Attributes

bool | mDataBlocksRegistered

Friends

class | ReplicaNet
class | ReplicaNetPrivate
struct | SessionUnique
class | DataBlock

Detailed Description

A ReplicaObject is the base class that all replica objects use.
For any ReplicaObject derived class that is intended to be used in a network session an instance of ReplicaNet must be created first. However if a ReplicaObject derived class is not intended to be used in a network session there is no requirement to allocate an instance of ReplicaNet. For example, if an application is started without ReplicaNet networking then instances of ReplicaObject will do nothing and use a nominal amount of memory.
Each ReplicaObject class member variable propagated with a DataBlock can have a different packet update type (Unreliable, Certain or Reliable) to the ReplicaObject. When a ReplicaObject is propagated to a session all class member variables that need to send an initial update will temporarily use the update type of the ReplicaObject. This means a ReplicaObject propagated with the Certain update and with a class member variable normally propagated using Unreliable will have the initial variable propagetd using Certain instead. This is to guarantee the initial object state is propagated along with the object propagation packet.

Constructor & Destructor Documentation

RNReplicaNet::ReplicaObject::ReplicaObject ( )

The ctor performs some basic initialisation

virtual RNReplicaNet::ReplicaObject::~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.

Member Function Documentation

void RNReplicaNet::ReplicaObject::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.

Parameters:
dataBlock the pointer to the DataBlock to register

static ReplicaObject* RNReplicaNet::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. The default implementation is to use new.

Returns:
A pointer to an object that is derived from ReplicaObject.

virtual bool RNReplicaNet::ReplicaObject::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.

Returns:
To approve return true else return false. The default is false

virtual bool RNReplicaNet::ReplicaObject::ApproveMigration ( void ) [virtual]

Use this virtual callback to approve or deny that this object can migrate when a migrate request is made.

Returns:
To approve return true else return false. The default is false

virtual float RNReplicaNet::ReplicaObject::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.

Parameters:
object The destination object to use, if this parameter is null then kReplicaObject_InfiniteDistance should be returned.
Returns:
the distance to the object. The default return value is kReplicaObject_InfiniteDistance meaning that the distance between objects could not be calculated.

void RNReplicaNet::ReplicaObject::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

Parameters:
variable | the variable to give a hint for
breakTypes | The break types to use for this break. For example : DataBlock::ContinuityBreakTypes::kSuddenChange | DataBlock::ContinuityBreakTypes::kTeleport

virtual void RNReplicaNet::ReplicaObject::DataBlockPacketDataReceived ( const DataBlock * datablock ) [virtual]

This virtual callback is triggered by ReplicaNet every time an update packet for a DataBlock is received. See also FindDataBlock()

Parameters:
datablock The pointer to the DataBlock that is getting the update.

static void RNReplicaNet::ReplicaObject::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. The default implementation is to use delete. Care must be taken to use ReplicaNet::RemoveObject(this) properly to remove references held by ReplicaNet if this function is user implemented.

Parameters:
object A pointer to an object that is derived from ReplicaObject.

DataBlock* RNReplicaNet::ReplicaObject::FindDataBlock ( void * pdata )

Given a pointer to memory this functions finds a data block attached to that memory area

Parameters:
pdata the pointer to the memory area
Returns:
the DataBlock pointer or NULL if no data block is attached

ReplicaNet* RNReplicaNet::ReplicaObject::GetBoundReplicaNet ( void )

Gets the object's bound ReplicaNet class

Returns:
the ReplicaNet pointer that is bound to this object

virtual const int RNReplicaNet::ReplicaObject::GetClassID ( void ) [pure virtual]

Gets the class id that is set

Returns:
the class id for this class

float RNReplicaNet::ReplicaObject::GetDistanceToObject ( ReplicaObject * object )

Gets the distance to another supplied ReplicaObject. This function applies a caching mechanism to avoid too many unwanted calculations

Parameters:
object The destination object to use. If the object pointer is null then kReplicaObject_InfiniteDistance is returned.
Returns:
the distance to the object or kReplicaObject_InfiniteDistance meaning the distance between two objects couldn't be calculated.

bool RNReplicaNet::ReplicaObject::GetLoadBalancing ( void )

Gets the status of the load balancing flag

Returns:
true if load balancing is enabled

float RNReplicaNet::ReplicaObject::GetLoadScore ( void )

Gets the object to report a score based on its "load" for the master session. The definition of "load" units is left to the user. The default return value is 0.0f

Returns:
A "load" score for this object.

int RNReplicaNet::ReplicaObject::GetMessageReflectionID ( void ) const

This function gets the sessionID used to reflect message updates

Returns:
The sessionID that isused to reflect messages, kReplicaObjectUnknownUniqueID means that the master object sends message updates

virtual void* RNReplicaNet::ReplicaObject::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

Parameters:
data the pointer to some optional data that can be passed in. This defaults to null
Returns:
the opaque data pointer

float RNReplicaNet::ReplicaObject::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

Returns:
the distance value

virtual bool RNReplicaNet::ReplicaObject::GetRegistered ( void ) [pure virtual]

Returns the registered flag status of this class

Returns:
the registered state of this class

virtual s_RO_RegistryBlock* RNReplicaNet::ReplicaObject::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().

Returns:
the pointer to the s_RO_RegistryBlock. The registry block contents must not be changed by the user. This function must always return a valid registry block pointer.

int RNReplicaNet::ReplicaObject::GetSessionID ( void )

Returns the session id of the object which is global for the whole network session

Returns:
the session id

bool RNReplicaNet::ReplicaObject::GetSessionPropagationFilter ( void ) const

Allows the status of the session propagation filter mechanism to be read.

Parameters:
Returns true if the mechanism is enabled

void RNReplicaNet::ReplicaObject::GetSessionPropagationSet ( std::set< int > & theSet )

Gets the current propagation set.

Parameters:
theSet The current set is stored in this reference.

int RNReplicaNet::ReplicaObject::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().

Returns:
the unique id

void RNReplicaNet::ReplicaObject::GiveDeltaHint | ( | float & | variable,
 |  | float | delta
 | ) |

This gives a delta hint for a particular variable that has a float type

Parameters:
variable | the variable to give a hint for
delta | the delta hint

void RNReplicaNet::ReplicaObject::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.

Parameters:
sessionID the target sessionID for this object to migrate to

bool RNReplicaNet::ReplicaObject::IsMaster ( void ) const

Tests the status of the object to see if it is a master object

Returns:
Returns true if this object is a master copy for the network

bool RNReplicaNet::ReplicaObject::IsReplica ( void ) const

Tests the status of the object to see if it is a master object

Returns:
Returns true if this object is a replica (copy) from the network

virtual void RNReplicaNet::ReplicaObject::OwnerChange ( void ) [virtual]

This callback is used whenever an object changes owner

virtual void RNReplicaNet::ReplicaObject::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.

void RNReplicaNet::ReplicaObject::Publish ( void )

Publish this object on to the network. This uses ReplicaNet::AddObject(this) to add a reference of this object to ReplicaNet.

virtual void RNReplicaNet::ReplicaObject::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)

Parameters:
The data block to register

void RNReplicaNet::ReplicaObject::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.

bool RNReplicaNet::ReplicaObject::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.

Parameters:
sessionID The session ID to propagate to.
Returns:
Returns true if the added sessionID was not in the list. Returns false if the sessionID was in the propagation list.

bool RNReplicaNet::ReplicaObject::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.

Parameters:
sessionID The session ID to finish propagating to.
Returns:
Returns true if the removed sessionID was in the list. Returns false if the sessionID was not in the propagation list.

void RNReplicaNet::ReplicaObject::SetLoadBalancing ( const bool enable = false )

Enables or disables load balancing for this ReplicaObject.

Parameters:
enable set this to true to enable load balancing. The default is false

void RNReplicaNet::ReplicaObject::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.

Parameters:
defaultValue the value that is the default value. The default is false to match the parameter to SetLoadBalancing()

void RNReplicaNet::ReplicaObject::SetLoadScore ( const float load = 0.0f )

Sets the object load unit score.. The definition of "load" units is left to the user. The default return value is 0.0f

Parameters:
load A "load" score for this object.

void RNReplicaNet::ReplicaObject::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.

Parameters:
defaultLoad the value that is the default value. The default is 0.0f to match the parameter to SetLoadScore()

void RNReplicaNet::ReplicaObject::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.

Parameters:
sessionID the session to be used for sending message updates, the default is kReplicaObjectUnknownUniqueID which signifies that the master sends messages

virtual void RNReplicaNet::ReplicaObject::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

Parameters:
data the pointer to the opaque data

void RNReplicaNet::ReplicaObject::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.

Parameters:
distance the distance to set, kReplicaObject_InfiniteDistance is the default value

void RNReplicaNet::ReplicaObject::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.

Parameters:
distance the value that is the default value. The default is kReplicaObject_InfiniteDistance to match the parameter to SetPropagateToSessionDistance()

void RNReplicaNet::ReplicaObject::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.

Parameters:
delay The recalculation delay in seconds, the default is 0.1 seconds. Values less than 0 are ignored.

virtual void RNReplicaNet::ReplicaObject::SetRegistered ( bool flag = true ) [pure virtual]

Sets the registered flag to the bool value

Parameters:
flag the value to set the flag to, true is default

void RNReplicaNet::ReplicaObject::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().

Parameters:
enable When true enables this mechanism. The default value is false and this mechanism is disabled.

bool RNReplicaNet::ReplicaObject::UpdateIsCertain ( void )

Tests the update type for this object.

Returns:
true if this object uses the 'certain' packet type.

bool RNReplicaNet::ReplicaObject::UpdateIsReliable ( void )

Tests the update type for this object.

Returns:
true if this object uses the 'reliable' packet type.

bool RNReplicaNet::ReplicaObject::UpdateIsUnreliable ( void )

Tests the update type for this object.

Returns:
true if this object uses the 'certain' packet type.

void RNReplicaNet::ReplicaObject::UpdateSetCertain ( void )

This sets this object to use the 'certain' packet type when transmitting information about this object to other sessions.
By default the object uses the reliable method.
Each datablock then uses the type of update assigned to itself.

void RNReplicaNet::ReplicaObject::UpdateSetReliable ( void )

This sets this object to use the 'reliable' packet type when transmitting information about this object to other sessions.
By default the object uses the reliable method.
Each datablock then uses the type of update assigned to itself.

void RNReplicaNet::ReplicaObject::UpdateSetUnreliable ( void )

This sets this object to use the 'normal' packet type when transmitting information about this object to other sessions.
By default the object uses the reliable method.
Each datablock then uses the type of update assigned to itself.

virtual void RNReplicaNet::ReplicaObject::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.

The documentation for this class was generated from the following file:
  • ReplicaObject.h
Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RNReplicaNet::s_RO_RegistryBlock Struct Reference

RNReplicaNet::s_RO_RegistryBlock

RNReplicaNet::s_RO_RegistryBlock Struct Reference

#include <RO_RegistryBlock.h>

List of all members.

Public Member Functions

s_RO_RegistryBlock (int id, p_RO_Func *pfunc, p_RO_FuncDelete *pfunc_delete, const char *name=0)
int | GetClassID (void)
ReplicaObject * | CallBackAllocate (void)
void | CallBackDelete (ReplicaObject *object)
const char * | GetName (void) const

Detailed Description

This is a registry block used when class allocator functions are registered at startup

Constructor & Destructor Documentation

RNReplicaNet::s_RO_RegistryBlock::s_RO_RegistryBlock | ( | int | id,
 |  | p_RO_Func * | pfunc,
 |  | p_RO_FuncDelete * | pfunc_delete,
 |  | const char * | name = 0
 | ) |

This ctor fills in the parameters in the structure

Parameters:
id | the class id to use for this block
pfunc | the function pointer that can allocate this class id
pfunc_delete | the function that can delete this class id
name | the name of the class. The default value is null

Member Function Documentation

ReplicaObject* RNReplicaNet::s_RO_RegistryBlock::CallBackAllocate ( void )

Calls the allocate function pointer registered for this block and returns the ReplicaObject pointer

Returns:
the replica object pointer

void RNReplicaNet::s_RO_RegistryBlock::CallBackDelete ( ReplicaObject * object )

Calls the delete function pointer registered for this block

Parameters:
object the replica object pointer to delete

int RNReplicaNet::s_RO_RegistryBlock::GetClassID ( void )

Gets the class id from the structure

Returns:
the class id

const char* RNReplicaNet::s_RO_RegistryBlock::GetName ( void ) const

Gets the class name if the preprocessor define REPLICANET_VISUALDEBUGGER is used. Otherwise the return value is null. If the class name is null then the ReplicaObject will not appear in the Visual Debugger output.

Returns:
The name

The documentation for this struct was generated from the following file:
  • RO_RegistryBlock.h
Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Hierarchical Index

ReplicaNet Class Hierarchy

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

  • RNReplicaNet::DataBlock
    • RNReplicaNet::DataBlock_Function
    • RNReplicaNet::DataBlock_NData
    • RNReplicaNet::DataBlock_Predict_Float
  • RNReplicaNet::DataBlockReason
  • RNReplicaNet::ReplicaNet
  • RNReplicaNet::ReplicaNetDLLRegister
  • RNReplicaNet::ReplicaObject
  • RNReplicaNet::s_RO_RegistryBlock
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- a -

  • AddAutoRegisterDataBlock() : RNReplicaNet::ReplicaObject
  • AddObject() : RNReplicaNet::ReplicaNet
  • AllocateForReplicaNet() : RNReplicaNet::ReplicaObject
  • ApproveFault() : RNReplicaNet::ReplicaObject
  • ApproveMigration() : RNReplicaNet::ReplicaObject

- b -

  • BeginSessionPlayback() : RNReplicaNet::ReplicaNet
  • BeginSessionRecord() : RNReplicaNet::ReplicaNet
  • BindReplicaNet() : RNReplicaNet::DataBlock
  • BindReplicaObject() : RNReplicaNet::DataBlock

- c -

  • CalculateDistanceToObject() : RNReplicaNet::ReplicaObject
  • CallBackAllocate() : RNReplicaNet::s_RO_RegistryBlock, RNReplicaNet::ReplicaNet
  • CallBackDelete() : RNReplicaNet::s_RO_RegistryBlock, RNReplicaNet::ReplicaNet
  • CallbackSessionPlayback() : RNReplicaNet::ReplicaNet
  • CallbackSessionRecord() : RNReplicaNet::ReplicaNet
  • ContinuityBreak() : RNReplicaNet::ReplicaObject, RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock
  • ContinuityBreakTypes : RNReplicaNet::DataBlock

- d -

  • DataBlock() : RNReplicaNet::DataBlock
  • DataBlock_Function() : RNReplicaNet::DataBlock_Function
  • DataBlock_NData() : RNReplicaNet::DataBlock_NData
  • DataBlock_Predict_Float() : RNReplicaNet::DataBlock_Predict_Float
  • DataBlockPacketDataReceived() : RNReplicaNet::ReplicaObject
  • DataBlockReason() : RNReplicaNet::DataBlockReason
  • DataReceive() : RNReplicaNet::ReplicaNet
  • DataSend() : RNReplicaNet::ReplicaNet
  • DeleteForReplicaNet() : RNReplicaNet::ReplicaObject
  • Disconnect() : RNReplicaNet::ReplicaNet

- e -

  • Error : RNReplicaNet::ReplicaNet

- f -

  • FindDataBlock() : RNReplicaNet::ReplicaObject

- g -

  • GetAllowConnections() : RNReplicaNet::ReplicaNet
  • GetAutomaticPacketCompression() : RNReplicaNet::ReplicaNet
  • GetAutomaticUpdatesFlag() : RNReplicaNet::DataBlock
  • GetBandwidthFromSessionID() : RNReplicaNet::ReplicaNet
  • GetBoundReplicaNet() : RNReplicaNet::ReplicaObject
  • GetCanAcceptObjects() : RNReplicaNet::ReplicaNet
  • GetCanBecomeMaster() : RNReplicaNet::ReplicaNet
  • GetCanSpider() : RNReplicaNet::ReplicaNet
  • GetCertainFlag() : RNReplicaNet::DataBlock
  • GetClassID() : RNReplicaNet::s_RO_RegistryBlock, RNReplicaNet::ReplicaObject
  • GetClientOnly() : RNReplicaNet::ReplicaNet
  • GetCompressionStatistics() : RNReplicaNet::ReplicaNet
  • GetCurrentReplicaNet() : RNReplicaNet::ReplicaNet
  • GetDataBlockUpdatePolicy() : RNReplicaNet::ReplicaNet
  • GetDataRetention() : RNReplicaNet::ReplicaNet
  • GetDistanceToObject() : RNReplicaNet::ReplicaObject
  • GetEncryption() : RNReplicaNet::ReplicaNet
  • GetForceSendMaximumUpdates() : RNReplicaNet::DataBlock
  • GetForceSendTimeDelay() : RNReplicaNet::DataBlock
  • GetGameChannel() : RNReplicaNet::ReplicaNet
  • GetLatencyToMasterSession() : RNReplicaNet::ReplicaNet
  • GetLoadBalancing() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet
  • GetLoadScore() : RNReplicaNet::ReplicaObject
  • GetLocalTime() : RNReplicaNet::ReplicaNet
  • GetMasterSessionID() : RNReplicaNet::ReplicaNet
  • GetMaximumLoad() : RNReplicaNet::ReplicaNet
  • GetMergedStatistics() : RNReplicaNet::ReplicaNet
  • GetMessageReflectionID() : RNReplicaNet::ReplicaObject
  • GetName() : RNReplicaNet::s_RO_RegistryBlock
  • GetNetworkPacketsLost() : RNReplicaNet::ReplicaNet
  • GetNetworkReceiveRate() : RNReplicaNet::ReplicaNet
  • GetNetworkSendRate() : RNReplicaNet::ReplicaNet
  • GetNodeBuffers() : RNReplicaNet::ReplicaNet
  • GetObserver() : RNReplicaNet::ReplicaNet
  • GetOnSessionErrorMigrateObjects() : RNReplicaNet::ReplicaNet
  • GetOpaquePointer() : RNReplicaNet::ReplicaObject
  • GetPlaybackAllowMasterReplicaObjects() : RNReplicaNet::ReplicaNet
  • GetPollLayerBelow() : RNReplicaNet::ReplicaNet
  • GetPollLayerBelowForXPSession() : RNReplicaNet::ReplicaNet
  • GetPreConnect() : RNReplicaNet::ReplicaNet
  • GetPreConnectStatus() : RNReplicaNet::ReplicaNet
  • GetPropagateToSessionDistance() : RNReplicaNet::ReplicaObject
  • GetRegistered() : RNReplicaNet::ReplicaObject
  • GetRegistryBlock() : RNReplicaNet::ReplicaObject
  • GetReliableFlag() : RNReplicaNet::DataBlock
  • GetSessionErrorReason() : RNReplicaNet::ReplicaNet
  • GetSessionID() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet
  • GetSessionPlayback() : RNReplicaNet::ReplicaNet
  • GetSessionPropagationFilter() : RNReplicaNet::ReplicaObject
  • GetSessionPropagationSet() : RNReplicaNet::ReplicaObject
  • GetSessionRecord() : RNReplicaNet::ReplicaNet
  • GetStatus() : RNReplicaNet::ReplicaNet
  • GetTime() : RNReplicaNet::ReplicaNet
  • GetTotalLoad() : RNReplicaNet::ReplicaNet
  • GetUniqueID() : RNReplicaNet::ReplicaObject
  • GetUpdateDelayMinimum() : RNReplicaNet::DataBlock
  • GetURLFromSessionID() : RNReplicaNet::ReplicaNet
  • GiveDeltaHint() : RNReplicaNet::ReplicaObject, RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock
  • GiveOwnership() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet

- i -

  • IsAllocated() : RNReplicaNet::DataBlock
  • IsAttached() : RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock
  • IsMaster() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet
  • IsReplica() : RNReplicaNet::ReplicaObject
  • IsStable() : RNReplicaNet::ReplicaNet

- j -

  • JoinerSessionIDPost() : RNReplicaNet::ReplicaNet
  • JoinerSessionIDPre() : RNReplicaNet::ReplicaNet

- k -

  • kReplicaNet_EERROR : RNReplicaNet::ReplicaNet
  • kReplicaNet_EOK : RNReplicaNet::ReplicaNet
  • kStop : RNReplicaNet::DataBlock
  • kSuddenChange : RNReplicaNet::DataBlock
  • kTeleport : RNReplicaNet::DataBlock

- l -

  • LeaverSessionIDPost() : RNReplicaNet::ReplicaNet
  • LeaverSessionIDPre() : RNReplicaNet::ReplicaNet
  • LockObjects() : RNReplicaNet::ReplicaNet

- m -

  • mFloatValue : RNReplicaNet::DataBlockReason
  • mMessageHelper : RNReplicaNet::DataBlockReason
  • mObserver : RNReplicaNet::DataBlockReason
  • mReasonCode : RNReplicaNet::DataBlockReason
  • mSessionReference : RNReplicaNet::DataBlockReason

- o -

  • ObjectListBeginIterate() : RNReplicaNet::ReplicaNet
  • ObjectListFinishIterate() : RNReplicaNet::ReplicaNet
  • ObjectListIterate() : RNReplicaNet::ReplicaNet
  • OwnerChange() : RNReplicaNet::ReplicaObject

- p -

  • ParseMessage() : RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock
  • PlaybackAdvanceTo() : RNReplicaNet::ReplicaNet
  • Poll() : RNReplicaNet::ReplicaNet, RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock
  • PostObjectCreate() : RNReplicaNet::ReplicaObject
  • PreConnectHasFinished() : RNReplicaNet::ReplicaNet
  • PreRegisterReplicas() : RNReplicaNet::ReplicaNet
  • ProcessDataBlockUpdate() : RNReplicaNet::ReplicaNet
  • Publish() : RNReplicaNet::ReplicaObject

- r -

  • Register() : RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function
  • RegisterDataBlock() : RNReplicaNet::ReplicaObject
  • RegisterInClassPointer() : RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function
  • RemoveObject() : RNReplicaNet::ReplicaNet
  • ReplicaNet() : RNReplicaNet::ReplicaNet
  • ReplicaObject() : RNReplicaNet::ReplicaObject
  • RequestOwnership() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet

- s -

  • s_RO_RegistryBlock() : RNReplicaNet::s_RO_RegistryBlock
  • SessionCreate() : RNReplicaNet::ReplicaNet
  • SessionEnumerateFound() : RNReplicaNet::ReplicaNet
  • SessionExportURL() : RNReplicaNet::ReplicaNet
  • SessionFind() : RNReplicaNet::ReplicaNet
  • SessionJoin() : RNReplicaNet::ReplicaNet
  • SessionPropagationAddSession() : RNReplicaNet::ReplicaObject
  • SessionPropagationRemoveSession() : RNReplicaNet::ReplicaObject
  • SetAllowConnections() : RNReplicaNet::ReplicaNet
  • SetAutomaticPacketCompression() : RNReplicaNet::ReplicaNet
  • SetAutomaticPoll() : RNReplicaNet::ReplicaNet
  • SetAutomaticPollXPSession() : RNReplicaNet::ReplicaNet
  • SetAutomaticPollXPURL() : RNReplicaNet::ReplicaNet
  • SetAutomaticUpdatesFlag() : RNReplicaNet::DataBlock
  • SetCanAcceptObjects() : RNReplicaNet::ReplicaNet
  • SetCanBecomeMaster() : RNReplicaNet::ReplicaNet
  • SetCanSpider() : RNReplicaNet::ReplicaNet
  • SetCertainFlag() : RNReplicaNet::DataBlock
  • SetClientOnly() : RNReplicaNet::ReplicaNet
  • SetCurrentReplicaNet() : RNReplicaNet::ReplicaNet
  • SetDataBlockUpdatePolicy() : RNReplicaNet::ReplicaNet
  • SetDataRetention() : RNReplicaNet::ReplicaNet
  • SetDefaultData() : RNReplicaNet::DataBlock_NData
  • SetEncryption() : RNReplicaNet::ReplicaNet
  • SetForceSendMaximumUpdates() : RNReplicaNet::DataBlock
  • SetForceSendTimeDelay() : RNReplicaNet::DataBlock
  • SetGameChannel() : RNReplicaNet::ReplicaNet
  • SetID() : RNReplicaNet::DataBlock
  • SetInterpolationFilter() : RNReplicaNet::DataBlock_Predict_Float
  • SetIsAllocated() : RNReplicaNet::DataBlock
  • SetLatencyRecalculationDelay() : RNReplicaNet::ReplicaNet
  • SetLinear() : RNReplicaNet::DataBlock_Predict_Float
  • SetLoadBalancing() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet
  • SetLoadBalancingDefault() : RNReplicaNet::ReplicaObject
  • SetLoadScore() : RNReplicaNet::ReplicaObject
  • SetLoadScoreDefault() : RNReplicaNet::ReplicaObject
  • SetManualPoll() : RNReplicaNet::ReplicaNet
  • SetManualPollXPSession() : RNReplicaNet::ReplicaNet
  • SetManualPollXPURL() : RNReplicaNet::ReplicaNet
  • SetMaxDistance() : RNReplicaNet::DataBlock_Predict_Float
  • SetMaxError() : RNReplicaNet::DataBlock_Predict_Float
  • SetMaximumLoad() : RNReplicaNet::ReplicaNet
  • SetMessageReflectionID() : RNReplicaNet::ReplicaObject
  • SetMinDistance() : RNReplicaNet::DataBlock_Predict_Float
  • SetMinError() : RNReplicaNet::DataBlock_Predict_Float
  • SetNodeBuffers() : RNReplicaNet::ReplicaNet
  • SetObserver() : RNReplicaNet::ReplicaNet
  • SetOnSessionError() : RNReplicaNet::ReplicaNet
  • SetOpaquePointer() : RNReplicaNet::ReplicaObject
  • SetPlaybackAllowMasterReplicaObjects() : RNReplicaNet::ReplicaNet
  • SetPlaybackSpeed() : RNReplicaNet::ReplicaNet
  • SetPollLayerBelow() : RNReplicaNet::ReplicaNet
  • SetPollLayerBelowForXPSession() : RNReplicaNet::ReplicaNet
  • SetPreConnect() : RNReplicaNet::ReplicaNet
  • SetPropagateToSessionDistance() : RNReplicaNet::ReplicaObject
  • SetPropagateToSessionDistanceDefault() : RNReplicaNet::ReplicaObject
  • SetPropagateToSessionDistanceRecalculationDelay() : RNReplicaNet::ReplicaObject
  • SetQuadratic() : RNReplicaNet::DataBlock_Predict_Float
  • SetRegistered() : RNReplicaNet::ReplicaObject
  • SetReliableFlag() : RNReplicaNet::DataBlock
  • SetSessionIDFilter() : RNReplicaNet::DataBlock_Function
  • SetSessionPropagationFilter() : RNReplicaNet::ReplicaObject
  • SetUpdateDelayMinimum() : RNReplicaNet::DataBlock
  • SetVariableName() : RNReplicaNet::DataBlock
  • StopSessionPlayback() : RNReplicaNet::ReplicaNet
  • StopSessionRecord() : RNReplicaNet::ReplicaNet

- u -

  • UnLockObjects() : RNReplicaNet::ReplicaNet
  • UpdateIsCertain() : RNReplicaNet::ReplicaObject
  • UpdateIsReliable() : RNReplicaNet::ReplicaObject
  • UpdateIsUnreliable() : RNReplicaNet::ReplicaObject
  • UpdateSetCertain() : RNReplicaNet::ReplicaObject
  • UpdateSetReliable() : RNReplicaNet::ReplicaObject
  • UpdateSetUnreliable() : RNReplicaNet::ReplicaObject
  • UserRegisterDataBlocks() : RNReplicaNet::ReplicaObject

- ~ -

  • ~DataBlock() : RNReplicaNet::DataBlock
  • ~DataBlock_Function() : RNReplicaNet::DataBlock_Function
  • ~DataBlock_NData() : RNReplicaNet::DataBlock_NData
  • ~DataBlock_Predict_Float() : RNReplicaNet::DataBlock_Predict_Float
  • ~ReplicaNet() : RNReplicaNet::ReplicaNet
  • ~ReplicaObject() : RNReplicaNet::ReplicaObject
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Directory Hierarchy

ReplicaNet Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • ReplicaNetWork
    • RNReplicaNet
      • Inc
Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: C:/Work/ReplicaNetWork/ Directory Reference

ReplicaNetWork

ReplicaNetWork Directory Reference

Directories

directory RNReplicaNet
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: C:/Work/ReplicaNetWork/RNReplicaNet/ Directory Reference

RNReplicaNet Directory Reference

Directories

directory | Inc

Files

file | ReplicaNetDoc.cpp
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: C:/Work/ReplicaNetWork/RNReplicaNet/Inc/ Directory Reference

Inc Directory Reference

Files

file | DataBlock.h [code]
file | DataBlock_Function.h [code]
file | DataBlock_NData.h [code]
file | DataBlock_Predict_Float.h [code]
file | Define_RO.h [code]
file | ReplicaNet.h [code]
file | ReplicaObject.h [code]
file | RO_RegistryBlock.h [code]
file | ROConstants.h [code]
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Graphical Class Hierarchy

Go to the textual class hierarchy

Generated on Sun Oct 30 01:11:59 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::DataBlock Member List

This is the complete list of members for RNReplicaNet::DataBlock, including all inherited members.

BindReplicaNet(ReplicaNet *current) | RNReplicaNet::DataBlock |
BindReplicaObject(ReplicaObject *object) | RNReplicaNet::DataBlock |
ContinuityBreak(unsigned char breakTypes) | RNReplicaNet::DataBlock | [virtual]
ContinuityBreakTypes enum name | RNReplicaNet::DataBlock |
DataBlock() | RNReplicaNet::DataBlock |
EmitBaseDebugInfo(const char *name, const char *className, DataBlockReason *reason) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
EmitBaseDebugInfoUpdates(const char *name, const char *className, DataBlockReason *reason) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GetAutomaticUpdatesFlag(void) | RNReplicaNet::DataBlock |
GetCertainFlag(void) | RNReplicaNet::DataBlock |
GetForceSendMaximumUpdates(void) const | RNReplicaNet::DataBlock |
GetForceSendTimeDelay(void) const | RNReplicaNet::DataBlock |
GetReliableFlag(void) | RNReplicaNet::DataBlock |
GetROName(ReplicaObject *from=0) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GetUpdateDelayMinimum(void) const | RNReplicaNet::DataBlock |
GetVariableName(void) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GiveDeltaHint(void *pdata, int dataLen) | RNReplicaNet::DataBlock | [virtual]
GiveDeltaHint(float delta) | RNReplicaNet::DataBlock | [inline]
IsAllocated(void) const | RNReplicaNet::DataBlock | [virtual]
IsAttached(void *data) | RNReplicaNet::DataBlock | [virtual]
kStop enum value | RNReplicaNet::DataBlock |
kSuddenChange enum value | RNReplicaNet::DataBlock |
kTeleport enum value | RNReplicaNet::DataBlock |
mAutomaticUpdates (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mBoundObject (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mBoundReplicaNet (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mCertain (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mDebugOn (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mDebugText (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mForceSendMaximumUpdates (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mForceSendTimeDelay (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mID (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mIsAllocated (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mReliable (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mUpdateDelayMinimum (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mVariableName (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
ParseMessage(MessageHelper *message) | RNReplicaNet::DataBlock | [virtual]
Poll(DataBlockReason *reason=0) | RNReplicaNet::DataBlock | [virtual]
ReplicaObject (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [friend]
SetAutomaticUpdatesFlag(bool automatic=true) | RNReplicaNet::DataBlock |
SetCertainFlag(bool certain=false) | RNReplicaNet::DataBlock |
SetForceSendMaximumUpdates(const int updates=0) | RNReplicaNet::DataBlock |
SetForceSendTimeDelay(const float delay=0.0f) | RNReplicaNet::DataBlock |
SetID(int id) | RNReplicaNet::DataBlock | [protected]
SetIsAllocated(const bool isAllocated=true) | RNReplicaNet::DataBlock |
SetReliableFlag(bool reliable=false) | RNReplicaNet::DataBlock |
SetUpdateDelayMinimum(const float delay=0.0f) | RNReplicaNet::DataBlock |
SetVariableName(const char *name=0) | RNReplicaNet::DataBlock |
~DataBlock() | RNReplicaNet::DataBlock | [virtual]

Generated on Sun Oct 30 01:11:56 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::DataBlock_Function Member List

This is the complete list of members for RNReplicaNet::DataBlock_Function, including all inherited members.

AddFunctionStateChange(void *data, int len, const char *debug=0) (defined in RNReplicaNet::DataBlock_Function) | RNReplicaNet::DataBlock_Function |
BindReplicaNet(ReplicaNet *current) | RNReplicaNet::DataBlock |
BindReplicaObject(ReplicaObject *object) | RNReplicaNet::DataBlock |
ContinuityBreak(unsigned char breakTypes) | RNReplicaNet::DataBlock | [virtual]
ContinuityBreakTypes enum name | RNReplicaNet::DataBlock |
DataBlock() | RNReplicaNet::DataBlock |
DataBlock_Function() | RNReplicaNet::DataBlock_Function |
EmitBaseDebugInfo(const char *name, const char *className, DataBlockReason *reason) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
EmitBaseDebugInfoUpdates(const char *name, const char *className, DataBlockReason *reason) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GetAutomaticUpdatesFlag(void) | RNReplicaNet::DataBlock |
GetCertainFlag(void) | RNReplicaNet::DataBlock |
GetForceSendMaximumUpdates(void) const | RNReplicaNet::DataBlock |
GetForceSendTimeDelay(void) const | RNReplicaNet::DataBlock |
GetReliableFlag(void) | RNReplicaNet::DataBlock |
GetROName(ReplicaObject *from=0) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GetUpdateDelayMinimum(void) const | RNReplicaNet::DataBlock |
GetVariableName(void) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GiveDeltaHint(void *pdata, int dataLen) | RNReplicaNet::DataBlock | [virtual]
GiveDeltaHint(float delta) | RNReplicaNet::DataBlock | [inline]
IsAllocated(void) const | RNReplicaNet::DataBlock | [virtual]
IsAttached(void *data) | RNReplicaNet::DataBlock_Function | [virtual]
kStop enum value | RNReplicaNet::DataBlock |
kSuddenChange enum value | RNReplicaNet::DataBlock |
kTeleport enum value | RNReplicaNet::DataBlock |
mAutomaticUpdates (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mBoundObject (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mBoundReplicaNet (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mCertain (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mDebugOn (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mDebugText (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mForceSendMaximumUpdates (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mForceSendTimeDelay (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mID (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mIsAllocated (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mReliable (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mUpdateDelayMinimum (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mVariableName (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
ParseMessage(MessageHelper *message) | RNReplicaNet::DataBlock_Function | [virtual]
Poll(DataBlockReason *reason) | RNReplicaNet::DataBlock_Function | [virtual]
Register(void *classp, void *funcp) | RNReplicaNet::DataBlock_Function | [static]
RegisterInClassPointer(void *classp, void *funcp) | RNReplicaNet::DataBlock_Function | [inline]
SetAutomaticUpdatesFlag(bool automatic=true) | RNReplicaNet::DataBlock |
SetCertainFlag(bool certain=false) | RNReplicaNet::DataBlock |
SetForceSendMaximumUpdates(const int updates=0) | RNReplicaNet::DataBlock |
SetForceSendTimeDelay(const float delay=0.0f) | RNReplicaNet::DataBlock |
SetID(int id) | RNReplicaNet::DataBlock | [protected]
SetIsAllocated(const bool isAllocated=true) | RNReplicaNet::DataBlock |
SetReliableFlag(bool reliable=false) | RNReplicaNet::DataBlock |
SetSessionIDFilter(const int numSessionIDs=0, const int *sessionIDs=0) | RNReplicaNet::DataBlock_Function | [static]
SetUpdateDelayMinimum(const float delay=0.0f) | RNReplicaNet::DataBlock |
SetVariableName(const char *name=0) | RNReplicaNet::DataBlock |
~DataBlock() | RNReplicaNet::DataBlock | [virtual]
~DataBlock_Function() | RNReplicaNet::DataBlock_Function | [virtual]

Generated on Sun Oct 30 01:11:57 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::DataBlock_NData Member List

This is the complete list of members for RNReplicaNet::DataBlock_NData, including all inherited members.

BindReplicaNet(ReplicaNet *current) | RNReplicaNet::DataBlock |
BindReplicaObject(ReplicaObject *object) | RNReplicaNet::DataBlock |
ContinuityBreak(unsigned char breakTypes) | RNReplicaNet::DataBlock | [virtual]
ContinuityBreakTypes enum name | RNReplicaNet::DataBlock |
DataBlock() | RNReplicaNet::DataBlock |
DataBlock_NData() | RNReplicaNet::DataBlock_NData |
EmitBaseDebugInfo(const char *name, const char *className, DataBlockReason *reason) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
EmitBaseDebugInfoUpdates(const char *name, const char *className, DataBlockReason *reason) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GetAutomaticUpdatesFlag(void) | RNReplicaNet::DataBlock |
GetCertainFlag(void) | RNReplicaNet::DataBlock |
GetEndianTest(void) const (defined in RNReplicaNet::DataBlock_NData) | RNReplicaNet::DataBlock_NData |
GetForceSendMaximumUpdates(void) const | RNReplicaNet::DataBlock |
GetForceSendTimeDelay(void) const | RNReplicaNet::DataBlock |
GetReliableFlag(void) | RNReplicaNet::DataBlock |
GetROName(ReplicaObject *from=0) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GetUpdateDelayMinimum(void) const | RNReplicaNet::DataBlock |
GetVariableName(void) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GiveDeltaHint(void *pdata, int dataLen) | RNReplicaNet::DataBlock | [virtual]
GiveDeltaHint(float delta) | RNReplicaNet::DataBlock | [inline]
IsAllocated(void) const | RNReplicaNet::DataBlock | [virtual]
IsAttached(void *data) | RNReplicaNet::DataBlock_NData | [virtual]
kStop enum value | RNReplicaNet::DataBlock |
kSuddenChange enum value | RNReplicaNet::DataBlock |
kTeleport enum value | RNReplicaNet::DataBlock |
mAutomaticUpdates (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mBoundObject (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mBoundReplicaNet (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mCertain (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mDebugOn (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mDebugText (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mForceSendMaximumUpdates (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mForceSendTimeDelay (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mID (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mIsAllocated (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mReliable (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mUpdateDelayMinimum (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mVariableName (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
ParseMessage(MessageHelper *message) | RNReplicaNet::DataBlock_NData | [virtual]
Poll(DataBlockReason *reason) | RNReplicaNet::DataBlock_NData | [virtual]
Register(void *const data, const int size) | RNReplicaNet::DataBlock_NData | [static]
RegisterInClassPointer(void *const data, const int size) | RNReplicaNet::DataBlock_NData | [inline]
SetAutomaticUpdatesFlag(bool automatic=true) | RNReplicaNet::DataBlock |
SetCertainFlag(bool certain=false) | RNReplicaNet::DataBlock |
SetDefaultData(const void *data) | RNReplicaNet::DataBlock_NData |
SetEndianTest(const bool test=true) (defined in RNReplicaNet::DataBlock_NData) | RNReplicaNet::DataBlock_NData |
SetForceSendMaximumUpdates(const int updates=0) | RNReplicaNet::DataBlock |
SetForceSendTimeDelay(const float delay=0.0f) | RNReplicaNet::DataBlock |
SetID(int id) | RNReplicaNet::DataBlock | [protected]
SetIsAllocated(const bool isAllocated=true) | RNReplicaNet::DataBlock |
SetReliableFlag(bool reliable=false) | RNReplicaNet::DataBlock |
SetUpdateDelayMinimum(const float delay=0.0f) | RNReplicaNet::DataBlock |
SetVariableName(const char *name=0) | RNReplicaNet::DataBlock |
~DataBlock() | RNReplicaNet::DataBlock | [virtual]
~DataBlock_NData() | RNReplicaNet::DataBlock_NData | [virtual]

Generated on Sun Oct 30 01:11:57 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::DataBlock_Predict_Float Member List

This is the complete list of members for RNReplicaNet::DataBlock_Predict_Float, including all inherited members.

BindReplicaNet(ReplicaNet *current) | RNReplicaNet::DataBlock |
BindReplicaObject(ReplicaObject *object) | RNReplicaNet::DataBlock |
ContinuityBreak(unsigned char breakTypes) | RNReplicaNet::DataBlock_Predict_Float | [virtual]
ContinuityBreakTypes enum name | RNReplicaNet::DataBlock |
DataBlock() | RNReplicaNet::DataBlock |
DataBlock_Predict_Float() | RNReplicaNet::DataBlock_Predict_Float |
EmitBaseDebugInfo(const char *name, const char *className, DataBlockReason *reason) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
EmitBaseDebugInfoUpdates(const char *name, const char *className, DataBlockReason *reason) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GetAutomaticUpdatesFlag(void) | RNReplicaNet::DataBlock |
GetCertainFlag(void) | RNReplicaNet::DataBlock |
GetForceSendMaximumUpdates(void) const | RNReplicaNet::DataBlock |
GetForceSendTimeDelay(void) const | RNReplicaNet::DataBlock |
GetReliableFlag(void) | RNReplicaNet::DataBlock |
GetROName(ReplicaObject *from=0) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GetUpdateDelayMinimum(void) const | RNReplicaNet::DataBlock |
GetVariableName(void) (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
GiveDeltaHint(void *pdata, int dataLen) | RNReplicaNet::DataBlock_Predict_Float | [virtual]
GiveDeltaHint(const float delta) | RNReplicaNet::DataBlock_Predict_Float | [virtual]
IsAllocated(void) const | RNReplicaNet::DataBlock | [virtual]
IsAttached(void *data) | RNReplicaNet::DataBlock_Predict_Float | [virtual]
kStop enum value | RNReplicaNet::DataBlock |
kSuddenChange enum value | RNReplicaNet::DataBlock |
kTeleport enum value | RNReplicaNet::DataBlock |
mAutomaticUpdates (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mBoundObject (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mBoundReplicaNet (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mCertain (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mDebugOn (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mDebugText (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mForceSendMaximumUpdates (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mForceSendTimeDelay (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mID (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mIsAllocated (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mReliable (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mUpdateDelayMinimum (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
mVariableName (defined in RNReplicaNet::DataBlock) | RNReplicaNet::DataBlock | [protected]
ParseMessage(MessageHelper *message) | RNReplicaNet::DataBlock_Predict_Float | [virtual]
Poll(DataBlockReason *reason) | RNReplicaNet::DataBlock_Predict_Float | [virtual]
Register(float *data) | RNReplicaNet::DataBlock_Predict_Float | [static]
RegisterInClassPointer(float *data) | RNReplicaNet::DataBlock_Predict_Float | [inline]
SetAutomaticUpdatesFlag(bool automatic=true) | RNReplicaNet::DataBlock |
SetCertainFlag(bool certain=false) | RNReplicaNet::DataBlock |
SetForceSendMaximumUpdates(const int updates=0) | RNReplicaNet::DataBlock |
SetForceSendTimeDelay(const float delay=0.0f) | RNReplicaNet::DataBlock |
SetID(int id) | RNReplicaNet::DataBlock | [protected]
SetInterpolationFilter(float interpolation=0.1f) | RNReplicaNet::DataBlock_Predict_Float |
SetIsAllocated(const bool isAllocated=true) | RNReplicaNet::DataBlock |
SetLinear(void) | RNReplicaNet::DataBlock_Predict_Float | [inline]
SetMaxDistance(float distance=1.0f) | RNReplicaNet::DataBlock_Predict_Float |
SetMaxError(float maxerror=1.0f) | RNReplicaNet::DataBlock_Predict_Float |
SetMinDistance(float distance=0.1f) | RNReplicaNet::DataBlock_Predict_Float |
SetMinError(float minerror=0.1f) | RNReplicaNet::DataBlock_Predict_Float |
SetQuadratic(void) | RNReplicaNet::DataBlock_Predict_Float | [inline]
SetReliableFlag(bool reliable=false) | RNReplicaNet::DataBlock |
SetUpdateDelayMinimum(const float delay=0.0f) | RNReplicaNet::DataBlock |
SetVariableName(const char *name=0) | RNReplicaNet::DataBlock |
~DataBlock() | RNReplicaNet::DataBlock | [virtual]
~DataBlock_Predict_Float() | RNReplicaNet::DataBlock_Predict_Float | [virtual]

Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::ReplicaNet Member List

This is the complete list of members for RNReplicaNet::ReplicaNet, including all inherited members.

AddObject(ReplicaObject *const object) | RNReplicaNet::ReplicaNet |
BeginSessionPlayback(void) | RNReplicaNet::ReplicaNet |
BeginSessionRecord(void) | RNReplicaNet::ReplicaNet |
CallBackAllocate(const int classID, const int sessionID, const int uniqueID) | RNReplicaNet::ReplicaNet | [virtual]
CallBackDelete(ReplicaObject *object) | RNReplicaNet::ReplicaNet | [virtual]
CallbackSessionPlayback(void *data, const int length) | RNReplicaNet::ReplicaNet | [virtual]
CallbackSessionRecord(const void *data, const int length) | RNReplicaNet::ReplicaNet | [virtual]
DataReceive(int *const fromsessionid, void *const data, int *const length, PacketType *const type=0) | RNReplicaNet::ReplicaNet |
DataSend(const int sessionid, const void *data, const int length, const PacketType type=kPacket_Reliable) | RNReplicaNet::ReplicaNet |
Disconnect(const int sessionID=kReplicaNetUnknownUniqueID) | RNReplicaNet::ReplicaNet |
Error enum name | RNReplicaNet::ReplicaNet |
GetAllowConnections(void) | RNReplicaNet::ReplicaNet |
GetAutomaticPacketCompression(void) | RNReplicaNet::ReplicaNet |
GetBandwidthFromSessionID(const int sessionID, Transport::Bandwidth *const bandwidth, int *const output, int *const input) | RNReplicaNet::ReplicaNet |
GetCanAcceptObjects(void) | RNReplicaNet::ReplicaNet |
GetCanBecomeMaster(void) | RNReplicaNet::ReplicaNet |
GetCanSpider(void) | RNReplicaNet::ReplicaNet |
GetClientOnly(void) | RNReplicaNet::ReplicaNet |
GetCompressionStatistics(int *const before=0, int *const after=0, const bool reset=false) | RNReplicaNet::ReplicaNet |
GetCurrentReplicaNet(void) | RNReplicaNet::ReplicaNet | [static]
GetDataBlockUpdatePolicy(void) const | RNReplicaNet::ReplicaNet |
GetDataRetention(void) const | RNReplicaNet::ReplicaNet |
GetEncryption(void) | RNReplicaNet::ReplicaNet |
GetGameChannel(void) | RNReplicaNet::ReplicaNet |
GetLatencyToMasterSession(void) | RNReplicaNet::ReplicaNet |
GetLoadBalancing(void) | RNReplicaNet::ReplicaNet |
GetLocalTime(void) | RNReplicaNet::ReplicaNet | [virtual]
GetMasterSessionID(void) | RNReplicaNet::ReplicaNet |
GetMaximumLoad(int sessionID=kReplicaNetUnknownUniqueID) | RNReplicaNet::ReplicaNet |
GetMergedStatistics(int *const sent=0, int *const received=0, const bool reset=false) | RNReplicaNet::ReplicaNet |
GetNetworkPacketsLost(void) | RNReplicaNet::ReplicaNet |
GetNetworkReceiveRate(void) | RNReplicaNet::ReplicaNet |
GetNetworkSendRate(void) | RNReplicaNet::ReplicaNet |
GetNodeBuffers(void) | RNReplicaNet::ReplicaNet |
GetObserver(void) | RNReplicaNet::ReplicaNet |
GetOnSessionErrorMigrateObjects(void) | RNReplicaNet::ReplicaNet |
GetPlaybackAllowMasterReplicaObjects(void) | RNReplicaNet::ReplicaNet |
GetPollLayerBelow(void) | RNReplicaNet::ReplicaNet |
GetPollLayerBelowForXPSession(void) | RNReplicaNet::ReplicaNet |
GetPreConnect(void) | RNReplicaNet::ReplicaNet |
GetPreConnectStatus(void) | RNReplicaNet::ReplicaNet |
GetSessionErrorReason(void) | RNReplicaNet::ReplicaNet |
GetSessionID(void) | RNReplicaNet::ReplicaNet |
GetSessionPlayback(void) const | RNReplicaNet::ReplicaNet |
GetSessionRecord(void) const | RNReplicaNet::ReplicaNet |
GetStatus(void) | RNReplicaNet::ReplicaNet |
GetTime(void) | RNReplicaNet::ReplicaNet | [virtual]
GetTotalLoad(int sessionID=kReplicaNetUnknownUniqueID) | RNReplicaNet::ReplicaNet |
GetURLFromSessionID(const int sessionID) | RNReplicaNet::ReplicaNet |
GiveOwnership(ReplicaObject *const object, const int sessionID) | RNReplicaNet::ReplicaNet |
IsMaster(void) | RNReplicaNet::ReplicaNet |
IsStable(void) | RNReplicaNet::ReplicaNet |
JoinerSessionIDPost(const int sessionID) | RNReplicaNet::ReplicaNet | [virtual]
JoinerSessionIDPre(const int sessionID) | RNReplicaNet::ReplicaNet | [virtual]
kDeleteObjects enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
kLeaveObjects enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
kMigrateObjects enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
kPacket_Certain enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
kPacket_Reliable enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
kPacket_Unreliable enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
kReplicaNet_EEND_RECORDING enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
kReplicaNet_EERROR enum value | RNReplicaNet::ReplicaNet |
kReplicaNet_EOK enum value | RNReplicaNet::ReplicaNet |
kReplicaNet_ETRANSPORT_CLOSED enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
kReplicaNet_ETRANSPORT_ERROR enum value (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
LeaverSessionIDPost(const int sessionID) | RNReplicaNet::ReplicaNet | [virtual]
LeaverSessionIDPre(const int sessionID) | RNReplicaNet::ReplicaNet | [virtual]
LockObjects(void) | RNReplicaNet::ReplicaNet |
ObjectListBeginIterate(void) | RNReplicaNet::ReplicaNet |
ObjectListFinishIterate(void) | RNReplicaNet::ReplicaNet |
ObjectListIterate(void) | RNReplicaNet::ReplicaNet |
OnError enum name (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
PacketType enum name (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet |
PlaybackAdvanceTo(const float time) | RNReplicaNet::ReplicaNet |
Poll(void) | RNReplicaNet::ReplicaNet |
PreConnectHasFinished(void) | RNReplicaNet::ReplicaNet |
PreRegisterReplicas(void) | RNReplicaNet::ReplicaNet | [virtual]
ProcessDataBlockUpdate(void) | RNReplicaNet::ReplicaNet |
RemoveObject(ReplicaObject *const object) | RNReplicaNet::ReplicaNet |
ReplicaNet() | RNReplicaNet::ReplicaNet |
ReplicaNetDLLRegister (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet | [friend]
ReplicaNetPrivate (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet | [friend]
ReplicaObject (defined in RNReplicaNet::ReplicaNet) | RNReplicaNet::ReplicaNet | [friend]
RequestOwnership(ReplicaObject *const object) | RNReplicaNet::ReplicaNet |
SessionCreate(const std::string name) | RNReplicaNet::ReplicaNet |
SessionCreate(const std::string name, const std::string protocols) | RNReplicaNet::ReplicaNet |
SessionEnumerateFound(void) | RNReplicaNet::ReplicaNet |
SessionExportURL(void) | RNReplicaNet::ReplicaNet |
SessionFind(void) | RNReplicaNet::ReplicaNet |
SessionJoin(const std::string url) | RNReplicaNet::ReplicaNet |
SetAllowConnections(const bool allow=true) | RNReplicaNet::ReplicaNet |
SetAutomaticPacketCompression(const bool enable=false) | RNReplicaNet::ReplicaNet |
SetAutomaticPoll(void) | RNReplicaNet::ReplicaNet |
SetAutomaticPollXPSession(void) | RNReplicaNet::ReplicaNet |
SetAutomaticPollXPURL(void) | RNReplicaNet::ReplicaNet |
SetCanAcceptObjects(bool accept=true) | RNReplicaNet::ReplicaNet |
SetCanBecomeMaster(const bool canBeMaster=true) | RNReplicaNet::ReplicaNet |
SetCanSpider(const bool canSpider=true) | RNReplicaNet::ReplicaNet |
SetClientOnly(const bool isClient=false) | RNReplicaNet::ReplicaNet |
SetCurrentReplicaNet(ReplicaNet *const replicanet) | RNReplicaNet::ReplicaNet | [static]
SetDataBlockUpdatePolicy(const bool automatic=true) | RNReplicaNet::ReplicaNet |
SetDataRetention(const bool enable=false) | RNReplicaNet::ReplicaNet |
SetEncryption(const bool enable=false) | RNReplicaNet::ReplicaNet |
SetGameChannel(const int channel=TransportAnyGameChannel) | RNReplicaNet::ReplicaNet |
SetLatencyRecalculationDelay(const float seconds=1.0f) | RNReplicaNet::ReplicaNet |
SetLoadBalancing(const bool enable=false) | RNReplicaNet::ReplicaNet |
SetManualPoll(void) | RNReplicaNet::ReplicaNet |
SetManualPollXPSession(void) | RNReplicaNet::ReplicaNet |
SetManualPollXPURL(void) | RNReplicaNet::ReplicaNet |
SetMaximumLoad(float load=0.0f) | RNReplicaNet::ReplicaNet |
SetNodeBuffers(const bool enable=false) | RNReplicaNet::ReplicaNet |
SetObserver(ReplicaObject *const object=0) | RNReplicaNet::ReplicaNet |
SetOnSessionError(const OnError whatToDo=kMigrateObjects) | RNReplicaNet::ReplicaNet |
SetPlaybackAllowMasterReplicaObjects(const bool allow=false) | RNReplicaNet::ReplicaNet |
SetPlaybackSpeed(const float speed=1.0f) | RNReplicaNet::ReplicaNet |
SetPollLayerBelow(bool enable=true) | RNReplicaNet::ReplicaNet |
SetPollLayerBelowForXPSession(bool enable=true) | RNReplicaNet::ReplicaNet |
SetPreConnect(const bool enable=false) | RNReplicaNet::ReplicaNet |
StopSessionPlayback(void) | RNReplicaNet::ReplicaNet |
StopSessionRecord(void) | RNReplicaNet::ReplicaNet |
UnLockObjects(void) | RNReplicaNet::ReplicaNet |
~ReplicaNet() | RNReplicaNet::ReplicaNet | [virtual]

Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::ReplicaNetDLLRegister Member List

This is the complete list of members for RNReplicaNet::ReplicaNetDLLRegister, including all inherited members.

Call(ReplicaNet *repNet) (defined in RNReplicaNet::ReplicaNetDLLRegister) | RNReplicaNet::ReplicaNetDLLRegister |
ReplicaNetDLLRegister() (defined in RNReplicaNet::ReplicaNetDLLRegister) | RNReplicaNet::ReplicaNetDLLRegister | [inline]
~ReplicaNetDLLRegister() (defined in RNReplicaNet::ReplicaNetDLLRegister) | RNReplicaNet::ReplicaNetDLLRegister | [inline, virtual]

Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::ReplicaObject Member List

This is the complete list of members for RNReplicaNet::ReplicaObject, including all inherited members.

_DebugInternal_EmitClassCreate(const int packetSize, const int toSession) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected]
_DebugInternal_EmitClassDelete(const int packetSize, const int toSession) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected]
_Internal_GetFullyQualifiedName(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected]
_Internal_GetUpdateType(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected, virtual]
_Internal_SetFullyQualifiedName(const char *name=0) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected]
_Internal_SetupLoadBalance(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected, virtual]
_Internal_SetupLoadBalanceDefault(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected, virtual]
_Internal_SetupLoadBalanceScore(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected, virtual]
_Internal_SetupLoadBalanceScoreDefault(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected, virtual]
_Internal_SetupOpaquePointer(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected, virtual]
_Internal_SetupPropagateDistance(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected, virtual]
_Internal_SetupPropagateDistanceDefault(void) (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected, virtual]
AddAutoRegisterDataBlock(DataBlock *const dataBlock) | RNReplicaNet::ReplicaObject |
AllocateForReplicaNet(void) | RNReplicaNet::ReplicaObject | [static]
ApproveFault(void) | RNReplicaNet::ReplicaObject | [virtual]
ApproveMigration(void) | RNReplicaNet::ReplicaObject | [virtual]
CalculateDistanceToObject(ReplicaObject *object) | RNReplicaNet::ReplicaObject | [virtual]
ContinuityBreak(float &variable, unsigned char breakTypes) | RNReplicaNet::ReplicaObject |
DataBlock (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [friend]
DataBlockPacketDataReceived(const DataBlock *datablock) | RNReplicaNet::ReplicaObject | [virtual]
DeleteForReplicaNet(ReplicaObject *object) | RNReplicaNet::ReplicaObject | [static]
FindDataBlock(void *pdata) | RNReplicaNet::ReplicaObject |
GetBoundReplicaNet(void) | RNReplicaNet::ReplicaObject |
GetClassID(void)=0 | RNReplicaNet::ReplicaObject | [pure virtual]
GetDistanceToObject(ReplicaObject *object) | RNReplicaNet::ReplicaObject |
GetLoadBalancing(void) | RNReplicaNet::ReplicaObject |
GetLoadScore(void) | RNReplicaNet::ReplicaObject |
GetMessageReflectionID(void) const | RNReplicaNet::ReplicaObject |
GetOpaquePointer(void *data=0) | RNReplicaNet::ReplicaObject | [virtual]
GetPropagateToSessionDistance(void) const | RNReplicaNet::ReplicaObject |
GetRegistered(void)=0 | RNReplicaNet::ReplicaObject | [pure virtual]
GetRegistryBlock(void) const =0 | RNReplicaNet::ReplicaObject | [pure virtual]
GetSessionID(void) | RNReplicaNet::ReplicaObject |
GetSessionPropagationFilter(void) const | RNReplicaNet::ReplicaObject |
GetSessionPropagationSet(std::set< int > &theSet) | RNReplicaNet::ReplicaObject |
GetUniqueID(void) | RNReplicaNet::ReplicaObject |
GiveDeltaHint(float &variable, float delta) | RNReplicaNet::ReplicaObject |
GiveOwnership(int sessionID) | RNReplicaNet::ReplicaObject |
IsMaster(void) const | RNReplicaNet::ReplicaObject |
IsReplica(void) const | RNReplicaNet::ReplicaObject |
mDataBlocksRegistered (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [protected]
OwnerChange(void) | RNReplicaNet::ReplicaObject | [virtual]
PostObjectCreate(void) | RNReplicaNet::ReplicaObject | [virtual]
Publish(void) | RNReplicaNet::ReplicaObject |
RegisterDataBlock(DataBlock *block) | RNReplicaNet::ReplicaObject | [protected, virtual]
ReplicaNet (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [friend]
ReplicaNetPrivate (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [friend]
ReplicaObject() | RNReplicaNet::ReplicaObject |
RequestOwnership(void) | RNReplicaNet::ReplicaObject |
SessionPropagationAddSession(const int sessionID) | RNReplicaNet::ReplicaObject |
SessionPropagationRemoveSession(const int sessionID) | RNReplicaNet::ReplicaObject |
SessionUnique (defined in RNReplicaNet::ReplicaObject) | RNReplicaNet::ReplicaObject | [friend]
SetLoadBalancing(const bool enable=false) | RNReplicaNet::ReplicaObject |
SetLoadBalancingDefault(const bool defaultValue=false) | RNReplicaNet::ReplicaObject |
SetLoadScore(const float load=0.0f) | RNReplicaNet::ReplicaObject |
SetLoadScoreDefault(const float defaultLoad=0.0f) | RNReplicaNet::ReplicaObject |
SetMessageReflectionID(const int sessionID=kReplicaObjectUnknownUniqueID) | RNReplicaNet::ReplicaObject |
SetOpaquePointer(void *data) | RNReplicaNet::ReplicaObject | [virtual]
SetPropagateToSessionDistance(const float distance=kReplicaObject_InfiniteDistance) | RNReplicaNet::ReplicaObject |
SetPropagateToSessionDistanceDefault(const float distance=kReplicaObject_InfiniteDistance) | RNReplicaNet::ReplicaObject |
SetPropagateToSessionDistanceRecalculationDelay(const float delay=0.1f) | RNReplicaNet::ReplicaObject |
SetRegistered(bool flag=true)=0 | RNReplicaNet::ReplicaObject | [pure virtual]
SetSessionPropagationFilter(const bool enable=false) | RNReplicaNet::ReplicaObject |
UpdateIsCertain(void) | RNReplicaNet::ReplicaObject |
UpdateIsReliable(void) | RNReplicaNet::ReplicaObject |
UpdateIsUnreliable(void) | RNReplicaNet::ReplicaObject |
UpdateSetCertain(void) | RNReplicaNet::ReplicaObject |
UpdateSetReliable(void) | RNReplicaNet::ReplicaObject |
UpdateSetUnreliable(void) | RNReplicaNet::ReplicaObject |
UserRegisterDataBlocks(void) | RNReplicaNet::ReplicaObject | [virtual]
~ReplicaObject() | RNReplicaNet::ReplicaObject | [virtual]

Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: DataBlock.h Source File

DataBlock.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __DATABLOCK_H__
00012 #define __DATABLOCK_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014 #include <string>
00015
00016 namespace RNReplicaNet
00017 {
00018
00019 class MessageHelper;
00020 class ReplicaNet;
00021 class ReplicaObject;
00022
00023 const int kDataBlockReason_SomeoneJoined            = 0;
00024 const int kDataBlockReason_SomeoneLeft              = 1;
00025 const int kDataBlockReason_NormalPoll               = 2;
00026 const int kDataBlockReason_CalculateReplicaPoll     = 4;
00027 const int kDataBlockReason_CalculateMasterPoll      = 5;
00028 const int kDataBlockReason_MasterPrepAfterTakeover  = 6;
00029 const int kDataBlockReason_ReplicaCallBackPoll      = 7;
00030 const int kDataBlockReason_ReplicaPrepAfterTakeover = 8;
00031 const int kDataBlockReason_RecordingNormalPoll      = 9;
00033 struct DataBlockReason;
00034
00041 class REPLICANETDLL_API DataBlock
00042 {
00043 friend class ReplicaObject;
00044 public:
00048     DataBlock();
00049
00053     virtual ~DataBlock();
00054
00059     virtual void Poll(DataBlockReason *reason = 0);
00060
00065     virtual void ParseMessage(MessageHelper *message);
00066
00072     void SetVariableName(const char *name = 0);
00073
00078     void BindReplicaNet(ReplicaNet *current);
00079
00084     void BindReplicaObject(ReplicaObject *object);
00085
00090     void SetReliableFlag(bool reliable = false);
00091
00096     bool GetReliableFlag(void);
00097
00102     void SetCertainFlag(bool certain = false);
00103
00108     bool GetCertainFlag(void);
00109
00114     void SetAutomaticUpdatesFlag(bool automatic = true);
00115
00120     bool GetAutomaticUpdatesFlag(void);
00121
00127     virtual void GiveDeltaHint(void *pdata,int dataLen);
00128
00133     void GiveDeltaHint(float delta)
00134     {
00135         GiveDeltaHint(&delta,sizeof(delta));
00136     }
00137
00141     enum ContinuityBreakTypes
00142     {
00143         kStop = 1,
00144         kSuddenChange = 2,
00145         kTeleport = 4
00146     };
00147
00152     virtual void ContinuityBreak(unsigned char breakTypes);
00153
00158     virtual bool IsAttached(void *data);
00159
00164     virtual bool IsAllocated(void) const;
00165
00170     void SetIsAllocated(const bool isAllocated = true);
00171
00172
00182     void SetUpdateDelayMinimum(const float delay = 0.0f);
00183
00188     float GetUpdateDelayMinimum(void) const;
00189
00201     void SetForceSendMaximumUpdates(const int updates = 0);
00202
00207     int GetForceSendMaximumUpdates(void) const;
00208
00218     void SetForceSendTimeDelay(const float delay = 0.0f);
00219
00224     float GetForceSendTimeDelay(void) const;
00225
00226 protected:
00230     void SetID(int id);
00231
00232     const char *GetROName(ReplicaObject *from = 0);
00233
00234     void EmitBaseDebugInfo(const char *name,const char *className,DataBlockReason *reason);
00235     void EmitBaseDebugInfoUpdates(const char *name,const char *className,DataBlockReason *reason);
00236
00237     std::string GetVariableName(void);
00238
00239     short mID;
00240     ReplicaNet *mBoundReplicaNet;
00241     ReplicaObject *mBoundObject;
00242     bool mReliable;
00243     bool mCertain;
00244     bool mAutomaticUpdates;
00245     bool mIsAllocated;
00246     bool mDebugOn;
00247     char *mDebugText;
00248     float mUpdateDelayMinimum;
00249     int mForceSendMaximumUpdates;
00250     float mForceSendTimeDelay;
00251     char *mVariableName;
00252 };
00253
00257 struct REPLICANETDLL_API DataBlockReason
00258 {
00259 public:
00265     DataBlockReason(int code = kDataBlockReason_NormalPoll,int session = -1,ReplicaObject *object = 0)
00266     {
00267         mReasonCode = code;
00268         mSessionReference = session;
00269         mObserver = object;
00270         mFloatValue = 0.0f;
00271         mFloatTime = -1.0f;
00272     }
00273
00274     int mReasonCode;
00275     int mSessionReference;
00276     MessageHelper *mMessageHelper;
00277     ReplicaObject *mObserver;
00278     float mFloatValue;
00279     float mFloatTime;
00280     float mFloatLocalTime;
00281 };
00282
00283 // This macro is used to finish any data block registration for a ReplicaObject
00284 /* _RO_DO_REGISTERBLOCK_END macro starts here */
00285 #define _RO_DO_REGISTERBLOCK_END()  \
00286         RegisterDataBlock(datablock);   \
00287     }
00288 /* _RO_DO_REGISTERBLOCK_END macro ends here */
00289
00290 } // namespace RNReplicaNet
00291
00292 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: DataBlock_Function.h Source File

DataBlock_Function.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __DATABLOCK_FUNCTION_H__
00012 #define __DATABLOCK_FUNCTION_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 #include "RNReplicaNet/Inc/DataBlock.h"
00016 #include "RNPlatform/Inc/MessageHelper.h"
00017 #include <list>
00018
00019 namespace RNReplicaNet
00020 {
00021
00022 struct CombinedDataPacket;
00023 struct SessionBlock_Function;
00024
00049 class REPLICANETDLL_API DataBlock_Function : public DataBlock
00050 {
00051 public:
00055     DataBlock_Function();
00056
00060     virtual ~DataBlock_Function();
00061
00062     virtual void Poll(DataBlockReason *reason);
00063
00064     virtual void ParseMessage(MessageHelper *message);
00065
00072     static DataBlock_Function *Register(void *classp,void *funcp);
00073
00079     void RegisterInClassPointer(void *classp,void *funcp)
00080     {
00081         mClassp = classp;
00082         mData = funcp;
00083     }
00084
00091     static void SetSessionIDFilter(const int numSessionIDs = 0,const int *sessionIDs = 0);
00092
00093     void AddFunctionStateChange(void *data,int len,const char *debug = 0);
00094
00095     bool IsAttached(void *data);
00096
00097 private:
00098     void *mClassp;
00099     void *mData;
00100
00101     std::list<SessionBlock_Function *> mPerSessionFunction;
00102
00103     std::list<CombinedDataPacket *> mFunctionStateChanges;
00104
00105     static int mConfiguredNumSessions;
00106     static int *mConfiguredSessionIDs;
00107 };
00108
00109 } // namespace RNReplicaNet
00110
00111
00112 /* _RO_DO_REGISTERBLOCK_FUNCTION_VAR macro starts here */
00113 #define _RO_DO_REGISTERBLOCK_FUNCTION_VAR(x)    \
00114     {\
00115         RNReplicaNet::DataBlock_Function *datablock = 0;    \
00116         datablock = RNReplicaNet::DataBlock_Function::Register((void *)this,(void *)&x);    \
00117         mDataBlockFunction_##x = datablock; \
00118         _RO_DO_SETDATABLOCKVARIABLENAME(x);
00119 /* _RO_DO_REGISTERBLOCK_FUNCTION_VAR macro ends here */
00120
00121 // For member function wrapping. A lot of macro work
00122 /* _RO_MAKE_MEMBERFUNC macro starts here */
00123 #define _RO_MAKE_MEMBERFUNC(x)  Call_##x
00124 /* _RO_MAKE_MEMBERFUNC macro ends here */
00125
00126 /* _RO_DO_MEMBERFUNC_PRESTAGE_DEF macro starts here */
00127 #define _RO_DO_MEMBERFUNC_PRESTAGE_DEF(x,y) \
00128 void _MAKE_RO(x)::_RO_MAKE_MEMBERFUNC(y)(
00129 /* _RO_DO_MEMBERFUNC_PRESTAGE_DEF macro ends here */
00130
00131
00132 /* _RO_DO_MEMBERFUNC_PRESTAGE macro starts here */
00133 #ifdef REPLICANET_VISUALDEBUGGER
00134 #define _RO_DO_MEMBERFUNC_PRESTAGE(x)   \
00135 )   \
00136 {   \
00137     char buffer[256];   \
00138     RNReplicaNet::MessageHelper message;    \
00139     message.SetBuffer(buffer);  \
00140     std::string debug;
00141 #else //ifdef REPLICANET_VISUALDEBUGGER
00142 #define _RO_DO_MEMBERFUNC_PRESTAGE(x)   \
00143 )   \
00144 {   \
00145     char buffer[256];   \
00146     RNReplicaNet::MessageHelper message;    \
00147     message.SetBuffer(buffer);
00148 #endif //ifdef REPLICANET_VISUALDEBUGGER
00149 /* _RO_DO_MEMBERFUNC_PRESTAGE macro ends here */
00150
00151 /* _RO_DO_MEMBERFUNC_ADDVAR macro starts here */
00152 #define _RO_DO_MEMBERFUNC_ADDVAR(x) \
00153     message.AddVariable(&x,sizeof(x));
00154 // Updated version of this macro, does the same as _RO_DO_MEMBERFUNC_ADDVAR but also includes the string variable type for extra debug info.
00155 #ifdef REPLICANET_VISUALDEBUGGER
00156 #define _RO_DO_MEMBERFUNC_ADDVAR2(x,y)  \
00157     message.AddVariable(&x,sizeof(x));  \
00158     if (RNReplicaNet::XPURL::GetDebugHandler()) \
00159     {   \
00160         debug += #y;    \
00161         debug += "\n";  \
00162         debug += RNReplicaNet::MessageHelper::DumpAsHex(&x,sizeof(x));  \
00163         debug += "\n";  \
00164     }
00165 #else // ifdef REPLICANET_VISUALDEBUGGER
00166 #define _RO_DO_MEMBERFUNC_ADDVAR2(x,y)  \
00167     message.AddVariable(&x,sizeof(x));
00168 #endif // ifdef REPLICANET_VISUALDEBUGGER
00169 /* _RO_DO_MEMBERFUNC_ADDVAR macro ends here */
00170
00171 /* _RO_DO_MEMBERFUNC_POSTSTAGE macro starts here */
00172 #ifdef REPLICANET_VISUALDEBUGGER
00173 #define _RO_DO_MEMBERFUNC_POSTSTAGE(x)  \
00174     RNReplicaNet::DataBlock_Function *datablock = (RNReplicaNet::DataBlock_Function *) mDataBlockFunction_##x;  \
00175     datablock->AddFunctionStateChange(buffer,message.GetSize(),debug.c_str());  \
00176 }
00177 #else //ifdef REPLICANET_VISUALDEBUGGER
00178 #define _RO_DO_MEMBERFUNC_POSTSTAGE(x)  \
00179     RNReplicaNet::DataBlock_Function *datablock = (RNReplicaNet::DataBlock_Function *) mDataBlockFunction_##x;  \
00180     datablock->AddFunctionStateChange(buffer,message.GetSize());    \
00181 }
00182 #endif //ifdef REPLICANET_VISUALDEBUGGER
00183 /* _RO_DO_MEMBERFUNC_POSTSTAGE macro ends here */
00184
00185
00186 /* _RO_DO_MEMBERFUNC_CRACK_START macro starts here */
00187 #define _RO_DO_MEMBERFUNC_CRACK_START(x,y)  \
00188 void _MAKE_RO(x)::##y(void *classp,void *opaque_message)    \
00189 {   \
00190     _MAKE_RO(x) *thisclass = (_MAKE_RO(x) *) classp;    \
00191     RNReplicaNet::MessageHelper *message = (RNReplicaNet::MessageHelper *) opaque_message;  \
00192     message = message;
00193 /* _RO_DO_MEMBERFUNC_CRACK_STARTmacro ends here */
00194 // Change done to avoid compiler warnings about unused variables
00195
00196 /* _RO_DO_MEMBERFUNC_MESSAGE_CRACK macro starts here */
00197 #define _RO_DO_MEMBERFUNC_MESSAGE_CRACK(x)  \
00198 MESSAGEHELPER_GETVARIABLEp((*message),##x);
00199 /* _RO_DO_MEMBERFUNC_MESSAGE_CRACK macro ends here */
00200
00201
00202 /* _RO_DO_MEMBERFUNC_CRACK_END macro starts here */
00203 #define _RO_DO_MEMBERFUNC_CRACK_END(x,y)    \
00204     ((x*)thisclass)->##y(
00205 /* _RO_DO_MEMBERFUNC_CRACK_END macro ends here */
00206
00207 /* _RO_DO_MEMBERFUNC_CRACK_END2 macro starts here */
00208 #define _RO_DO_MEMBERFUNC_CRACK_END2()  \
00209 );  \
00210 }
00211 /* _RO_DO_MEMBERFUNC_CRACK_END2 macro ends here */
00212
00213 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: DataBlock_NData.h Source File

DataBlock_NData.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __DATABLOCK_NDATA_H__
00012 #define __DATABLOCK_NDATA_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 #include "RNReplicaNet/Inc/DataBlock.h"
00016 #include <list>
00017
00018 namespace RNReplicaNet
00019 {
00020
00025 class REPLICANETDLL_API DataBlock_NData : public DataBlock
00026 {
00027 public:
00031     DataBlock_NData();
00032
00036     virtual ~DataBlock_NData();
00037
00038     virtual void Poll(DataBlockReason *reason);
00039
00040     virtual void ParseMessage(MessageHelper *message);
00041
00048     static DataBlock_NData *Register(void *const data,const int size);
00049
00055     void RegisterInClassPointer(void *const data,const int size)
00056     {
00057         mData = data;
00058         mSize = size;
00059     }
00060
00066     void SetDefaultData(const void *data);
00067
00068     bool IsAttached(void *data);
00069
00070     void SetEndianTest(const bool test = true);
00071
00072     bool GetEndianTest(void) const;
00073
00074 private:
00075     void *mData;
00076     int mSize;
00077
00078     struct SessionBlock_NData
00079     {
00080         SessionBlock_NData(int sessid,int datasize);
00081
00082         virtual ~SessionBlock_NData();
00083
00084         int mSessionID;
00085         void *mTestData;
00086
00087         // Forced updates
00088         // This works off local time, not network time
00089         float mLastUpdateSentLocalTime;
00090         int mNumForcedUpdates;
00091     };
00092
00093     std::list<SessionBlock_NData *> mPerSessionData;
00094
00095     void *mDefaultData;
00096     bool mDisableEndian;
00097 };
00098
00099 } // namespace RNReplicaNet
00100
00101 /* _RO_DO_REGISTERBLOCK_NDATA_VAR macro starts here */
00102 #define _RO_DO_REGISTERBLOCK_NDATA_VAR(x)   \
00103     {\
00104         RNReplicaNet::DataBlock_NData *datablock = 0;   \
00105         datablock = RNReplicaNet::DataBlock_NData::Register(&(basepoint->x),sizeof(basepoint->x));  \
00106         _RO_DO_SETDATABLOCKVARIABLENAME(x);
00107 /* _RO_DO_REGISTERBLOCK_NDATA_VAR macro ends here */
00108
00109 /* _RO_DO_REGISTERBLOCK_NDATA_VARAT macro starts here */
00110 #define _RO_DO_REGISTERBLOCK_NDATA_VARAT(x) \
00111     {\
00112         RNReplicaNet::DataBlock_NData *datablock = 0;   \
00113         datablock = RNReplicaNet::DataBlock_NData::Register((basepoint->x),sizeof(basepoint->x));   \
00114         _RO_DO_SETDATABLOCKVARIABLENAME(x);
00115 /* _RO_DO_REGISTERBLOCK_NDATA_VARAT macro ends here */
00116
00117 /* _RO_DO_REGISTERBLOCK_NDATA_DISABLEENDIANTEST macro starts here */
00118 #define _RO_DO_REGISTERBLOCK_NDATA_DISABLEENDIANTEST()  \
00119         datablock->SetEndianTest(false);
00120 /* _RO_DO_REGISTERBLOCK_NDATA_DISABLEENDIANTEST macro ends here */
00121
00122
00123 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: DataBlock_Predict_Float.h Source File

DataBlock_Predict_Float.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __DATABLOCK_PREDICT_FLOAT_H__
00012 #define __DATABLOCK_PREDICT_FLOAT_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 #include "RNReplicaNet/Inc/DataBlock.h"
00016 #include <list>
00017
00018 namespace RNReplicaNet
00019 {
00020
00028 class REPLICANETDLL_API DataBlock_Predict_Float : public DataBlock
00029 {
00030 public:
00034     DataBlock_Predict_Float();
00035
00039     virtual ~DataBlock_Predict_Float();
00040
00041     virtual void Poll(DataBlockReason *reason);
00042
00043     virtual void ParseMessage(MessageHelper *message);
00044
00045     virtual void GiveDeltaHint(void *pdata,int dataLen);
00046
00047     virtual void GiveDeltaHint(const float delta);
00048
00049     virtual void ContinuityBreak(unsigned char breakTypes);
00050
00051     bool IsAttached(void *data);
00052
00058     static DataBlock_Predict_Float *Register(float *data);
00059
00064     void RegisterInClassPointer(float *data)
00065     {
00066         mData = data;
00067     }
00068
00073     void SetMinError(float minerror = 0.1f);
00074
00079     void SetMaxError(float maxerror = 1.0f);
00080
00085     void SetMinDistance(float distance = 0.1f);
00086
00091     void SetMaxDistance(float distance = 1.0f);
00092
00099     void SetInterpolationFilter(float interpolation = 0.1f);
00100
00104     void SetQuadratic(void)
00105     {
00106         mIsQuadratic = true;
00107     }
00108
00112     void SetLinear(void)
00113     {
00114         mIsQuadratic = false;
00115     }
00116
00117 private:
00118     float *mData;
00119     bool mContinuityBreak;
00120     bool mIsDistanceBased;
00121     float mMinDistance;
00122     float mMaxDistance;
00123     float mMinError;
00124     bool mIsQuadratic;
00125     bool mGotData;
00126     bool mImplementTeleport;
00127     bool mDoPrep;
00128     bool mCacheValid;
00129
00130
00131
00132     float mTestData;
00133
00134     float mMaxError;
00135     float mInterpolationFilter;
00136
00137
00138     struct SessionBlock_Predict_Float
00139     {
00140         SessionBlock_Predict_Float(int sessid);
00141
00142         virtual ~SessionBlock_Predict_Float();
00143
00144         int mSessionID;
00145         bool mContinuityBreak;
00146         float mTestData;
00147         float mDelta;
00148
00149         float mSample;
00150         float mSampleTime;
00151
00152         bool mImplementTeleport;
00153
00154         // Forced updates
00155         // This works off local time, not network time
00156         float mLastUpdateSentLocalTime;
00157         int mNumForcedUpdates;
00158     };
00159
00160     std::list<SessionBlock_Predict_Float *> mPerSessionData;
00161
00162     struct ReplicaData
00163     {
00164         bool mFirstTime;
00165
00166         float mDelta;
00167         float mSample;
00168         float mSampleTime;
00169     };
00170
00171     ReplicaData mReplicaData;
00172
00173     struct MasterData
00174     {
00175         float mDelta;
00176         float mSample;
00177         float mSampleTime;
00178         float mSampleHistory[2];
00179         float mSampleHistoryTime[2];            // This is the network time and is used as values to send off the any replicas
00180         float mSampleHistoryTimeLocal[2];       // This is the local time and is only used to calculate deltas
00181         bool mGotDeltaHint;
00182         float mTheDeltaHint;
00183     };
00184     MasterData mMasterData;
00185
00186     std::list<SessionBlock_Predict_Float *>::iterator mCacheEntry;
00187
00188     bool mDoneMasterPoll;
00189 };
00190
00191 } // namespace RNReplicaNet
00192
00193 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_VAR macro starts here */
00194 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_VAR(x)   \
00195     {\
00196         RNReplicaNet::DataBlock_Predict_Float *datablock = 0;   \
00197         datablock = RNReplicaNet::DataBlock_Predict_Float::Register(&(basepoint->x));   \
00198         _RO_DO_SETDATABLOCKVARIABLENAME(x);
00199 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_VAR macro ends here */
00200
00201 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMAXERROR macro starts here */
00202 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMAXERROR(x)   \
00203         datablock->SetMaxError(x);
00204 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMAXERROR macro ends here */
00205
00206 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMINERROR macro starts here */
00207 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMINERROR(x)   \
00208         datablock->SetMinError(x);
00209 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMINERROR macro ends here */
00210
00211 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETERROR macro starts here */
00212 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETERROR(x)  \
00213         datablock->SetMinError(x);  \
00214         datablock->SetMaxError(x);
00215 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETERROR macro ends here */
00216
00217 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMINDISTANCE macro starts here */
00218 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMINDISTANCE(x)    \
00219         datablock->SetMinDistance(x);
00220 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMINDISTANCE macro ends here */
00221
00222 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMAXDISTANCE macro starts here */
00223 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMAXDISTANCE(x)    \
00224         datablock->SetMaxDistance(x);
00225 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETMAXDISTANCE macro ends here */
00226
00227 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETINTERPOLATIONFILTER macro starts here */
00228 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETINTERPOLATIONFILTER(x)    \
00229         datablock->SetInterpolationFilter(x);
00230 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETINTERPOLATIONFILTER macro ends here */
00231
00232 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETLINEAR macro starts here */
00233 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETLINEAR()  \
00234         datablock->SetLinear();
00235 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETLINEAR macro ends here */
00236
00237 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETQUADRATIC macro starts here */
00238 #define _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETQUADRATIC()   \
00239         datablock->SetQuadratic();
00240 /* _RO_DO_REGISTERBLOCK_PREDICT_FLOAT_SETQUADRATIC macro ends here */
00241
00242 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Define_RO.h Source File

Define_RO.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __DEFINE_RO_H__
00012 #define __DEFINE_RO_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014 #include "RNReplicaNet/Inc/DataBlock.h"
00015 #include "RNReplicaNet/Inc/ROConstants.h"
00016 #ifdef REPLICANET_VISUALDEBUGGER
00017 #include "RNXPURL/Inc/XPURL.h"
00018 #include "RNXPURL/Inc/DebugHandler.h"
00019 #include "RNReplicaNet/Inc/RO_RegistryBlock.h"
00020 #include "RNReplicaNet/Inc/ReplicaNet.h"
00021 #endif
00022
00023 #define _MAKE_BASE(x) x
00024 #define _MAKE_RO(x) _RO_##x
00025 #define _GET_RO(x) ::_RO_##x
00026 #define _MAKE_RO_ALLOCFUNC(x) _RO_AllocateFunc_##x
00027 #define _MAKE_RO_DELETEFUNC(x) _RO_DeleteFunc_##x
00028 #define _MAKE_RO_SETCLASSIDFUNC(x) _RO_SetClassIDFunc_##x
00029 #define _MAKE_RO_REGISTERFUNC(x) _RO_RegisterFunc_##x
00030
00031
00032
00033 #ifdef REPLICANET_VISUALDEBUGGER
00034 #define _RO_DODEBUGNAME()   \
00035     if (RNReplicaNet::XPURL::GetDebugHandler() && GetRegistryBlock() && GetRegistryBlock()->GetName())  \
00036     {   \
00037         _Internal_SetFullyQualifiedName(GetRegistryBlock()->GetName()); \
00038     }
00039 #else
00040 #define _RO_DODEBUGNAME()
00041 #endif
00042
00043
00044 /* _RO_DO_STD_FRAMEWORK macro starts here */
00045 #define _RO_DO_STD_FRAMEWORK(x) \
00046 _RO_BEGINCTOR(x);   \
00047 _Internal_GetUpdateType();  \
00048 _Internal_SetupLoadBalance();   \
00049 _Internal_SetupLoadBalanceScore();  \
00050 _Internal_SetupLoadBalanceDefault();    \
00051 _Internal_SetupLoadBalanceScoreDefault();   \
00052 _Internal_SetupPropagateDistance(); \
00053 _Internal_SetupPropagateDistanceDefault();  \
00054 _RO_DODEBUGNAME();  \
00055 _RO_ENDCTOR(x); \
00056 _RO_DTOR(x);    \
00057 _RO_DO_ALLOCATE(x); \
00058 _RO_DO_ALLOCATEFUNC(x);
00059 /* _RO_DO_STD_FRAMEWORK macro ends here */
00060
00061
00062 /* _RO_STD_FRAMEWORK macro starts here */
00063 #define _RO_STD_FRAMEWORK(x)    \
00064 public: \
00065 _MAKE_RO(x)();  \
00066 virtual ~_MAKE_RO(x)(); \
00067 _RO_DEF_ALLOCATE(x);    \
00068 _RO_DO_REGISTER(x); \
00069 _RO_DO_IDS(x);  \
00070 _RO_DO_ALLOW_FRIEND(x); \
00071 private:
00072 /* _RO_STD_FRAMEWORK macro ends here */
00073
00074 /* _RO_BEGINCTOR macro starts here */
00075 #define _RO_BEGINCTOR(x)    \
00076 int _MAKE_RO(x)::mClassID = kReplicaObjectUnknownClassID;   \
00077 RNReplicaNet::s_RO_RegistryBlock *_MAKE_RO(x)::mBoundRegistryBlock = 0; \
00078 bool _MAKE_RO(x)::mRegistered = false;  \
00079 _MAKE_RO(x)::_MAKE_RO(x)()  \
00080 {
00081 /* _RO_BEGINCTOR macro ends here */
00082
00083 /* _RO_ENDCTOR macro starts here */
00084 #define _RO_ENDCTOR(x)  \
00085 }
00086 /* _RO_ENDCTOR macro ends here */
00087
00088 /* _RO_DTOR macro starts here */
00089 #define _RO_DTOR(x) \
00090 _MAKE_RO(x)::~_MAKE_RO(x)() \
00091 {   \
00092 }
00093 /* _RO_DTOR macro ends here */
00094
00095 /* ReplicaObject reliable macros go here */
00096
00097 /* _RO_DO_REPLICAOBJECT_MAKERELIABLE macro starts here */
00098 #define _RO_DO_REPLICAOBJECT_MAKERELIABLE() \
00099 protected:  \
00100 virtual void _Internal_GetUpdateType(void)  \
00101 {   \
00102     UpdateSetReliable();    \
00103 }   \
00104 public:
00105 /* _RO_DO_REPLICAOBJECT_MAKERELIABLE macro ends here */
00106
00107 /* _RO_DO_REPLICAOBJECT_MAKECERTAIN macro starts here */
00108 #define _RO_DO_REPLICAOBJECT_MAKECERTAIN()  \
00109 protected:  \
00110 virtual void _Internal_GetUpdateType(void)  \
00111 {   \
00112     UpdateSetCertain(); \
00113 }   \
00114 public:
00115 /* _RO_DO_REPLICAOBJECT_MAKECERTAIN macro ends here */
00116
00117 /* _RO_DO_REPLICAOBJECT_MAKEUNRELIABLE macro starts here */
00118 #define _RO_DO_REPLICAOBJECT_MAKEUNRELIABLE()   \
00119 protected:  \
00120 virtual void _Internal_GetUpdateType(void)  \
00121 {   \
00122     UpdateSetUnreliable();  \
00123 }   \
00124 public:
00125 /* _RO_DO_REPLICAOBJECT_MAKEUNRELIABLE macro ends here */
00126
00127
00128
00129
00130 /* _RO_DEF_ALLOCATEFUNC macro starts here */
00131 #define _RO_DEF_ALLOCATEFUNC(x) \
00132 extern RNReplicaNet::ReplicaObject * _MAKE_RO_ALLOCFUNC(x)(void);   \
00133 extern void _MAKE_RO_DELETEFUNC(x)(RNReplicaNet::ReplicaObject *object);    \
00134 extern void _MAKE_RO_SETCLASSIDFUNC(x)(int classid,RNReplicaNet::s_RO_RegistryBlock *theBlock); \
00135 extern void _MAKE_RO_REGISTERFUNC(x)(void);
00136 /* _RO_DEF_ALLOCATEFUNC macro ends here */
00137
00138 /* _RO_DO_ALLOCATEFUNC macro starts here */
00139 #define _RO_DO_ALLOCATEFUNC(x)  \
00140 RNReplicaNet::ReplicaObject * _MAKE_RO_ALLOCFUNC(x)(void)   \
00141 {   \
00142     return _MAKE_BASE(x)::AllocateForReplicaNet();  \
00143 }   \
00144 void _MAKE_RO_DELETEFUNC(x)(RNReplicaNet::ReplicaObject *object)    \
00145 {   \
00146     _MAKE_BASE(x)::DeleteForReplicaNet(object); \
00147 }   \
00148 void _MAKE_RO_SETCLASSIDFUNC(x)(int classid,RNReplicaNet::s_RO_RegistryBlock *theBlock) \
00149 {   \
00150     _MAKE_RO(x)::StaticSetClassID(classid,theBlock);    \
00151 }   \
00152 void _MAKE_RO_REGISTERFUNC(x)(void) \
00153 {   \
00154     _MAKE_RO(x)::StaticSetRegistered(true); \
00155 }
00156 /* _RO_DO_ALLOCATEFUNC macro ends here */
00157
00158 /* _RO_DEF_ALLOCATE macro starts here */
00159 #define _RO_DEF_ALLOCATE(x) \
00160 static _MAKE_BASE(x)* _MAKE_RO(x)::AllocateForReplicaNet(); \
00161 static void _MAKE_RO(x)::DeleteForReplicaNet(RNReplicaNet::ReplicaObject *object);
00162 /* _RO_DEF_ALLOCATE macro ends here */
00163
00164 /* _RO_DO_ALLOCATE macro starts here */
00165 #define _RO_DO_ALLOCATE(x)  \
00166 _MAKE_BASE(x)* _MAKE_RO(x)::AllocateForReplicaNet() \
00167 {   \
00168     return new _MAKE_BASE(x);   \
00169 }   \
00170 void _MAKE_RO(x)::DeleteForReplicaNet(RNReplicaNet::ReplicaObject *object)  \
00171 {   \
00172     delete object;  \
00173 }
00174 /* _RO_DO_ALLOCATE macro ends here */
00175
00176 /* _RO_REGISTER macro starts here */
00177 #define _RO_DO_REGISTER(x)  \
00178 public: \
00179 virtual void SetRegistered(bool flag = true)    \
00180 {   \
00181      mRegistered = flag;    \
00182 }   \
00183 static void StaticSetRegistered(bool flag = true)   \
00184 {   \
00185      mRegistered = flag;    \
00186 }   \
00187 virtual bool GetRegistered(void)    \
00188 {   \
00189     return mRegistered; \
00190 }   \
00191 private:    \
00192     static bool mRegistered;    \
00193 public:
00194 /* _RO_REGISTER macro ends here */
00195
00196 /* _RO_DO_IDS macro starts here */
00197 #define _RO_DO_IDS(x)   \
00198 static void StaticSetClassID(const int class_id,RNReplicaNet::s_RO_RegistryBlock *theBlock) \
00199 {   \
00200     mClassID = class_id;    \
00201     mBoundRegistryBlock = theBlock; \
00202 }   \
00203 virtual const int GetClassID(void)  \
00204 {   \
00205     return mClassID;    \
00206 }   \
00207 RNReplicaNet::s_RO_RegistryBlock *GetRegistryBlock(void) const  \
00208 {   \
00209     return mBoundRegistryBlock; \
00210 }   \
00211 static int StaticGetClassID(void)   \
00212 {   \
00213     return mClassID;    \
00214 }   \
00215 static RNReplicaNet::s_RO_RegistryBlock *StaticGetRegistryBlock(void)   \
00216 {   \
00217     return mBoundRegistryBlock; \
00218 }   \
00219 private:    \
00220     static int mClassID;    \
00221     static RNReplicaNet::s_RO_RegistryBlock *mBoundRegistryBlock;   \
00222 public:
00223 /* _RO_DO_IDS macro ends here */
00224
00225 /* _RO_DO_ALLOW_PUBLIC macro starts here */
00226 #define _RO_DO_ALLOW_PUBLIC()   \
00227 public:
00228 /* _RO_DO_ALLOW_PUBLIC macro ends here */
00229
00230 /* _RO_DO_MAKE_PRIVATE macro starts here */
00231 #define _RO_DO_MAKE_PRIVATE()   \
00232 private:
00233 /* _RO_DO_MAKE_PRIVATE macro ends here */
00234
00235 /* _RO_DO_ALLOW_FRIEND macro starts here */
00236 #define _RO_DO_ALLOW_FRIEND(x)  \
00237 friend class _MAKE_BASE(x);
00238 /* _RO_DO_ALLOW_FRIEND macro ends here */
00239
00240 /* _RO_DO_ALLOW_FRIEND_RO macro starts here */
00241 #define _RO_DO_ALLOW_FRIEND_RO(x)   \
00242 friend class _MAKE_RO(x);
00243 /* _RO_DO_ALLOW_FRIEND_RO macro ends here */
00244
00245 /* _RO_DO_PUBLIC_RO macro starts here */
00246 #define _RO_DO_PUBLIC_RO(x) \
00247 public _MAKE_RO(x)
00248 /* _RO_DO_PUBLIC_RO macro ends here */
00249
00250 /* _RO_DO_APPROVEFAULT macro starts here */
00251 #define _RO_DO_APPROVEFAULT()   \
00252 public: \
00253 virtual bool ApproveFault(void) \
00254 {   \
00255     return true;    \
00256 }   \
00257 private:
00258 /* _RO_DO_APPROVEFAULT macro ends here */
00259
00260 /* _RO_DO_APPROVEMIGRATION macro starts here */
00261 #define _RO_DO_APPROVEMIGRATION()   \
00262 public: \
00263 virtual bool ApproveMigration(void) \
00264 {   \
00265     return true;    \
00266 }   \
00267 private:
00268 /* _RO_DO_APPROVEMIGRATION macro ends here */
00269
00270
00271 /* _RO_DO_SETUPLOADBALANCE macro starts here */
00272 #define _RO_DO_SETUPLOADBALANCE(x)  \
00273 public: \
00274 virtual void _Internal_SetupLoadBalance(void)   \
00275 {   \
00276     SetLoadBalancing(x);    \
00277 }   \
00278 private:
00279 /* _RO_DO_SETUPLOADBALANCE macro ends here */
00280
00281 /* _RO_DO_SETUPLOADBALANCEDEFAULT macro starts here */
00282 #define _RO_DO_SETUPLOADBALANCEDEFAULT(x)   \
00283 public: \
00284 virtual void _Internal_SetupLoadBalanceDefault(void)    \
00285 {   \
00286     SetLoadBalancingDefault(x); \
00287 }   \
00288 private:
00289 /* _RO_DO_SETUPLOADBALANCEDEFAULT macro ends here */
00290
00291 /* _RO_DO_SETUPLOADBALANCESCORE macro starts here */
00292 #define _RO_DO_SETUPLOADBALANCESCORE(x) \
00293 public: \
00294 virtual void _Internal_SetupLoadBalanceScore(void)  \
00295 {   \
00296     SetLoadScore(x);    \
00297 }   \
00298 private:
00299 /* _RO_DO_SETUPLOADBALANCESCORE macro ends here */
00300
00301 /* _RO_DO_SETUPLOADBALANCESCOREDEFAULT macro starts here */
00302 #define _RO_DO_SETUPLOADBALANCESCOREDEFAULT(x)  \
00303 public: \
00304 virtual void _Internal_SetupLoadBalanceScoreDefault(void)   \
00305 {   \
00306     SetLoadScoreDefault(x); \
00307 }   \
00308 private:
00309 /* _RO_DO_SETUPLOADBALANCESCOREDEFAULT macro ends here */
00310
00311
00312 // Distance propagate functions
00313
00314 /* _RO_DO_SETUPPROPAGATEDISTANCE macro starts here */
00315 #define _RO_DO_SETUPPROPAGATEDISTANCE(x)    \
00316 public: \
00317 virtual void _Internal_SetupPropagateDistance(void) \
00318 {   \
00319     SetPropagateToSessionDistance(x);   \
00320 }   \
00321 private:
00322 /* _RO_DO_SETUPPROPAGATEDISTANCE macro ends here */
00323
00324 /* _RO_DO_SETUPPROPAGATEDISTANCEDEFAULT macro starts here */
00325 #define _RO_DO_SETUPPROPAGATEDISTANCEDEFAULT(x) \
00326 public: \
00327 virtual void _Internal_SetupPropagateDistanceDefault(void)  \
00328 {   \
00329     SetPropagateToSessionDistanceDefault(x);    \
00330 }   \
00331 private:
00332 /* _RO_DO_SETUPPROPAGATEDISTANCEDEFAULT macro ends here */
00333
00334
00335 // Register DataBlocks functions
00336
00337 /* _RO_DEF_REGISTERDATABLOCKS macro starts here */
00338 #define _RO_DEF_REGISTERDATABLOCKS(x)   \
00339 void _MAKE_RO(x)::RegisterDataBlocks(void);
00340 /* _RO_DEF_REGISTERDATABLOCKS macro ends here */
00341
00342 /* _RO_DO_BEGINREGISTERDATABLOCKS macro starts here */
00343 #define _RO_DO_BEGINREGISTERDATABLOCKS(x)   \
00344 void _MAKE_RO(x)::RegisterDataBlocks(void)  \
00345 {   \
00346     _MAKE_BASE(x) *basepoint = (_MAKE_BASE(x) *)this;   \
00347     basepoint = basepoint;
00348 /* _RO_DO_BEGINREGISTERDATABLOCKS macro ends here */
00349
00350
00351 // Include visual debugger information if required
00352 /* _RO_DO_SETDATABLOCKVARIABLENAME macro starts here */
00353 #ifdef REPLICANET_VISUALDEBUGGER
00354 #define _RO_DO_SETDATABLOCKVARIABLENAME(x)  \
00355     datablock->SetVariableName(#x);
00356 #else
00357 #define _RO_DO_SETDATABLOCKVARIABLENAME(x)
00358 #endif
00359 /* _RO_DO_SETDATABLOCKVARIABLENAME macro starts here */
00360
00361
00362 /* _RO_DO_DATABLOCK_MAKERELIABLE macro starts here */
00363 #define _RO_DO_DATABLOCK_MAKERELIABLE() \
00364 datablock->SetReliableFlag(true);   \
00365 datablock->SetCertainFlag(false);
00366 /* _RO_DO_DATABLOCK_MAKERELIABLE macro ends here */
00367
00368 /* _RO_DO_DATABLOCK_MAKECERTAIN macro starts here */
00369 #define _RO_DO_DATABLOCK_MAKECERTAIN()  \
00370 datablock->SetReliableFlag(false);  \
00371 datablock->SetCertainFlag(true);
00372 /* _RO_DO_DATABLOCK_MAKECERTAIN macro ends here */
00373
00374 /* _RO_DO_DATABLOCK_MAKEUNRELIABLE macro starts here */
00375 #define _RO_DO_DATABLOCK_MAKEUNRELIABLE()   \
00376 datablock->SetReliableFlag(false);  \
00377 datablock->SetCertainFlag(false);
00378 /* _RO_DO_DATABLOCK_MAKEUNRELIABLE macro ends here */
00379
00380 /* _RO_DO_DATABLOCK_MAKEAUTOMATIC macro starts here */
00381 #define _RO_DO_DATABLOCK_MAKEAUTOMATIC()    \
00382 datablock->SetAutomaticUpdatesFlag(true);
00383 /* _RO_DO_DATABLOCK_MAKEAUTOMATIC macro ends here */
00384
00385 /* _RO_DO_DATABLOCK_MAKEMANUAL macro starts here */
00386 #define _RO_DO_DATABLOCK_MAKEMANUAL()   \
00387 datablock->SetAutomaticUpdatesFlag(false);
00388 /* _RO_DO_DATABLOCK_MAKEMANUAL macro ends here */
00389
00390 /* _RO_DO_DATABLOCK_SETUPDATEDELAYMINIMUM macro starts here */
00391 #define _RO_DO_DATABLOCK_SETUPDATEDELAYMINIMUM(x)   \
00392 datablock->SetUpdateDelayMinimum(x);
00393 /* _RO_DO_DATABLOCK_SETUPDATEDELAYMINIMUM macro ends here */
00394
00395 /* _RO_DO_DATABLOCK_SETFORCESENDMAXIMUMUPDATES macro starts here */
00396 #define _RO_DO_DATABLOCK_SETFORCESENDMAXIMUMUPDATES(x)  \
00397 datablock->SetForceSendMaximumUpdates(x);
00398 /* _RO_DO_DATABLOCK_SETFORCESENDMAXIMUMUPDATES macro ends here */
00399
00400 /* _RO_DO_DATABLOCK_SETFORCESENDTIMEDELAY macro starts here */
00401 #define _RO_DO_DATABLOCK_SETFORCESENDTIMEDELAY(x)   \
00402 datablock->SetForceSendTimeDelay(x);
00403 /* _RO_DO_DATABLOCK_SETFORCESENDTIMEDELAY macro ends here */
00404
00405
00406 /* _RO_DO_ENDREGISTERDATABLOCKS macro starts here */
00407 #define _RO_DO_ENDREGISTERDATABLOCKS(x) \
00408 }
00409 /* _RO_DO_ENDREGISTERDATABLOCKS macro ends here */
00410
00411 // The macros that handle individual data block registrations are in each data block include file
00412
00413 /* _RO_DO_DEFBLOCK_FUNCTION_VAR macro starts here */
00414 #define _RO_DO_DEFBLOCK_FUNCTION_VAR(x) \
00415     void *mDataBlockFunction_##x;   \
00416     static void x(void *classp,void *opaque_message);
00417 /* _RO_DO_DEFBLOCK_FUNCTION_VAR macro ends here */
00418
00419 /* GLOBAL_FUNCTION_CALL macro starts here */
00420 #define GLOBAL_FUNCTION_CALL(x) \
00421 {##x    ;}  \
00422 {Call_##x   ;};
00423 /* GLOBAL_FUNCTION_CALL macro ends here */
00424
00425 /* ALL_REPLICAS_FUNCTION_CALL macro starts here */
00426 #define ALL_REPLICAS_FUNCTION_CALL(x)   \
00427 {Call_##x   ;};
00428 /* ALL_REPLICAS_FUNCTION_CALL macro ends here */
00429
00430 /* MASTER_FUNCTION_CALL macro starts here */
00431 #define MASTER_FUNCTION_CALL(x) \
00432 {Call_##x   ;};
00433 /* MASTER_FUNCTION_CALL macro ends here */
00434
00435 /* NOMINATED_REPLICAS_FUNCTION_CALL macro starts here */
00436 #define NOMINATED_REPLICAS_FUNCTION_CALL(a,b,x) \
00437 DataBlock_Function::SetSessionIDFilter(a,b);    \
00438 {Call_##x   ;};
00439 /* NOMINATED_REPLICAS_FUNCTION_CALL macro ends here */
00440
00441 /* Macros used outside of object classes */
00442 #ifdef REPLICANET_VISUALDEBUGGER
00443 #define _RO_DEF_DO_PREDEFREGBLOCK(x)    \
00444 theBlock = new RNReplicaNet::s_RO_RegistryBlock(ro_id,objectfuncp,objectfuncp_delete, #x );
00445 #else
00446 #define _RO_DEF_DO_PREDEFREGBLOCK(x)    \
00447 theBlock = new RNReplicaNet::s_RO_RegistryBlock(ro_id,objectfuncp,objectfuncp_delete, 0 );
00448 #endif      // ifdef REPLICANET_VISUALDEBUGGER
00449 /* _RO_DEF_DO_PREDEF macro starts here */
00450 #define _RO_DEF_DO_PREDEF(x)    \
00451 _RO_DEF_ALLOCATEFUNC(x);    \
00452 objectfuncp = _MAKE_RO_ALLOCFUNC(x);    \
00453 objectfuncp_delete = _MAKE_RO_DELETEFUNC(x);    \
00454 _RO_DEF_DO_PREDEFREGBLOCK(x);   \
00455 _MAKE_RO_SETCLASSIDFUNC(x)(ro_id,theBlock); \
00456 repNet->AddItem(theBlock);  \
00457 _MAKE_RO_REGISTERFUNC(x)(); \
00458 ro_id++;
00459 /* _RO_DEF_DO_PREDEF macro ends here */
00460
00461 //#ifdef DOREPNETEXPORTAPI
00462
00463 #define _RO_DO_PREREGISTER_FUNC()   \
00464 static bool doneregister = false;   \
00465 void _ReplicaNetPreRegisterReplicasFunc(RNReplicaNet::ReplicaNet *repNet)   \
00466 {   \
00467     RNReplicaNet::ReplicaNetDLLRegister thing;  \
00468     thing.Call(repNet); \
00469 }   \
00470 void RNReplicaNet::ReplicaNetDLLRegister::Call(RNReplicaNet::ReplicaNet *repNet)    \
00471 {   \
00472     doneregister = true;    \
00473     RNReplicaNet::s_RO_RegistryBlock *theBlock = 0; \
00474     RNReplicaNet::p_RO_Func *objectfuncp = 0;   \
00475     RNReplicaNet::p_RO_FuncDelete *objectfuncp_delete = 0;  \
00476     int ro_id = 0;  \
00477     ro_id = ro_id;  \
00478     objectfuncp_delete = objectfuncp_delete;    \
00479     objectfuncp = objectfuncp;  \
00480     theBlock = theBlock;
00481
00482 // The extra bits added above are to avoid the compiler warnings for empty lists of classes to register
00483
00484 #define _RO_DO_PREREGISTER_FUNC_END()   \
00485 }
00486
00487 //#else
00488 //
00490 //#define _RO_DO_PREREGISTER_FUNC() \
00491 //void ReplicaNet::PreRegisterReplicas(void)    \
00492 //{ \
00493 //  p_RO_Func *objectfuncp = 0; \
00494 //  int ro_id = 0;
00496 //
00498 //#define _RO_DO_PREREGISTER_FUNC_END() \
00499 //}
00501 //
00502 //#endif
00503
00504
00505 /* _RO_DEF_REPLICAOBJECT_INTERNAL_SETUPOPAQUEPOINTER macro starts here */
00506 #define _RO_DEF_REPLICAOBJECT_INTERNAL_SETUPOPAQUEPOINTER() \
00507 protected:  \
00508 virtual void _Internal_SetupOpaquePointer(void);    \
00509 public:
00510 /* _RO_DEF_REPLICAOBJECT_INTERNAL_SETUPOPAQUEPOINTER macro ends here */
00511
00512 /* _RO_DO_REPLICAOBJECT_INTERNAL_SETUPOPAQUEPOINTER macro starts here */
00513 #define _RO_DO_REPLICAOBJECT_INTERNAL_SETUPOPAQUEPOINTER(x,y)   \
00514 void _MAKE_RO(x)::_Internal_SetupOpaquePointer(void)    \
00515 {   \
00516     SetOpaquePointer((void *)((y *)((_MAKE_BASE(x) *)this)));   \
00517 }
00518 /* _RO_DO_REPLICAOBJECT_INTERNAL_SETUPOPAQUEPOINTER macro ends here */
00519
00520
00521 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Class Members - Enumerations

  • ContinuityBreakTypes : RNReplicaNet::DataBlock
  • Error : RNReplicaNet::ReplicaNet
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Class Members - Enumeration values

  • kReplicaNet_EERROR : RNReplicaNet::ReplicaNet
  • kReplicaNet_EOK : RNReplicaNet::ReplicaNet
  • kStop : RNReplicaNet::DataBlock
  • kSuddenChange : RNReplicaNet::DataBlock
  • kTeleport : RNReplicaNet::DataBlock
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Class Members - Functions

- a -

  • AddAutoRegisterDataBlock() : RNReplicaNet::ReplicaObject
  • AddObject() : RNReplicaNet::ReplicaNet
  • AllocateForReplicaNet() : RNReplicaNet::ReplicaObject
  • ApproveFault() : RNReplicaNet::ReplicaObject
  • ApproveMigration() : RNReplicaNet::ReplicaObject

- b -

  • BeginSessionPlayback() : RNReplicaNet::ReplicaNet
  • BeginSessionRecord() : RNReplicaNet::ReplicaNet
  • BindReplicaNet() : RNReplicaNet::DataBlock
  • BindReplicaObject() : RNReplicaNet::DataBlock

- c -

  • CalculateDistanceToObject() : RNReplicaNet::ReplicaObject
  • CallBackAllocate() : RNReplicaNet::s_RO_RegistryBlock, RNReplicaNet::ReplicaNet
  • CallBackDelete() : RNReplicaNet::s_RO_RegistryBlock, RNReplicaNet::ReplicaNet
  • CallbackSessionPlayback() : RNReplicaNet::ReplicaNet
  • CallbackSessionRecord() : RNReplicaNet::ReplicaNet
  • ContinuityBreak() : RNReplicaNet::ReplicaObject, RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock

- d -

  • DataBlock() : RNReplicaNet::DataBlock
  • DataBlock_Function() : RNReplicaNet::DataBlock_Function
  • DataBlock_NData() : RNReplicaNet::DataBlock_NData
  • DataBlock_Predict_Float() : RNReplicaNet::DataBlock_Predict_Float
  • DataBlockPacketDataReceived() : RNReplicaNet::ReplicaObject
  • DataBlockReason() : RNReplicaNet::DataBlockReason
  • DataReceive() : RNReplicaNet::ReplicaNet
  • DataSend() : RNReplicaNet::ReplicaNet
  • DeleteForReplicaNet() : RNReplicaNet::ReplicaObject
  • Disconnect() : RNReplicaNet::ReplicaNet

- f -

  • FindDataBlock() : RNReplicaNet::ReplicaObject

- g -

  • GetAllowConnections() : RNReplicaNet::ReplicaNet
  • GetAutomaticPacketCompression() : RNReplicaNet::ReplicaNet
  • GetAutomaticUpdatesFlag() : RNReplicaNet::DataBlock
  • GetBandwidthFromSessionID() : RNReplicaNet::ReplicaNet
  • GetBoundReplicaNet() : RNReplicaNet::ReplicaObject
  • GetCanAcceptObjects() : RNReplicaNet::ReplicaNet
  • GetCanBecomeMaster() : RNReplicaNet::ReplicaNet
  • GetCanSpider() : RNReplicaNet::ReplicaNet
  • GetCertainFlag() : RNReplicaNet::DataBlock
  • GetClassID() : RNReplicaNet::s_RO_RegistryBlock, RNReplicaNet::ReplicaObject
  • GetClientOnly() : RNReplicaNet::ReplicaNet
  • GetCompressionStatistics() : RNReplicaNet::ReplicaNet
  • GetCurrentReplicaNet() : RNReplicaNet::ReplicaNet
  • GetDataBlockUpdatePolicy() : RNReplicaNet::ReplicaNet
  • GetDataRetention() : RNReplicaNet::ReplicaNet
  • GetDistanceToObject() : RNReplicaNet::ReplicaObject
  • GetEncryption() : RNReplicaNet::ReplicaNet
  • GetForceSendMaximumUpdates() : RNReplicaNet::DataBlock
  • GetForceSendTimeDelay() : RNReplicaNet::DataBlock
  • GetGameChannel() : RNReplicaNet::ReplicaNet
  • GetLatencyToMasterSession() : RNReplicaNet::ReplicaNet
  • GetLoadBalancing() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet
  • GetLoadScore() : RNReplicaNet::ReplicaObject
  • GetLocalTime() : RNReplicaNet::ReplicaNet
  • GetMasterSessionID() : RNReplicaNet::ReplicaNet
  • GetMaximumLoad() : RNReplicaNet::ReplicaNet
  • GetMergedStatistics() : RNReplicaNet::ReplicaNet
  • GetMessageReflectionID() : RNReplicaNet::ReplicaObject
  • GetName() : RNReplicaNet::s_RO_RegistryBlock
  • GetNetworkPacketsLost() : RNReplicaNet::ReplicaNet
  • GetNetworkReceiveRate() : RNReplicaNet::ReplicaNet
  • GetNetworkSendRate() : RNReplicaNet::ReplicaNet
  • GetNodeBuffers() : RNReplicaNet::ReplicaNet
  • GetObserver() : RNReplicaNet::ReplicaNet
  • GetOnSessionErrorMigrateObjects() : RNReplicaNet::ReplicaNet
  • GetOpaquePointer() : RNReplicaNet::ReplicaObject
  • GetPlaybackAllowMasterReplicaObjects() : RNReplicaNet::ReplicaNet
  • GetPollLayerBelow() : RNReplicaNet::ReplicaNet
  • GetPollLayerBelowForXPSession() : RNReplicaNet::ReplicaNet
  • GetPreConnect() : RNReplicaNet::ReplicaNet
  • GetPreConnectStatus() : RNReplicaNet::ReplicaNet
  • GetPropagateToSessionDistance() : RNReplicaNet::ReplicaObject
  • GetRegistered() : RNReplicaNet::ReplicaObject
  • GetRegistryBlock() : RNReplicaNet::ReplicaObject
  • GetReliableFlag() : RNReplicaNet::DataBlock
  • GetSessionErrorReason() : RNReplicaNet::ReplicaNet
  • GetSessionID() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet
  • GetSessionPlayback() : RNReplicaNet::ReplicaNet
  • GetSessionPropagationFilter() : RNReplicaNet::ReplicaObject
  • GetSessionPropagationSet() : RNReplicaNet::ReplicaObject
  • GetSessionRecord() : RNReplicaNet::ReplicaNet
  • GetStatus() : RNReplicaNet::ReplicaNet
  • GetTime() : RNReplicaNet::ReplicaNet
  • GetTotalLoad() : RNReplicaNet::ReplicaNet
  • GetUniqueID() : RNReplicaNet::ReplicaObject
  • GetUpdateDelayMinimum() : RNReplicaNet::DataBlock
  • GetURLFromSessionID() : RNReplicaNet::ReplicaNet
  • GiveDeltaHint() : RNReplicaNet::ReplicaObject, RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock
  • GiveOwnership() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet

- i -

  • IsAllocated() : RNReplicaNet::DataBlock
  • IsAttached() : RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock
  • IsMaster() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet
  • IsReplica() : RNReplicaNet::ReplicaObject
  • IsStable() : RNReplicaNet::ReplicaNet

- j -

  • JoinerSessionIDPost() : RNReplicaNet::ReplicaNet
  • JoinerSessionIDPre() : RNReplicaNet::ReplicaNet

- l -

  • LeaverSessionIDPost() : RNReplicaNet::ReplicaNet
  • LeaverSessionIDPre() : RNReplicaNet::ReplicaNet
  • LockObjects() : RNReplicaNet::ReplicaNet

- o -

  • ObjectListBeginIterate() : RNReplicaNet::ReplicaNet
  • ObjectListFinishIterate() : RNReplicaNet::ReplicaNet
  • ObjectListIterate() : RNReplicaNet::ReplicaNet
  • OwnerChange() : RNReplicaNet::ReplicaObject

- p -

  • ParseMessage() : RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock
  • PlaybackAdvanceTo() : RNReplicaNet::ReplicaNet
  • Poll() : RNReplicaNet::ReplicaNet, RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function, RNReplicaNet::DataBlock
  • PostObjectCreate() : RNReplicaNet::ReplicaObject
  • PreConnectHasFinished() : RNReplicaNet::ReplicaNet
  • PreRegisterReplicas() : RNReplicaNet::ReplicaNet
  • ProcessDataBlockUpdate() : RNReplicaNet::ReplicaNet
  • Publish() : RNReplicaNet::ReplicaObject

- r -

  • Register() : RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function
  • RegisterDataBlock() : RNReplicaNet::ReplicaObject
  • RegisterInClassPointer() : RNReplicaNet::DataBlock_Predict_Float, RNReplicaNet::DataBlock_NData, RNReplicaNet::DataBlock_Function
  • RemoveObject() : RNReplicaNet::ReplicaNet
  • ReplicaNet() : RNReplicaNet::ReplicaNet
  • ReplicaObject() : RNReplicaNet::ReplicaObject
  • RequestOwnership() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet

- s -

  • s_RO_RegistryBlock() : RNReplicaNet::s_RO_RegistryBlock
  • SessionCreate() : RNReplicaNet::ReplicaNet
  • SessionEnumerateFound() : RNReplicaNet::ReplicaNet
  • SessionExportURL() : RNReplicaNet::ReplicaNet
  • SessionFind() : RNReplicaNet::ReplicaNet
  • SessionJoin() : RNReplicaNet::ReplicaNet
  • SessionPropagationAddSession() : RNReplicaNet::ReplicaObject
  • SessionPropagationRemoveSession() : RNReplicaNet::ReplicaObject
  • SetAllowConnections() : RNReplicaNet::ReplicaNet
  • SetAutomaticPacketCompression() : RNReplicaNet::ReplicaNet
  • SetAutomaticPoll() : RNReplicaNet::ReplicaNet
  • SetAutomaticPollXPSession() : RNReplicaNet::ReplicaNet
  • SetAutomaticPollXPURL() : RNReplicaNet::ReplicaNet
  • SetAutomaticUpdatesFlag() : RNReplicaNet::DataBlock
  • SetCanAcceptObjects() : RNReplicaNet::ReplicaNet
  • SetCanBecomeMaster() : RNReplicaNet::ReplicaNet
  • SetCanSpider() : RNReplicaNet::ReplicaNet
  • SetCertainFlag() : RNReplicaNet::DataBlock
  • SetClientOnly() : RNReplicaNet::ReplicaNet
  • SetCurrentReplicaNet() : RNReplicaNet::ReplicaNet
  • SetDataBlockUpdatePolicy() : RNReplicaNet::ReplicaNet
  • SetDataRetention() : RNReplicaNet::ReplicaNet
  • SetDefaultData() : RNReplicaNet::DataBlock_NData
  • SetEncryption() : RNReplicaNet::ReplicaNet
  • SetForceSendMaximumUpdates() : RNReplicaNet::DataBlock
  • SetForceSendTimeDelay() : RNReplicaNet::DataBlock
  • SetGameChannel() : RNReplicaNet::ReplicaNet
  • SetID() : RNReplicaNet::DataBlock
  • SetInterpolationFilter() : RNReplicaNet::DataBlock_Predict_Float
  • SetIsAllocated() : RNReplicaNet::DataBlock
  • SetLatencyRecalculationDelay() : RNReplicaNet::ReplicaNet
  • SetLinear() : RNReplicaNet::DataBlock_Predict_Float
  • SetLoadBalancing() : RNReplicaNet::ReplicaObject, RNReplicaNet::ReplicaNet
  • SetLoadBalancingDefault() : RNReplicaNet::ReplicaObject
  • SetLoadScore() : RNReplicaNet::ReplicaObject
  • SetLoadScoreDefault() : RNReplicaNet::ReplicaObject
  • SetManualPoll() : RNReplicaNet::ReplicaNet
  • SetManualPollXPSession() : RNReplicaNet::ReplicaNet
  • SetManualPollXPURL() : RNReplicaNet::ReplicaNet
  • SetMaxDistance() : RNReplicaNet::DataBlock_Predict_Float
  • SetMaxError() : RNReplicaNet::DataBlock_Predict_Float
  • SetMaximumLoad() : RNReplicaNet::ReplicaNet
  • SetMessageReflectionID() : RNReplicaNet::ReplicaObject
  • SetMinDistance() : RNReplicaNet::DataBlock_Predict_Float
  • SetMinError() : RNReplicaNet::DataBlock_Predict_Float
  • SetNodeBuffers() : RNReplicaNet::ReplicaNet
  • SetObserver() : RNReplicaNet::ReplicaNet
  • SetOnSessionError() : RNReplicaNet::ReplicaNet
  • SetOpaquePointer() : RNReplicaNet::ReplicaObject
  • SetPlaybackAllowMasterReplicaObjects() : RNReplicaNet::ReplicaNet
  • SetPlaybackSpeed() : RNReplicaNet::ReplicaNet
  • SetPollLayerBelow() : RNReplicaNet::ReplicaNet
  • SetPollLayerBelowForXPSession() : RNReplicaNet::ReplicaNet
  • SetPreConnect() : RNReplicaNet::ReplicaNet
  • SetPropagateToSessionDistance() : RNReplicaNet::ReplicaObject
  • SetPropagateToSessionDistanceDefault() : RNReplicaNet::ReplicaObject
  • SetPropagateToSessionDistanceRecalculationDelay() : RNReplicaNet::ReplicaObject
  • SetQuadratic() : RNReplicaNet::DataBlock_Predict_Float
  • SetRegistered() : RNReplicaNet::ReplicaObject
  • SetReliableFlag() : RNReplicaNet::DataBlock
  • SetSessionIDFilter() : RNReplicaNet::DataBlock_Function
  • SetSessionPropagationFilter() : RNReplicaNet::ReplicaObject
  • SetUpdateDelayMinimum() : RNReplicaNet::DataBlock
  • SetVariableName() : RNReplicaNet::DataBlock
  • StopSessionPlayback() : RNReplicaNet::ReplicaNet
  • StopSessionRecord() : RNReplicaNet::ReplicaNet

- u -

  • UnLockObjects() : RNReplicaNet::ReplicaNet
  • UpdateIsCertain() : RNReplicaNet::ReplicaObject
  • UpdateIsReliable() : RNReplicaNet::ReplicaObject
  • UpdateIsUnreliable() : RNReplicaNet::ReplicaObject
  • UpdateSetCertain() : RNReplicaNet::ReplicaObject
  • UpdateSetReliable() : RNReplicaNet::ReplicaObject
  • UpdateSetUnreliable() : RNReplicaNet::ReplicaObject
  • UserRegisterDataBlocks() : RNReplicaNet::ReplicaObject

- ~ -

  • ~DataBlock() : RNReplicaNet::DataBlock
  • ~DataBlock_Function() : RNReplicaNet::DataBlock_Function
  • ~DataBlock_NData() : RNReplicaNet::DataBlock_NData
  • ~DataBlock_Predict_Float() : RNReplicaNet::DataBlock_Predict_Float
  • ~ReplicaNet() : RNReplicaNet::ReplicaNet
  • ~ReplicaObject() : RNReplicaNet::ReplicaObject
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Class Members - Variables

  • mFloatValue : RNReplicaNet::DataBlockReason
  • mMessageHelper : RNReplicaNet::DataBlockReason
  • mObserver : RNReplicaNet::DataBlockReason
  • mReasonCode : RNReplicaNet::DataBlockReason
  • mSessionReference : RNReplicaNet::DataBlockReason
Generated on Sun Oct 30 01:11:55 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
Generated on Sun Oct 30 01:11:59 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: ReplicaNet.h Source File

ReplicaNet.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 // This pragma disables a warning in the Microsoft compiler. This can be safely ignored. See bug ref: C4786
00012 #if defined(_WIN32)
00013 #pragma warning(disable : 4786)
00014 #endif
00015 #ifndef __REPLICANET_H__
00016 #define __REPLICANET_H__
00017 #include "RNPlatform/Inc/DLLExportAPI.h"
00018
00019 #define _REPLICANET_VERSION 5400
00020 // All DLL versions with the same major version are compatible
00021 #define _REPLICANET_DLLVERSIONMAJOR 9
00022 #define _REPLICANET_DLLVERSIONMINOR 0
00023
00024 #include <string>
00025
00026 #include "RNXPURL/Inc/Transport.h"
00027
00028
00029 namespace RNReplicaNet
00030 {
00031
00032 class ReplicaObject;
00033 class ReplicaNetPrivate;
00034 struct s_RO_RegistryBlock;
00035 struct DataBlockReason;
00036
00037 class XPSession;
00038 class MessageHelper;
00039
00040 const int kReplicaNetUnknownUniqueID = -1;
00041 const int kReplicaNetBroadcastID = -2;
00042 const int kReplicaNetRecordID = -3;
00043
00115 class REPLICANETDLL_API ReplicaNet
00116 {
00117 public:
00121     enum Error
00122     {
00123         kReplicaNet_EOK = 0,
00124         kReplicaNet_EERROR = -1,
00125         kReplicaNet_ETRANSPORT_CLOSED = -2,
00126         kReplicaNet_ETRANSPORT_ERROR = -3,
00127         kReplicaNet_EEND_RECORDING = -4
00128     };
00129
00130     enum PacketType
00131     {
00132         kPacket_Unreliable = 0,
00133         kPacket_Reliable = 1,
00134         kPacket_Certain = 2
00135     };
00136
00140     ReplicaNet();
00141
00145     virtual ~ReplicaNet();
00146
00150     virtual void PreRegisterReplicas(void);
00151
00156     static ReplicaNet *GetCurrentReplicaNet(void);
00157
00162     static void SetCurrentReplicaNet(ReplicaNet *const replicanet);
00163
00167     int GetSessionID(void);
00168
00174     void AddObject(ReplicaObject *const object);
00175
00181     void RemoveObject(ReplicaObject *const object);
00182
00187     int GetGameChannel(void);
00188
00193     void SetGameChannel(const int channel = TransportAnyGameChannel);
00194
00199     void SessionCreate(const std::string name);
00200
00206     void SessionCreate(const std::string name,const std::string protocols);
00207
00212     std::string SessionExportURL(void);
00213
00218     void SessionJoin(const std::string url);
00219
00223     void SessionFind(void);
00224
00229     std::string SessionEnumerateFound(void);
00230
00234     void LockObjects(void);
00235
00239     void UnLockObjects(void);
00240
00245     float GetNetworkSendRate(void);
00246
00251     float GetNetworkReceiveRate(void);
00252
00257     int GetNetworkPacketsLost(void);
00258
00265     virtual float GetTime(void);
00266
00273     virtual float GetLocalTime(void);
00274
00279     void SetObserver(ReplicaObject *const object = 0);
00280
00285     ReplicaObject *GetObserver(void);
00286
00295     void Poll(void);
00296
00302     void SetPollLayerBelow(bool enable = true);
00303
00308     bool GetPollLayerBelow(void);
00309
00314     void SetPollLayerBelowForXPSession(bool enable = true);
00315
00320     bool GetPollLayerBelowForXPSession(void);
00321
00329     void SetManualPoll(void);
00330
00338     void SetAutomaticPoll(void);
00339
00343     void SetManualPollXPSession(void);
00344
00348     void SetAutomaticPollXPSession(void);
00349
00353     void SetManualPollXPURL(void);
00354
00358     void SetAutomaticPollXPURL(void);
00359
00366     void GiveOwnership(ReplicaObject *const object,const int sessionID);
00367
00373     void RequestOwnership(ReplicaObject *const object);
00374
00380     void SetCanSpider(const bool canSpider = true);
00381
00386     bool GetCanSpider(void);
00387
00392     float GetLatencyToMasterSession(void);
00393
00398     void SetLatencyRecalculationDelay(const float seconds = 1.0f);
00399
00404     bool IsStable(void);
00405
00410     bool IsMaster(void);
00411
00419     void SetCanBecomeMaster(const bool canBeMaster = true);
00420
00425     bool GetCanBecomeMaster(void);
00426
00431     Error GetStatus(void);
00432
00441     Error GetSessionErrorReason(void);
00442
00443     enum OnError
00444     {
00445         kMigrateObjects = 0,
00446         kDeleteObjects,
00447         kLeaveObjects
00448     };
00449
00459     void SetOnSessionError(const OnError whatToDo = kMigrateObjects);
00460
00465     OnError GetOnSessionErrorMigrateObjects(void);
00466
00474     void SetCanAcceptObjects(bool accept = true);
00475
00480     bool GetCanAcceptObjects(void);
00481
00486     void SetEncryption(const bool enable = false);
00487
00492     bool GetEncryption(void);
00493
00499     void SetLoadBalancing(const bool enable = false);
00500
00505     bool GetLoadBalancing(void);
00506
00513     void SetMaximumLoad(float load = 0.0f);
00514
00520     float GetMaximumLoad(int sessionID = kReplicaNetUnknownUniqueID);
00521
00527     float GetTotalLoad(int sessionID = kReplicaNetUnknownUniqueID);
00528
00532     void ObjectListBeginIterate(void);
00533
00537     void ObjectListFinishIterate(void);
00538
00543     ReplicaObject *ObjectListIterate(void);
00544
00551     virtual void JoinerSessionIDPre(const int sessionID);
00552
00559     virtual void JoinerSessionIDPost(const int sessionID);
00560
00565     virtual void LeaverSessionIDPre(const int sessionID);
00566
00571     virtual void LeaverSessionIDPost(const int sessionID);
00572
00573
00574
00579     void Disconnect(const int sessionID = kReplicaNetUnknownUniqueID);
00580
00585     bool GetPreConnectStatus(void);
00586
00597     void SetPreConnect(const bool enable = false);
00598
00603     bool GetPreConnect(void);
00604
00608     void PreConnectHasFinished(void);
00609
00614     void SetDataRetention(const bool enable = false);
00615
00620     bool GetDataRetention(void) const;
00621
00629     void DataSend(const int sessionid,const void *data,const int length,const PacketType type = kPacket_Reliable);
00630
00639     bool DataReceive(int *const fromsessionid,void *const data,int *const length,PacketType *const type = 0);
00640
00641
00647     void SetDataBlockUpdatePolicy(const bool automatic = true);
00648
00653     bool GetDataBlockUpdatePolicy(void) const;
00654
00658     void ProcessDataBlockUpdate(void);
00659
00664     void SetAutomaticPacketCompression(const bool enable = false);
00665
00670     bool GetAutomaticPacketCompression(void);
00671
00678     void GetCompressionStatistics(int *const before=0,int *const after=0,const bool reset = false);
00679
00686     void GetMergedStatistics(int *const sent=0,int *const received=0,const bool reset = false);
00687
00692     int GetMasterSessionID(void);
00693
00699     std::string GetURLFromSessionID(const int sessionID);
00700
00706     void SetClientOnly(const bool isClient = false);
00707
00712     bool GetClientOnly(void);
00713
00723     bool GetBandwidthFromSessionID(const int sessionID,Transport::Bandwidth *const bandwidth,int *const output,int *const input);
00724
00733     virtual ReplicaObject *CallBackAllocate(const int classID,const int sessionID,const int uniqueID);
00734
00740     virtual ReplicaObject *CallBackDelete(ReplicaObject *object);
00741
00748     bool BeginSessionRecord(void);
00749
00753     void StopSessionRecord(void);
00754
00761     virtual bool CallbackSessionRecord(const void *data,const int length);
00762
00767     bool GetSessionRecord(void) const;
00768
00776     bool BeginSessionPlayback(void);
00777
00781     void StopSessionPlayback(void);
00782
00787     void SetPlaybackSpeed(const float speed = 1.0f);
00788
00794     bool PlaybackAdvanceTo(const float time);
00795
00802     virtual bool CallbackSessionPlayback(void *data,const int length);
00803
00808     bool GetSessionPlayback(void) const;
00809
00816     void SetPlaybackAllowMasterReplicaObjects(const bool allow = false);
00817
00821     bool GetPlaybackAllowMasterReplicaObjects(void);
00822
00827     void SetAllowConnections(const bool allow = true);
00828
00833     bool GetAllowConnections(void);
00834
00839     void SetNodeBuffers(const bool enable = false);
00840
00845     bool GetNodeBuffers(void);
00846
00847 private:
00848 friend class ReplicaObject;     /* A ReplicaObject has direct access to ReplicaNet the class */
00849 friend class ReplicaNetPrivate;
00850 friend class ReplicaNetDLLRegister;
00855     bool                GetMakeMaster(void);
00856
00861     int                 GetObjectUniqueID(void);
00862
00867     int                 GetMakeUniqueID(void);
00868
00873     int                 GetMakeSessionID(void);
00874
00875     void                LoadChangedForObject(ReplicaObject *object,float previousLoad,float newLoad);
00876
00877     void                HandleLoadBalancing(void);
00878
00879     void                AttachSession(RNReplicaNet::XPSession *session);
00880     void                DoMasterCreateClassMessage(int sessionid,ReplicaObject *object);
00881     void                DoMasterTakeOverClassMessage(int sessionid,ReplicaObject *object);
00882     bool                DoClassDataMessage(ReplicaObject *object,MessageHelper *message,DataBlockReason *reason);
00883     bool                DoClassDataCertainMessage(ReplicaObject *object,MessageHelper *message,DataBlockReason *reason,bool append = false);
00884     bool                DoClassDataReliableMessage(ReplicaObject *object,MessageHelper *message,DataBlockReason *reason,bool append = false);
00885 //  void                TakeOverObject(ReplicaObject *object);
00886     void                CheckForObjectFaultMigration(bool objectdelete,int sessionleft);
00887
00888     static ReplicaNet*  mCurrentReplicaNet;
00890     ReplicaNetPrivate*  mPrivateReplicaNet;
00891
00892     void                AddItem(s_RO_RegistryBlock *block);
00893
00900     ReplicaObject*      AllocateReplicaObject(const int class_id,const int sessionid,const int uniqueid,const int reflect = kReplicaNetUnknownUniqueID);
00901 };
00902
00906 class ReplicaNetDLLRegister
00907 {
00908 public:
00909     ReplicaNetDLLRegister(){};
00910     virtual ~ReplicaNetDLLRegister(){};
00911
00912     void Call(ReplicaNet *repNet);
00913 };
00914
00915 } // namespace RNReplicaNet
00916
00917 extern REPLICANETDLL_API void *_gReplicaNet_PreRegisterReplicasFunc;
00918 extern void _ReplicaNetPreRegisterReplicasFunc(RNReplicaNet::ReplicaNet *repNet);
00919
00920 // Calling this is guaranteed to not cause any memory allocation.
00921 #define REPLICANET_DLLPREREGISTER() \
00922     _gReplicaNet_PreRegisterReplicasFunc = (void*) &_ReplicaNetPreRegisterReplicasFunc;
00923
00924 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: ReplicaObject.h Source File

ReplicaObject.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __REPLICAOBJECT_H__
00012 #define __REPLICAOBJECT_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 #include <vector>
00016 #include <list>
00017 #include <set>
00018
00019 #include "RNPlatform/Inc/ThreadClass.h"
00020
00021 namespace RNReplicaNet
00022 {
00023
00024 class ReplicaNet;
00025 class ReplicaNetPrivate;
00026 class DataBlock;
00027 struct s_RO_RegistryBlock;
00028
00029 const float kReplicaObject_InfiniteDistance = -1.0f;
00030 const int kReplicaObjectUnknownUniqueID = -1;
00031
00042 class REPLICANETDLL_API ReplicaObject : private MutexClass
00043 {
00044 public:
00048     ReplicaObject();
00049
00053     virtual ~ReplicaObject();
00054
00059     bool IsReplica(void) const;
00060
00065     bool IsMaster(void) const;
00066
00070     void Publish(void);
00071
00076     virtual const int GetClassID(void) = 0;
00077
00082     virtual void SetRegistered(bool flag = true) = 0;
00083
00088     virtual bool GetRegistered(void) = 0;
00089
00094     int GetUniqueID(void);
00095
00100     int GetSessionID(void);
00101
00106     ReplicaNet *GetBoundReplicaNet(void);
00107
00112     virtual bool ApproveFault(void);
00113
00118     virtual bool ApproveMigration(void);
00119
00123     virtual void OwnerChange(void);
00124
00131     void GiveOwnership(int sessionID);
00132
00138     void RequestOwnership(void);
00139
00145     virtual float CalculateDistanceToObject(ReplicaObject *object);
00146
00152     float GetDistanceToObject(ReplicaObject *object);
00153
00158     virtual void SetOpaquePointer(void *data);
00159
00165     virtual void *GetOpaquePointer(void *data = 0);
00166
00172     DataBlock *FindDataBlock(void *pdata);
00173
00179     void GiveDeltaHint(float &variable,float delta);
00180
00186     void ContinuityBreak(float &variable,unsigned char breakTypes);
00187
00193     void UpdateSetReliable(void);
00194
00200     void UpdateSetCertain(void);
00201
00207     void UpdateSetUnreliable(void);
00208
00213     bool UpdateIsReliable(void);
00214
00219     bool UpdateIsCertain(void);
00220
00225     bool UpdateIsUnreliable(void);
00226
00231     void SetLoadBalancing(const bool enable = false);
00232
00237     void SetLoadBalancingDefault(const bool defaultValue = false);
00238
00243     bool GetLoadBalancing(void);
00244
00250     void SetLoadScore(const float load = 0.0f);
00251
00257     void SetLoadScoreDefault(const float defaultLoad = 0.0f);
00258
00264     float GetLoadScore(void);
00265
00269     virtual void PostObjectCreate(void);
00270
00276     virtual void UserRegisterDataBlocks(void);
00277
00282     void AddAutoRegisterDataBlock(DataBlock *const dataBlock);
00283
00289     void SetMessageReflectionID(const int sessionID = kReplicaObjectUnknownUniqueID);
00290
00295     int GetMessageReflectionID(void) const;
00296
00307     void SetPropagateToSessionDistance(const float distance = kReplicaObject_InfiniteDistance);
00308
00314     void SetPropagateToSessionDistanceDefault(const float distance = kReplicaObject_InfiniteDistance);
00315
00321     float GetPropagateToSessionDistance(void) const;
00322
00328     void SetPropagateToSessionDistanceRecalculationDelay(const float delay = 0.1f);
00329
00334     static ReplicaObject *AllocateForReplicaNet(void);
00335
00340     static void DeleteForReplicaNet(ReplicaObject *object);
00341
00342
00350     void SetSessionPropagationFilter(const bool enable = false);
00351
00356     bool GetSessionPropagationFilter(void) const;
00357
00362     void GetSessionPropagationSet(std::set<int> &theSet);
00363
00369     bool SessionPropagationAddSession(const int sessionID);
00370
00376     bool SessionPropagationRemoveSession(const int sessionID);
00377
00382     virtual void DataBlockPacketDataReceived(const DataBlock *datablock);
00383
00389     virtual s_RO_RegistryBlock *GetRegistryBlock(void) const = 0;
00390
00391 protected:
00392     virtual void _Internal_GetUpdateType(void);
00393     virtual void _Internal_SetupLoadBalance(void);
00394     virtual void _Internal_SetupLoadBalanceScore(void);
00395     virtual void _Internal_SetupLoadBalanceDefault(void);
00396     virtual void _Internal_SetupLoadBalanceScoreDefault(void);
00397     virtual void _Internal_SetupOpaquePointer(void);
00398     virtual void _Internal_SetupPropagateDistance(void);
00399     virtual void _Internal_SetupPropagateDistanceDefault(void);
00400
00401     // This sets the internal debugging full name
00402     void _Internal_SetFullyQualifiedName(const char *name = 0);
00403     const char *_Internal_GetFullyQualifiedName(void);
00404     // Debugging emit functions
00405     void _DebugInternal_EmitClassCreate(const int packetSize,const int toSession);
00406     void _DebugInternal_EmitClassDelete(const int packetSize,const int toSession);
00407
00412     virtual void RegisterDataBlock(DataBlock *block);
00413
00414 private:
00415 friend class ReplicaNet;            /* ReplicaNet has direct access to ReplicaObject classes */
00416 friend class ReplicaNetPrivate;     /* ReplicaNet has direct access to ReplicaObject classes */
00417 friend struct SessionUnique;        /* ReplicaNet has direct access to ReplicaObject classes */
00418 friend class DataBlock;
00419
00420 // Functions
00421     // Safe to call multiple times
00422     virtual void PreRegisterDataBlocks(void);
00423     // Do not call, except from within PreRegisterDataBlocks()
00424     virtual void RegisterDataBlocks(void);
00426     void PollInternalForDistance(const float localTime,ReplicaObject *observer,const int sessionID);
00427
00428 // Variables
00429     bool mIsMaster;
00430     int mUniqueID;
00431     int mSessionID;
00432     ReplicaNet *mBoundReplicaNet;
00433     bool mBeingDeleted;
00434 protected:
00435     bool mDataBlocksRegistered;
00436 private:
00437     bool mFlagForLaterMigration;
00438     void *mOpaquePointer;
00439     bool mOpaquePointerSet;
00440     bool mIsReliable;
00441     bool mIsCertain;
00442     bool mPostFirstDataCallDone;
00443     int mTryingToGiveTo;
00444     bool mObjectHasBeenAdded;
00445     bool mEnableLoadBalancing;
00446     float mLoadScore;
00447     bool mEnableLoadBalancingDefault;
00448     float mLoadScoreDefault;
00449     int mReflectSessionID;
00450     float mDistanceToSessionPropagate;
00451     float mDistanceToSessionPropagateDefault;
00452     bool mSessionPropagationFilter;
00453
00454     std::vector<DataBlock *> mAutoRegister;
00455     std::vector<DataBlock *> mDataBlocks;
00456     std::set<int> mSessionPropagationFilterIDs;
00457     // These delay slots are for those pending create class or delete class messages that have not been sent yet.
00458     std::set<int> mSessionPropagationFilterDelaySlotAdd;
00459     std::set<int> mSessionPropagationFilterDelaySlotRemove;
00460
00461     // Distance based optimisations
00462     bool mEnableDistanceBased;
00463     float mDistanceBasedPollTime;
00464     float mDistanceBasedLastTime;
00465
00466     bool mMasterOrReplicaDataBlockPollDone;
00467
00468     char *mFullyQualifiedName;
00469     bool mPostObjectCreateDone;
00470 };
00471
00472 } // namespace RNReplicaNet
00473
00474 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: RO_RegistryBlock.h Source File

RO_RegistryBlock.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __RO_REGISTRYBLOCK_H__
00012 #define __RO_REGISTRYBLOCK_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 namespace RNReplicaNet
00016 {
00017
00018 class ReplicaObject;
00019
00023 typedef ReplicaObject *p_RO_Func(void);
00024 typedef void p_RO_FuncDelete(ReplicaObject *);
00025
00029 struct REPLICANETDLL_API s_RO_RegistryBlock
00030 {
00031 public:
00039     s_RO_RegistryBlock(int id,p_RO_Func *pfunc,p_RO_FuncDelete *pfunc_delete,const char *name = 0);
00040
00045     int GetClassID(void);
00046
00051     ReplicaObject *CallBackAllocate(void);
00052
00057     void CallBackDelete(ReplicaObject *object);
00058
00064     const char *GetName(void) const;
00065
00066 private:
00067     int mID;
00068     p_RO_Func *mFunc;
00069     p_RO_FuncDelete *mFuncDelete;
00070     const char *mName;
00071 };
00072
00073 } // namespace RNReplicaNet
00074
00075 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: ROConstants.h Source File

ROConstants.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef _ROCONSTANTS_H_
00012 #define _ROCONSTANTS_H_
00013
00014 const int kReplicaObjectUnknownClassID = -1;
00015
00016 #endif
Generated on Sun Oct 30 01:11:54 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::DataBlockReason Member List

This is the complete list of members for RNReplicaNet::DataBlockReason, including all inherited members.

DataBlockReason(int code=kDataBlockReason_NormalPoll, int session=-1, ReplicaObject *object=0) | RNReplicaNet::DataBlockReason | [inline]
mFloatLocalTime (defined in RNReplicaNet::DataBlockReason) | RNReplicaNet::DataBlockReason |
mFloatTime (defined in RNReplicaNet::DataBlockReason) | RNReplicaNet::DataBlockReason |
mFloatValue | RNReplicaNet::DataBlockReason |
mMessageHelper | RNReplicaNet::DataBlockReason |
mObserver | RNReplicaNet::DataBlockReason |
mReasonCode | RNReplicaNet::DataBlockReason |
mSessionReference | RNReplicaNet::DataBlockReason |

Generated on Sun Oct 30 01:11:56 2005 for ReplicaNet by doxygen 1.4.1


ReplicaNet: Member List

RNReplicaNet::s_RO_RegistryBlock Member List

This is the complete list of members for RNReplicaNet::s_RO_RegistryBlock, including all inherited members.

CallBackAllocate(void) | RNReplicaNet::s_RO_RegistryBlock
CallBackDelete(ReplicaObject *object) | RNReplicaNet::s_RO_RegistryBlock
GetClassID(void) | RNReplicaNet::s_RO_RegistryBlock
GetName(void) const | RNReplicaNet::s_RO_RegistryBlock
s_RO_RegistryBlock(int id, p_RO_Func *pfunc, p_RO_FuncDelete *pfunc_delete, const char *name=0) | RNReplicaNet::s_RO_RegistryBlock

Generated on Sun Oct 30 01:11:58 2005 for ReplicaNet by doxygen 1.4.1