载入中...
搜索中...
未找到
eve::joystick::sdl::Joystick类 参考

SDL joystick/gamepad module backend (device enumeration and mappings). 更多...

#include <Joystick.h>

类 eve::joystick::sdl::Joystick 继承关系图:
eve::joystick::Joystick eve::Module

Public 成员函数

 Joystick ()
 Initializes SDL joystick subsystems used by this backend.
 
 ~Joystick () override
 Closes all tracked pads.
 
Pad * addJoystick (int deviceindex) override
 Open a device by SDL device index; returns null on failure.
 
void removeJoystick (eve::joystick::Pad *pad) override
 Removes and destroys a previously opened pad.
 
Pad * getJoystickFromID (int instanceid) override
 Looks up a pad by SDL instance id; null if unknown.
 
Pad * getJoystick (int joyindex) override
 Pad at a dense joyindex in [0, getJoystickCount()).
 
int getIndex (const eve::joystick::Pad *pad) override
 Dense index of pad, or -1 if not tracked.
 
int getJoystickCount () const override
 Number of currently tracked pads.
 
void loadGamepadMappings (const std::string &mappings) override
 Load SDL GameController mapping database (newline-separated).
 
std::string saveGamepadMappings () override
 Serializes the in-memory GameController mapping database.
 
std::string getGamepadMappingString (const std::string &guid) const override
 Mapping string for a device GUID, or empty if none.
 
- Public 成员函数 继承自 eve::joystick::Joystick
 Module_REG (Joystick)
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 

详细描述

SDL joystick/gamepad module backend (device enumeration and mappings).

在文件 Joystick.h 第 14 行定义.

构造及析构函数说明

◆ Joystick()

eve::joystick::sdl::Joystick::Joystick ( )

Initializes SDL joystick subsystems used by this backend.

在文件 Joystick.cpp 第 15 行定义.

引用了 addJoystick() , 以及 eve::joystick::sdl::bindJoystickEventSinkOwner().

◆ ~Joystick()

eve::joystick::sdl::Joystick::~Joystick ( )
overridevirtual

Closes all tracked pads.

重载 eve::joystick::Joystick .

在文件 Joystick.cpp 第 27 行定义.

引用了 eve::joystick::sdl::bindJoystickEventSinkOwner().

成员函数说明

◆ addJoystick()

Pad * eve::joystick::sdl::Joystick::addJoystick ( int  deviceindex)
overridevirtual

Open a device by SDL device index; returns null on failure.

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 63 行定义.

引用了 active, pad, removeJoystick() , 以及 reused.

被这些函数引用 Joystick().

◆ getGamepadMappingString()

std::string eve::joystick::sdl::Joystick::getGamepadMappingString ( const std::string &  guid) const
overridevirtual

Mapping string for a device GUID, or empty if none.

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 175 行定义.

◆ getIndex()

int eve::joystick::sdl::Joystick::getIndex ( const eve::joystick::Pad *  pad)
overridevirtual

Dense index of pad, or -1 if not tracked.

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 45 行定义.

引用了 pad.

◆ getJoystick()

Pad * eve::joystick::sdl::Joystick::getJoystick ( int  joyindex)
overridevirtual

Pad at a dense joyindex in [0, getJoystickCount()).

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 40 行定义.

◆ getJoystickCount()

int eve::joystick::sdl::Joystick::getJoystickCount ( ) const
overridevirtual

Number of currently tracked pads.

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 52 行定义.

◆ getJoystickFromID()

Pad * eve::joystick::sdl::Joystick::getJoystickFromID ( int  instanceid)
overridevirtual

Looks up a pad by SDL instance id; null if unknown.

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 56 行定义.

◆ loadGamepadMappings()

void eve::joystick::sdl::Joystick::loadGamepadMappings ( const std::string &  mappings)
overridevirtual

Load SDL GameController mapping database (newline-separated).

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 142 行定义.

◆ removeJoystick()

void eve::joystick::sdl::Joystick::removeJoystick ( eve::joystick::Pad *  pad)
overridevirtual

Removes and destroys a previously opened pad.

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 104 行定义.

引用了 pad.

被这些函数引用 addJoystick().

◆ saveGamepadMappings()

std::string eve::joystick::sdl::Joystick::saveGamepadMappings ( )
overridevirtual

Serializes the in-memory GameController mapping database.

实现了 eve::joystick::Joystick.

在文件 Joystick.cpp 第 188 行定义.

引用了 g.


该类的文档由以下文件生成: