IdentityPoseDevice.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_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_H
17 #define SURGSIM_DEVICES_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_H
18 
19 #include <memory>
20 #include <string>
21 
23 
24 namespace SurgSim
25 {
26 namespace Devices
27 {
28 SURGSIM_STATIC_REGISTRATION(IdentityPoseDevice);
29 
39 {
40 public:
43  explicit IdentityPoseDevice(const std::string& uniqueName);
44 
46 
47  bool addInputConsumer(std::shared_ptr<SurgSim::Input::InputConsumerInterface> inputConsumer) override;
48 
49  bool initialize() override;
50 
51  bool isInitialized() const override;
52 
53 protected:
56 
57 private:
58  bool finalize() override;
59 
62 };
63 
64 
65 }; // namespace Devices
66 }; // namespace SurgSim
67 
68 #endif // SURGSIM_DEVICES_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_H
SurgSim::Devices::IdentityPoseDevice::initialize
bool initialize() override
Fully initialize the device.
Definition: IdentityPoseDevice.cpp:41
SurgSim::Devices::IdentityPoseDevice::IdentityPoseDevice
IdentityPoseDevice(const std::string &uniqueName)
Constructor.
Definition: IdentityPoseDevice.cpp:35
SurgSim::Devices::IdentityPoseDevice::m_initialized
bool m_initialized
true if initialized and not finalized.
Definition: IdentityPoseDevice.h:61
SurgSim::Devices::IdentityPoseDevice::addInputConsumer
bool addInputConsumer(std::shared_ptr< SurgSim::Input::InputConsumerInterface > inputConsumer) override
Adds an input consumer that will be notified when the application input state is updated.
Definition: IdentityPoseDevice.cpp:69
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Input::CommonDevice
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:35
SurgSim::DataStructures::DataGroup
A collection of NamedData objects.
Definition: DataGroup.h:68
SurgSim::Devices::IdentityPoseDevice::buildInputData
static SurgSim::DataStructures::DataGroup buildInputData()
Builds the data layout for the application input (i.e. device output).
Definition: IdentityPoseDevice.cpp:62
SurgSim::Devices::IdentityPoseDevice::isInitialized
bool isInitialized() const override
Definition: IdentityPoseDevice.cpp:49
SurgSim::Devices::IdentityPoseDevice::finalize
bool finalize() override
Finalize (de-initialize) the device.
Definition: IdentityPoseDevice.cpp:54
CommonDevice.h
SurgSim::Devices::IdentityPoseDevice
A class implementing the identity pose device, which is a pretend device that doesn't move.
Definition: IdentityPoseDevice.h:38
SurgSim::Devices::IdentityPoseDevice::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Devices::IdentityPoseDevice)
string
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
IdentityPoseDevice
IdentityPoseDevice
Definition: CMakeLists.txt:35