A class that implements the behavior of KeyboardDevice objects.
More...
#include <SurgSim/Devices/Keyboard/KeyboardScaffold.h>
A class that implements the behavior of KeyboardDevice objects.
- See also
- SurgSim::Devices::KeyboardDevice
§ KeyboardScaffold()
SurgSim::Devices::KeyboardScaffold::KeyboardScaffold |
( |
| ) |
|
§ ~KeyboardScaffold()
SurgSim::Devices::KeyboardScaffold::~KeyboardScaffold |
( |
| ) |
|
§ buildDeviceInputData()
Builds the data layout for the application input (i.e. device output).
§ getKeyboardHandler()
Get keyboard handler.
- Returns
- The keyboard handler associated with this device
§ getOrCreateSharedInstance()
std::shared_ptr< KeyboardScaffold > SurgSim::Devices::KeyboardScaffold::getOrCreateSharedInstance |
( |
| ) |
|
|
static |
Gets or creates the scaffold shared by all KeyboardDevice instances.
The scaffold is managed using a SharedInstance object, so it will be destroyed when all devices are released.
- Returns
- the scaffold object.
§ registerDevice()
bool SurgSim::Devices::KeyboardScaffold::registerDevice |
( |
KeyboardDevice * |
device | ) |
|
|
private |
Registers the specified device object.
If successful, the device object will become connected to an hardware device.
- Parameters
-
device | The device object to be used, which should have a unique name. |
- Returns
- True if the initialization succeeds, false if it fails.
§ unregisterDevice()
bool SurgSim::Devices::KeyboardScaffold::unregisterDevice |
( |
| ) |
|
|
private |
Unregisters the specified device object.
The corresponding controller will become unused, and can be re-registered later.
- Returns
- True on success, false on failure.
§ updateDevice()
bool SurgSim::Devices::KeyboardScaffold::updateDevice |
( |
int |
key, |
|
|
int |
modifierMask |
|
) |
| |
|
private |
Updates the device information for a single device.
- Parameters
-
key | Unmodified OSG key code. |
modifierMask | Modifier mask. |
- Returns
- True on success.
§ KeyboardDevice
§ KeyboardDeviceTest
friend class KeyboardDeviceTest |
|
friend |
§ OsgKeyboardHandler
§ m_device
std::unique_ptr<DeviceData> SurgSim::Devices::KeyboardScaffold::m_device |
|
private |
The keyboard device managed by this scaffold.
§ m_logger
Logger used by the scaffold and all devices.
The documentation for this class was generated from the following files: