Open 3D Engine Multiplayer Gem API Reference  22.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Classes | Public Types | Public Member Functions | List of all members
Multiplayer::MultiplayerComponentRegistry Class Reference

Classes

struct  ComponentData
 

Public Types

using PropertyNameLookupFunction = AZStd::function< const char *(PropertyIndex index)>
 
using RpcNameLookupFunction = AZStd::function< const char *(RpcIndex index)>
 
using AllocComponentInputFunction = AZStd::function< AZStd::unique_ptr< IMultiplayerComponentInput >()>
 

Public Member Functions

NetComponentId RegisterMultiplayerComponent (const ComponentData &componentData)
 
AZStd::unique_ptr< IMultiplayerComponentInputAllocateComponentInput (NetComponentId netComponentId)
 
const char * GetComponentGemName (NetComponentId netComponentId) const
 
const char * GetComponentName (NetComponentId netComponentId) const
 
const char * GetComponentPropertyName (NetComponentId netComponentId, PropertyIndex propertyIndex) const
 
const char * GetComponentRpcName (NetComponentId netComponentId, RpcIndex rpcIndex) const
 
const ComponentDataGetMultiplayerComponentData (NetComponentId netComponentId) const
 
void Reset ()
 This releases all owned memory, should only be called during multiplayer shutdown.
 

Member Function Documentation

◆ AllocateComponentInput()

AZStd::unique_ptr<IMultiplayerComponentInput> Multiplayer::MultiplayerComponentRegistry::AllocateComponentInput ( NetComponentId  netComponentId)

Allocates a new component input for the provided netComponentId.

Parameters
netComponentIdthe NetComponentId to allocate a component input for
Returns
pointer to the allocated component input, caller assumes ownership

◆ GetComponentGemName()

const char* Multiplayer::MultiplayerComponentRegistry::GetComponentGemName ( NetComponentId  netComponentId) const

Returns the gem name associated with the provided NetComponentId.

Parameters
netComponentIdthe NetComponentId to return the gem name of
Returns
the name of the gem that contains the requested component

◆ GetComponentName()

const char* Multiplayer::MultiplayerComponentRegistry::GetComponentName ( NetComponentId  netComponentId) const

Returns the component name associated with the provided NetComponentId.

Parameters
netComponentIdthe NetComponentId to return the component name of
Returns
the name of the component

◆ GetComponentPropertyName()

const char* Multiplayer::MultiplayerComponentRegistry::GetComponentPropertyName ( NetComponentId  netComponentId,
PropertyIndex  propertyIndex 
) const

Returns the property name associated with the provided NetComponentId and propertyIndex.

Parameters
netComponentIdthe NetComponentId to return the property name of
propertyIndexthe index off the network property to return the property name of
Returns
the name of the network property

◆ GetComponentRpcName()

const char* Multiplayer::MultiplayerComponentRegistry::GetComponentRpcName ( NetComponentId  netComponentId,
RpcIndex  rpcIndex 
) const

Returns the Rpc name associated with the provided NetComponentId and rpcId.

Parameters
netComponentIdthe NetComponentId to return the property name of
rpcIndexthe index of the rpc to return the rpc name of
Returns
the name of the requested rpc

◆ GetMultiplayerComponentData()

const ComponentData& Multiplayer::MultiplayerComponentRegistry::GetMultiplayerComponentData ( NetComponentId  netComponentId) const

Retrieves the stored component data for a given NetComponentId.

Parameters
netComponentIdthe NetComponentId to return component data for
Returns
reference to the requested component data, an empty container will be returned if the NetComponentId does not exist

◆ RegisterMultiplayerComponent()

NetComponentId Multiplayer::MultiplayerComponentRegistry::RegisterMultiplayerComponent ( const ComponentData componentData)

Registers a multiplayer component with the multiplayer system.

Parameters
componentDatathe data associated with the component being registered
Returns
the NetComponentId assigned to this particular component

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