OpenNIDevice.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_OPENNI_OPENNIDEVICE_H
17 #define SURGSIM_DEVICES_OPENNI_OPENNIDEVICE_H
18 
20 
21 namespace SurgSim
22 {
23 namespace Devices
24 {
25 class OpenNIScaffold;
26 
27 SURGSIM_STATIC_REGISTRATION(OpenNIDevice);
28 
42 {
43 public:
46  explicit OpenNIDevice(const std::string& name);
47 
49 
51  virtual ~OpenNIDevice();
52 
53  bool initialize() override;
54 
55  bool isInitialized() const override;
56 
57 private:
58  friend class OpenNIScaffold;
59 
60  bool finalize() override;
61 
62  std::shared_ptr<OpenNIScaffold> m_scaffold;
63 };
64 
65 };
66 };
67 
68 #endif //SURGSIM_DEVICES_OPENNI_OPENNIDEVICE_H
SurgSim::Devices::OpenNIDevice::initialize
bool initialize() override
Fully initialize the device.
Definition: OpenNIDevice.cpp:42
SurgSim::Devices::OpenNIDevice::finalize
bool finalize() override
Finalize (de-initialize) the device.
Definition: OpenNIDevice.cpp:57
SurgSim::Devices::OpenNIDevice::isInitialized
bool isInitialized() const override
Definition: OpenNIDevice.cpp:65
SurgSim
Definition: CompoundShapeToGraphics.cpp:30
SurgSim::Input::CommonDevice
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:36
SurgSim::Devices::OpenNIScaffold
A class that manages OpenNI devices.
Definition: OpenNIScaffold.h:41
SurgSim::Devices::OpenNIDevice::m_scaffold
std::shared_ptr< OpenNIScaffold > m_scaffold
Definition: OpenNIDevice.h:62
CommonDevice.h
SurgSim::Devices::OpenNIDevice::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Devices::OpenNIDevice)
SurgSim::Devices::OpenNIDevice::OpenNIDevice
OpenNIDevice(const std::string &name)
Constructor.
Definition: OpenNIDevice.cpp:27
SurgSim::Devices::OpenNIDevice
A class implementing the communication with one OpenNI compatible depth camera.
Definition: OpenNIDevice.h:42
string
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
SurgSim::Devices::OpenNIDevice::~OpenNIDevice
virtual ~OpenNIDevice()
Destructor.
Definition: OpenNIDevice.cpp:33