Emergency 20 Dokumentation  4.2.0
em5::multiplayer::OperationMessageHandlerManager Class Reference

EMERGENCY 5 Manager for operation message handler. More...

#include <OperationMessageHandlerManager.h>

Inheritance diagram for em5::multiplayer::OperationMessageHandlerManager:

Public Member Functions

 OperationMessageHandlerManager ()
 Constructor. More...
 
 ~OperationMessageHandlerManager ()
 Destructor. More...
 
template<typename T >
T * getHandler ()
 Return a operation message handler instance of a certain type. More...
 
OperationMessageHandlergetHandlerById (OperationMessage id)
 Return a component instance pointer by using its unique identifier. More...
 
const std::map< OperationMessage, std::unique_ptr< OperationMessageHandler > > & getAllHandler () const
 Returns the whole handler map. More...
 
void registerHandler (OperationMessage id, OperationMessageHandler &operationMessageHandler)
 Register a new handler. More...
 

Static Public Member Functions

static OperationMessageHandlergetHandlerById (OperationMessage id, bool onlyHost)
 
template<typename T >
static T * getHandler (bool onlyHost)
 

Detailed Description

EMERGENCY 5 Manager for operation message handler.

Note
  • This manager manages operation message handler which are used to transfer data from host to client

Constructor & Destructor Documentation

em5::multiplayer::OperationMessageHandlerManager::OperationMessageHandlerManager ( )

Constructor.

em5::multiplayer::OperationMessageHandlerManager::~OperationMessageHandlerManager ( )

Destructor.

Member Function Documentation

const std::map< OperationMessage, std::unique_ptr< OperationMessageHandler > > & em5::multiplayer::OperationMessageHandlerManager::getAllHandler ( ) const
inline

Returns the whole handler map.

template<typename T >
T * em5::multiplayer::OperationMessageHandlerManager::getHandler ( bool  onlyHost)
static
template<typename T >
T * em5::multiplayer::OperationMessageHandlerManager::getHandler ( )

Return a operation message handler instance of a certain type.

Returns
The requested operation message handler instance, null pointer on error, do no destroy the returned instance
static OperationMessageHandler* em5::multiplayer::OperationMessageHandlerManager::getHandlerById ( OperationMessage  id,
bool  onlyHost 
)
static
OperationMessageHandler * em5::multiplayer::OperationMessageHandlerManager::getHandlerById ( OperationMessage  id)
inline

Return a component instance pointer by using its unique identifier.

Parameters
[in]idThe unique component identifier generated by "qsf::StringHash"
Returns
The requested component instance, null pointer on error, do no destroy the returned instance
void em5::multiplayer::OperationMessageHandlerManager::registerHandler ( OperationMessage  id,
OperationMessageHandler operationMessageHandler 
)
inline

Register a new handler.

Parameters
[in]idOperation message ID
[in]operationMessageHandlerOperation message handler to register, the operation message handler manager takes over the control of the memory

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