SerializationMockComponent.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_TESTING_SERIALIZATIONMOCKCOMPONENT_H
#define SURGSIM_TESTING_SERIALIZATIONMOCKCOMPONENT_H
#include "SurgSim/Framework/Component.h"
#include "SurgSim/Framework/ObjectFactory.h"
SURGSIM_STATIC_REGISTRATION(SerializationMockComponent);
class SerializationMockComponent : public SurgSim::Framework::Component
{
public:
explicit SerializationMockComponent(const std::string& name, bool succeedInit = true, bool succeedWakeUp = true);
virtual ~SerializationMockComponent();
SURGSIM_CLASSNAME(SerializationMockComponent);
virtual bool doInitialize();
virtual bool doWakeUp();
bool getSucceedWithInit() const;
void setSucceedWithInit(bool val);
bool getSucceedWithWakeUp() const;
void setSucceedWithWakeUp(bool val);
bool succeedWithInit;
bool succeedWithWakeUp;
bool didWakeUp;
bool didInit;
};
#endif // SURGSIM_TESTING_SERIALIZATIONMOCKCOMPONENT_H
SerializationMockComponent::setSucceedWithInit
void setSucceedWithInit(bool val)
Definition: SerializationMockComponent.cpp:58
SerializationMockComponent::SerializationMockComponent
SerializationMockComponent(const std::string &name, bool succeedInit=true, bool succeedWakeUp=true)
Definition: SerializationMockComponent.cpp:20
SerializationMockComponent::didInit
bool didInit
Definition: SerializationMockComponent.h:48
SerializationMockComponent::didWakeUp
bool didWakeUp
Definition: SerializationMockComponent.h:47
SerializationMockComponent::succeedWithInit
bool succeedWithInit
Definition: SerializationMockComponent.h:45
Component.h
ObjectFactory.h
SerializationMockComponent::getSucceedWithInit
bool getSucceedWithInit() const
Definition: SerializationMockComponent.cpp:53
SerializationMockComponent::doWakeUp
virtual bool doWakeUp()
Interface to be implemented by derived classes.
Definition: SerializationMockComponent.cpp:47
SerializationMockComponent::getSucceedWithWakeUp
bool getSucceedWithWakeUp() const
Definition: SerializationMockComponent.cpp:63
SurgSim::Framework::Component
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:42
SerializationMockComponent::setSucceedWithWakeUp
void setSucceedWithWakeUp(bool val)
Definition: SerializationMockComponent.cpp:68
SerializationMockComponent
This class is for testing the linker and checking if the definition stays in the executable even if t...
Definition: SerializationMockComponent.h:27
SerializationMockComponent::~SerializationMockComponent
virtual ~SerializationMockComponent()
Definition: SerializationMockComponent.cpp:36
SerializationMockComponent::doInitialize
virtual bool doInitialize()
Interface to be implemented by derived classes.
Definition: SerializationMockComponent.cpp:41
SerializationMockComponent::succeedWithWakeUp
bool succeedWithWakeUp
Definition: SerializationMockComponent.h:46
SerializationMockComponent::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SerializationMockComponent)