iMSTK
Interactive Medical Simulation Toolkit
imstkConsoleModule.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkModule.h"
10 #include "imstkMacros.h"
11 
12 namespace imstk
13 {
14 class KeyboardDeviceClient;
15 
23 class ConsoleModule : public Module
24 {
25 public:
26  ConsoleModule(std::string name = "ConsoleModule");
27  ~ConsoleModule() override = default;
28 
29  IMSTK_TYPE_NAME(ConsoleModule)
30 
31  std::shared_ptr<KeyboardDeviceClient> getKeyboardDevice() const { return m_keyboardDeviceClient; }
32 
33 protected:
34  bool initModule() override { return true; }
35 
39  void updateModule() override;
40 
41  std::shared_ptr<KeyboardDeviceClient> m_keyboardDeviceClient;
42 };
43 } // namespace imstk
void updateModule() override
Awaits input.
Compound Geometry.
The console thread can run separately or in sync to provide keyboard events from the console they sho...
Base class for imstk module system. A module defines something that is updated, and can be paused/res...
Definition: imstkModule.h:21