16 #ifndef SURGSIM_DEVICES_KEYBOARD_KEYBOARDSCAFFOLD_H
17 #define SURGSIM_DEVICES_KEYBOARD_KEYBOARDSCAFFOLD_H
26 namespace DataStructures
34 class OsgKeyboardHandler;
48 explicit KeyboardScaffold(std::shared_ptr<SurgSim::Framework::Logger> logger =
nullptr);
54 std::shared_ptr<SurgSim::Framework::Logger>
getLogger()
const;
95 std::shared_ptr<SurgSim::Framework::Logger>
m_logger;
105 #endif // SURGSIM_DEVICES_KEYBOARD_KEYBOARDSCAFFOLD_H
Definition: DriveElementFromInputBehavior.cpp:27
std::unique_ptr< DeviceData > m_device
The keyboard device managed by this scaffold.
Definition: KeyboardScaffold.h:99
LogLevel
Logging levels.
Definition: Logger.h:36
~KeyboardScaffold()
Destructor.
Definition: KeyboardScaffold.cpp:66
A class that implements the behavior of KeyboardDevice objects.
Definition: KeyboardScaffold.h:38
Struct to hold a KeyboardDevice object, a KeyboardHandler object, and a mutex for data passing...
Definition: KeyboardScaffold.cpp:34
bool updateDevice(int key, int modifierMask)
Updates the device information for a single device.
Definition: KeyboardScaffold.cpp:93
static SurgSim::Framework::LogLevel m_defaultLogLevel
The default logging level.
Definition: KeyboardScaffold.h:97
static void setDefaultLogLevel(SurgSim::Framework::LogLevel logLevel)
Sets the default log level.
Definition: KeyboardScaffold.cpp:125
std::shared_ptr< SurgSim::Framework::Logger > m_logger
Logger used by the scaffold and all devices.
Definition: KeyboardScaffold.h:95
A class implementing the communication with a keyboard.
Definition: KeyboardDevice.h:44
std::shared_ptr< SurgSim::Framework::Logger > getLogger() const
Gets the logger used by this object and the devices it manages.
Definition: KeyboardScaffold.cpp:130
OsgKeyboardHandler * getKeyboardHandler() const
Get keyboard handler.
Definition: KeyboardScaffold.cpp:104
A collection of NamedData objects.
Definition: DataGroup.h:66
static SurgSim::DataStructures::DataGroup buildDeviceInputData()
Builds the data layout for the application input (i.e. device output).
Definition: KeyboardScaffold.cpp:111
Definition: OsgKeyboardHandler.h:30
bool unregisterDevice()
Unregisters the specified device object.
Definition: KeyboardScaffold.cpp:82
bool registerDevice(KeyboardDevice *device)
Registers the specified device object.
Definition: KeyboardScaffold.cpp:71
KeyboardScaffold(std::shared_ptr< SurgSim::Framework::Logger > logger=nullptr)
Constructor.
Definition: KeyboardScaffold.cpp:56
friend class KeyboardDeviceTest
Definition: KeyboardScaffold.h:41
static std::shared_ptr< KeyboardScaffold > getOrCreateSharedInstance()
Gets or creates the scaffold shared by all KeyboardDevice instances.
Definition: KeyboardScaffold.cpp:119