The Joe Engine
Joe's engine programming playground
JoeEngine::JEIOHandler Class Reference

The JEIOHandler class. More...

#include <IOHandler.h>

Public Member Functions

 JEIOHandler ()=default
 Constructor. More...
 
 ~JEIOHandler ()=default
 Destructor. More...
 
void Initialize (GLFWwindow *glfwWindow)
 Initialization. More...
 
void PollInput ()
 Poll for input. More...
 
void AddCallback (int key, JECallbackFunction callback)
 Add callback function. More...
 
void ExecuteCallbacksForKey (int key)
 Execute callbacks for key. More...
 

Detailed Description

The JEIOHandler class.

Class that maps keyboard inputs to callback functions.

See also
JEEngineInstance

Constructor & Destructor Documentation

◆ JEIOHandler()

JoeEngine::JEIOHandler::JEIOHandler ( )
default

Constructor.

◆ ~JEIOHandler()

JoeEngine::JEIOHandler::~JEIOHandler ( )
default

Destructor.

Member Function Documentation

◆ AddCallback()

void JoeEngine::JEIOHandler::AddCallback ( int  key,
JECallbackFunction  callback 
)

Add callback function.

Registers the specified callback function to the specified key index.

Parameters
keyThe keypress to register a clalback function to.
callbackthe callback function to register

◆ ExecuteCallbacksForKey()

void JoeEngine::JEIOHandler::ExecuteCallbacksForKey ( int  key)

Execute callbacks for key.

Invokes all callbacks registered for the specified key index.

Parameters
keythe key index to execute the callbacks of

◆ Initialize()

void JoeEngine::JEIOHandler::Initialize ( GLFWwindow *  glfwWindow)

Initialization.

Called once by the JEEngineInstance that owns this class. Sets the member pointer to the specified window.

Parameters
glfwWindowthe specified GLFW window to expect keyboard and mouse events from.

◆ PollInput()

void JoeEngine::JEIOHandler::PollInput ( )

Poll for input.

Wrapper function around the GLFW poll input function.


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