IdentityPoseDevice.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_DEVICES_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_H
#define SURGSIM_DEVICES_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_H
#include <memory>
#include <string>
#include "SurgSim/Input/CommonDevice.h"
namespace SurgSim
{
namespace Devices
{
SURGSIM_STATIC_REGISTRATION(IdentityPoseDevice);
class IdentityPoseDevice : public SurgSim::Input::CommonDevice
{
public:
explicit IdentityPoseDevice(const std::string& uniqueName);
SURGSIM_CLASSNAME(SurgSim::Devices::IdentityPoseDevice);
bool addInputConsumer(std::shared_ptr<SurgSim::Input::InputConsumerInterface> inputConsumer) override;
bool initialize() override;
bool isInitialized() const override;
protected:
static SurgSim::DataStructures::DataGroup buildInputData();
private:
bool finalize() override;
bool m_initialized;
};
}; // namespace Devices
}; // namespace SurgSim
#endif // SURGSIM_DEVICES_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Devices::IdentityPoseDevice::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Devices::IdentityPoseDevice)
SurgSim::Devices::IdentityPoseDevice
A class implementing the identity pose device, which is a pretend device that doesn&#39;t move...
Definition: IdentityPoseDevice.h:38
SurgSim::DataStructures::DataGroup
A collection of NamedData objects.
Definition: DataGroup.h:68
SurgSim::Devices::IdentityPoseDevice::initialize
bool initialize() override
Fully initialize the device.
Definition: IdentityPoseDevice.cpp:41
SurgSim::Input::CommonDevice
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:35
SurgSim::Devices::IdentityPoseDevice::m_initialized
bool m_initialized
true if initialized and not finalized.
Definition: IdentityPoseDevice.h:61
SurgSim::Devices::IdentityPoseDevice::IdentityPoseDevice
IdentityPoseDevice(const std::string &uniqueName)
Constructor.
Definition: IdentityPoseDevice.cpp:35
CommonDevice.h
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::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::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