ReplicaNet and RNLobby  1
Public Member Functions | List of all members
s_RO_RegistryBlock Struct Reference

#include <RO_RegistryBlock.h>

Public Member Functions

 s_RO_RegistryBlock (int id, p_RO_Func *pfunc, p_RO_FuncDelete *pfunc_delete, const char *name=0)
 
int GetClassID (void)
 
ReplicaObjectCallBackAllocate (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

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
idthe class id to use for this block
pfuncthe function pointer that can allocate this class id
pfunc_deletethe function that can delete this class id
namethe name of the class. The default value is null

Member Function Documentation

ReplicaObject* CallBackAllocate ( void  )

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

Returns
the replica object pointer
void CallBackDelete ( ReplicaObject object)

Calls the delete function pointer registered for this block

Parameters
objectthe replica object pointer to delete
int GetClassID ( void  )

Gets the class id from the structure

Returns
the class id
const char* 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