MAGE  v0.171.0
Matthias Advanced Game Engine
mage::input::Manager Class Reference

#include <input_manager.hpp>

Classes

class  Impl
 

Public Member Functions

 Manager (NotNull< HWND > window)
 
 Manager (const Manager &manager)=delete
 
 Manager (Manager &&manager) noexcept
 
 ~Manager ()
 
Manageroperator= (const Manager &manager)=delete
 
Manageroperator= (Manager &&manager)=delete
 
NotNull< HWND > GetWindow () noexcept
 
void Update () noexcept
 
const KeyboardGetKeyboard () const noexcept
 
const MouseGetMouse () const noexcept
 

Private Attributes

UniquePtr< Implm_impl
 

Detailed Description

A class of input managers.

Constructor & Destructor Documentation

◆ Manager() [1/3]

mage::input::Manager::Manager ( NotNull< HWND >  window)
explicit

Constructs an input manager for the given window handle.

Parameters
[in]windowThe handle of the parent window.
Exceptions
ExceptionFailed to initialize the DirectInput object.
ExceptionFailed to initialize the input systems.

◆ Manager() [2/3]

mage::input::Manager::Manager ( const Manager manager)
delete

Constructs an input manager from the given input manager.

Parameters
[in]managerA reference to the input manager to copy.

◆ Manager() [3/3]

mage::input::Manager::Manager ( Manager &&  manager)
defaultnoexcept

Constructs an input manager by moving the given input manager.

Parameters
[in]managerA reference to the input manager to move.

◆ ~Manager()

mage::input::Manager::~Manager ( )
default

Destructs this input manager.

Member Function Documentation

◆ GetKeyboard()

const Keyboard & mage::input::Manager::GetKeyboard ( ) const
noexcept

Returns the keyboard of this input manager.

Returns
A reference to the keyboard of this input manager.

◆ GetMouse()

const Mouse & mage::input::Manager::GetMouse ( ) const
noexcept

Returns the mouse of this input manager.

Returns
A reference to the mouse of this input manager.

◆ GetWindow()

NotNull< HWND > mage::input::Manager::GetWindow ( )
noexcept

Returns the window handle of this input manager.

Returns
The window handle of this input manager.

◆ operator=() [1/2]

Manager& mage::input::Manager::operator= ( const Manager manager)
delete

Copies the given input manager to this input manager.

Parameters
[in]managerA reference to the input manager to copy.
Returns
A reference to the copy of the given input manager (i.e. this input manager).

◆ operator=() [2/2]

Manager& mage::input::Manager::operator= ( Manager &&  manager)
delete

Moves the given input manager to this input manager.

Parameters
[in]managerA reference to the input manager to move.
Returns
A reference to the moved input manager (i.e. this input manager).

◆ Update()

void mage::input::Manager::Update ( )
noexcept

Updates the state of the input systems of this input manager.

Member Data Documentation

◆ m_impl

UniquePtr< Impl > mage::input::Manager::m_impl
private

A pointer to the implementation of this input manager.