SixenseDevice.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
17 #define SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
18 
19 #include <memory>
20 #include <string>
21 
23 
24 namespace SurgSim
25 {
26 namespace Device
27 {
28 class SixenseScaffold;
29 
30 
53 {
54 public:
58  explicit SixenseDevice(const std::string& uniqueName);
59 
61  virtual ~SixenseDevice();
62 
63  virtual bool initialize() override;
64 
65  virtual bool finalize() override;
66 
68  bool isInitialized() const;
69 
70 private:
71  friend class SixenseScaffold;
72 
73  std::shared_ptr<SixenseScaffold> m_scaffold;
74 };
75 
76 }; // namespace Device
77 }; // namespace SurgSim
78 
79 #endif // SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
Definition: DriveElementFromInputBehavior.cpp:27
virtual ~SixenseDevice()
Destructor.
Definition: SixenseDevice.cpp:35
virtual bool finalize() override
Finalize (de-initialize) the device.
Definition: SixenseDevice.cpp:60
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
bool isInitialized() const
Check wheter this device is initialized.
Definition: SixenseDevice.cpp:70
std::shared_ptr< SixenseScaffold > m_scaffold
Definition: SixenseDevice.h:73
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:34
A class implementing the communication with one Sixense controller, for example one of the two on the...
Definition: SixenseDevice.h:52
A class that manages Sixense devices, such as the Razer Hydra.
Definition: SixenseScaffold.h:35
SixenseDevice(const std::string &uniqueName)
Constructor.
Definition: SixenseDevice.cpp:29
virtual bool initialize() override
Fully initialize the device.
Definition: SixenseDevice.cpp:44