Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# DistributedNetworkObjectManager Class Reference
[Distributed Network Object Subsystem]

Distributed Network Object Manager class. More...

`#include <DistributedNetworkObjectManager.h>`

List of all members.

## Public Member Functions
| DistributedNetworkObjectManager ()
| ~DistributedNetworkObjectManager ()
void | RegisterRakServerInterface (RakServerInterface *_rakServerInterface)
void | RegisterRakClientInterface (RakClientInterface *_rakClientInterface)
RakServerInterface * | GetRakServerInterface (void) const
RakClientInterface * | GetRakClientInterface (void) const
DistributedNetworkObject * | HandleDistributedNetworkObjectPacket (Packet *packet)
void | HandleDistributedNetworkObjectPacketCreationAccepted (Packet *packet)
void | HandleDistributedNetworkObjectPacketCreationRejected (Packet *packet)
bool | ExistsNetworkObject (DistributedNetworkObject *object)
bool | RegisterNetworkObject (DistributedNetworkObject *object, char classIdentifier[MAXIMUM_CLASS_IDENTIFIER_LENGTH], unsigned char &localObjectIndex)
void | UnregisterNetworkObject (DistributedNetworkObject *object)
void | SendAllDistributedObjects (PlayerID playerId)
void | AddClassStub (DistributedNetworkObjectBaseStub *stub)
DistributedNetworkObject * | GetClassInstanceByIdentifier (char *classIdentifier)
## Static Public Member Functions
static DistributedNetworkObjectManager * | Instance ()
## Protected Member Functions
DistributedNetworkObject * | GetObjectByLocalObjectIndex (unsigned char localObjectIndex)
## Protected Attributes
BasicDataStructures::List< DistributedNetworkObjectBaseStub * > | classList
BasicDataStructures::List< DistributedNetworkObjectRegistryNode * > | distributedNetworkObjectInstanceRegistry
RakServerInterface * | rakServerInterface
RakClientInterface * | rakClientInterface
unsigned char | localObjectIdentifier
## Static Protected Attributes
static DistributedNetworkObjectManager | I
## Classes
struct | DistributedNetworkObjectRegistryNode
| Association between a DNO Object and a class Identifier. More...

## Detailed Description

Distributed Network Object Manager class.

Manage all Distributed Network Object. It's in charge of creating on peer remote ditributed object.

## Constructor & Destructor Documentation

DistributedNetworkObjectManager::DistributedNetworkObjectManager | ( |  | ) |

| Default constructor

DistributedNetworkObjectManager::~DistributedNetworkObjectManager | ( |  | ) |

| Destructor

## Member Function Documentation

void DistributedNetworkObjectManager::AddClassStub | ( | DistributedNetworkObjectBaseStub * | stub | ) |

| Register a new Stub

bool DistributedNetworkObjectManager::ExistsNetworkObject | ( | DistributedNetworkObject * | object | ) |

DistributedNetworkObject * DistributedNetworkObjectManager::GetClassInstanceByIdentifier | ( | char * | classIdentifier | ) |

  | Retrieve an object using its class identifier. Parameters:
  | classIdentifier | The encoded class identifier.
Returns: The object if found NULL otherwise.

DistributedNetworkObject * DistributedNetworkObjectManager::GetObjectByLocalObjectIndex | ( | unsigned char | localObjectIndex | ) | `[protected]`

RakClientInterface * DistributedNetworkObjectManager::GetRakClientInterface | ( | void |  | ) | const

| Retrieve the associated RakClient Returns: The previously associated RakClient

RakServerInterface * DistributedNetworkObjectManager::GetRakServerInterface | ( | void |  | ) | const

| Retrive the associated RakServer Returns: The Previously associated RakServer

DistributedNetworkObject * DistributedNetworkObjectManager::HandleDistributedNetworkObjectPacket | ( | Packet * | packet | ) |

void DistributedNetworkObjectManager::HandleDistributedNetworkObjectPacketCreationAccepted | ( | Packet * | packet | ) |

void DistributedNetworkObjectManager::HandleDistributedNetworkObjectPacketCreationRejected | ( | Packet * | packet | ) |

static DistributedNetworkObjectManager* DistributedNetworkObjectManager::Instance | ( |  | ) | `[inline, static]`

| Singleton pattern for Distributed Network Object Manager Returns: Retrieve the singleton Instance associated to the manager Todo: Make default constructor private to ensure single instance

bool DistributedNetworkObjectManager::RegisterNetworkObject | ( | DistributedNetworkObject * | object,
|  | char | classIdentifier[MAXIMUM_CLASS_IDENTIFIER_LENGTH],
|  | unsigned char & | localObjectIndex
| ) |

  | Register a new Network object. The maximum number of registration is 256. Parameters:
  | object | The obejct to manage.
  | classIdentifier | The class identifier of the object
  | localObjectIndex | the ObjectId associated to this object by the manager.
Returns: True on successful add, false on already exists

void DistributedNetworkObjectManager::RegisterRakClientInterface | ( | RakClientInterface * | _rakClientInterface | ) |

  | You need to register your instance of RakClient and/of RakServer to be usable by the DistributedNetworkObjectManager. Parameters:
  | _rakClientInterface | A RakClient instance.

void DistributedNetworkObjectManager::RegisterRakServerInterface | ( | RakServerInterface * | _rakServerInterface | ) |

  | You need to register your instance of RakServer and/or RakClient to be usable by the DistributedNetworkObjectManager. Parameters:
  | _rakServerInterface | A RakServer instance.

void DistributedNetworkObjectManager::SendAllDistributedObjects | ( | PlayerID | playerId | ) |

  | This will send all registered network objects to the specified player (server only) Parameters:
  | playerId | Id of the player to send all data.

void DistributedNetworkObjectManager::UnregisterNetworkObject | ( | DistributedNetworkObject * | object | ) |

  | Unregister this instance of the Distributed Network Object Parameters:
  | object | The object to remove.

## Member Data Documentation

BasicDataStructures::List<DistributedNetworkObjectBaseStub*> DistributedNetworkObjectManager::classList`[protected]`

BasicDataStructures::List<DistributedNetworkObjectRegistryNode*> DistributedNetworkObjectManager::distributedNetworkObjectInstanceRegistry`[protected]`

DistributedNetworkObjectManager DistributedNetworkObjectManager::I`[static, protected]`

unsigned char DistributedNetworkObjectManager::localObjectIdentifier`[protected]`

| This cycles from 0 to 255 and around giving identifiers to objects that don't have IDs set by the server yet. This way we can still access them

RakClientInterface* DistributedNetworkObjectManager::rakClientInterface`[protected]`

RakServerInterface* DistributedNetworkObjectManager::rakServerInterface`[protected]`

The documentation for this class was generated from the following files:

- Projects/raknet/include/raknet/DistributedNetworkObjectManager.h
- Projects/raknet/Source/DistributedNetworkObjectManager.cpp