NDEVR
API Documentation
ControllerInterfaceManager

Stores services that allow the software to access physical hardware controllers that can be used with the system. More...

Inheritance diagram for ControllerInterfaceManager:
[legend]
Collaboration diagram for ControllerInterfaceManager:
[legend]

Public Member Functions

void addController (ControllerInterface *joystick)
 Registers a controller with the manager.
void controllerConnectionsChangedSignal ()
 Emitted when controllers are added or removed.
const Dictionary< UUID, ControllerInterface * > & controllers () const
 Returns the dictionary of all registered controllers.
void findControllersSignal ()
 Emitted to request a scan for new controllers.
void removeController (UUID id)
 Removes a controller from the manager by its unique identifier.
void setDefaultWindowInstance (WindowInstance *default_window_instance)
 Sets the default window instance for input routing to all controllers.
void updateStates ()
 Polls all registered controllers and updates their input states.

Static Public Member Functions

static ControllerInterfaceManager & Default ()
 Returns the singleton ControllerInterfaceManager instance.

Protected Attributes

Threadm_controller_thread = nullptr
 Background thread for polling controller state.
Dictionary< UUID, ControllerInterface * > m_controllers
 Map of controller UUIDs to their interfaces.
WindowInstancem_default_window_instance = nullptr
 Default window instance for input routing.

Detailed Description

Stores services that allow the software to access physical hardware controllers that can be used with the system.


Definition at line 228 of file ControllerInterface.h.

Member Function Documentation

◆ addController()

void ControllerInterfaceManager::addController ( ControllerInterface * joystick)

Registers a controller with the manager.

Parameters
[in]joystickThe controller to add.

◆ controllers()

const Dictionary< UUID, ControllerInterface * > & ControllerInterfaceManager::controllers ( ) const

Returns the dictionary of all registered controllers.

Returns
A const reference to the UUID-to-ControllerInterface map.

◆ Default()

ControllerInterfaceManager & ControllerInterfaceManager::Default ( )
static

Returns the singleton ControllerInterfaceManager instance.

Returns
A reference to the default manager.

◆ removeController()

void ControllerInterfaceManager::removeController ( UUID id)

Removes a controller from the manager by its unique identifier.

Parameters
[in]idThe UUID of the controller to remove.

◆ setDefaultWindowInstance()

void ControllerInterfaceManager::setDefaultWindowInstance ( WindowInstance * default_window_instance)

Sets the default window instance for input routing to all controllers.

Parameters
[in]default_window_instanceThe window instance to use as default.

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