CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::NetworkAction< A > Struct Template Reference

The NetworkAction is a special type of action that can be performed remotely on the server. More...

#include <CeresEngine/Network/NetworkAction.hpp>

Inheritance diagram for CeresEngine::NetworkAction< A >:
CeresEngine::AbstractNetworkAction CeresEngine::EntityAction< NetworkAction< A >, std::conditional_t< std::is_same_v< A::ReturnType, void >, Async<>, Async< A::ReturnType > > > CeresEngine::AbstractEntityAction

Public Types

using ReturnValueType = typename A::ReturnType
 The type that must be returned by action handlers.
 

Public Member Functions

template<typename... Args>
 NetworkAction (Args &&... args)
 Creates a new NetworkAction.
 
Any dispatchAny (Entity entity) const final
 Dispatches the action to the given entity.
 
ReturnValueType dispatch (Entity entity) const
 Dispatches the action to the given entity.
 
- Public Member Functions inherited from CeresEngine::AbstractNetworkAction
virtual ~AbstractNetworkAction ()=default
 Destroys the AbstractNetworkAction instance.
 

Public Attributes

A action
 The wrapped action type.
 

Detailed Description

template<typename A>
struct CeresEngine::NetworkAction< A >

The NetworkAction is a special type of action that can be performed remotely on the server.

Template Parameters
Athe wrapped action type

Member Typedef Documentation

◆ ReturnValueType

template<typename A >
using CeresEngine::NetworkAction< A >::ReturnValueType = typename A::ReturnType

The type that must be returned by action handlers.

Constructor & Destructor Documentation

◆ NetworkAction()

template<typename A >
template<typename... Args>
CeresEngine::NetworkAction< A >::NetworkAction ( Args &&...  args)
explicit

Creates a new NetworkAction.

Template Parameters
Argsthe arguments types to construct the action member with
Parameters
argsThe arguments to construct the action member with

Member Function Documentation

◆ dispatch()

template<typename A >
NetworkAction< A >::ReturnValueType CeresEngine::NetworkAction< A >::dispatch ( Entity  entity) const

Dispatches the action to the given entity.

Parameters
entityThe entity to dispatch the action to

◆ dispatchAny()

template<typename A >
Any CeresEngine::NetworkAction< A >::dispatchAny ( Entity  entity) const
finalvirtual

Dispatches the action to the given entity.

Parameters
entityThe entity to dispatch the action to

Implements CeresEngine::AbstractNetworkAction.

Member Data Documentation

◆ action

template<typename A >
A CeresEngine::NetworkAction< A >::action

The wrapped action type.

This is the action that will be performed on the game server.


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