Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

RNReplicaNet::DataBlock_NData Class Reference

#include <DataBlock_NData.h>

Inheritance diagram for RNReplicaNet::DataBlock_NData:

Inheritance graph
[legend]
Collaboration diagram for RNReplicaNet::DataBlock_NData:

Collaboration graph
[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_NDataRegister (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:
Generated on Sun Oct 30 01:11:57 2005 for ReplicaNet by  doxygen 1.4.1