RavEngine
Loading...
Searching...
No Matches
RavEngine::InputManager::ActionBinding Class Reference

Public Member Functions

 ActionBinding (decltype(id) id, actionCallback fn, void *addr, CID c, ActionState s)
 
constexpr void operator() (ActionState state_in, CID c_in) const
 
bool IsValid () const
 
constexpr bool operator== (const ActionBinding &other) const
 

Constructor & Destructor Documentation

◆ ActionBinding()

RavEngine::InputManager::ActionBinding::ActionBinding ( decltype(id)  id,
actionCallback  fn,
void *  addr,
CID  c,
ActionState  s 
)
inline

Create an ActionBinding object

Parameters
thisptrthe owning object to be bound to
fnthe lambda to execute
addrthe address of the original function on thisptr
cthe controller bitmask for this binding
sthe required state of the source controller

Member Function Documentation

◆ IsValid()

bool RavEngine::InputManager::ActionBinding::IsValid ( ) const
inline
Returns
true if this object can be executed (the bound object has not been destroyed), false otherwise

◆ operator()()

constexpr void RavEngine::InputManager::ActionBinding::operator() ( ActionState  state_in,
CID  c_in 
) const
inlineconstexpr

Execute this ActionBinding. If the action binding is invalid, or the input state / controller are not applicable, this function will do nothing.

Parameters
state_inthe state of the action being invoked
controllerthe source controller sending the action

◆ operator==()

constexpr bool RavEngine::InputManager::ActionBinding::operator== ( const ActionBinding &  other) const
inlineconstexpr

Check equality


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