SerializationMockComponent.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_TESTING_SERIALIZATIONMOCKCOMPONENT_H
17 #define SURGSIM_TESTING_SERIALIZATIONMOCKCOMPONENT_H
18 
21 
22 SURGSIM_STATIC_REGISTRATION(SerializationMockComponent);
23 
28 {
29 public:
30  explicit SerializationMockComponent(const std::string& name, bool succeedInit = true, bool succeedWakeUp = true);
31 
33 
35 
36  virtual bool doInitialize();
37  virtual bool doWakeUp();
38 
39  bool getSucceedWithInit() const;
40  void setSucceedWithInit(bool val);
41 
42  bool getSucceedWithWakeUp() const;
43  void setSucceedWithWakeUp(bool val);
44 
47  bool didWakeUp;
48  bool didInit;
49 };
50 
51 #endif // SURGSIM_TESTING_SERIALIZATIONMOCKCOMPONENT_H
SerializationMockComponent::setSucceedWithInit
void setSucceedWithInit(bool val)
Definition: SerializationMockComponent.cpp:58
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::doWakeUp
virtual bool doWakeUp()
Interface to be implemented by derived classes.
Definition: SerializationMockComponent.cpp:47
SerializationMockComponent::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SerializationMockComponent)
SerializationMockComponent::setSucceedWithWakeUp
void setSucceedWithWakeUp(bool val)
Definition: SerializationMockComponent.cpp:68
ObjectFactory.h
SerializationMockComponent::getSucceedWithInit
bool getSucceedWithInit() const
Definition: SerializationMockComponent.cpp:53
SerializationMockComponent::getSucceedWithWakeUp
bool getSucceedWithWakeUp() const
Definition: SerializationMockComponent.cpp:63
Component.h
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::succeedWithWakeUp
bool succeedWithWakeUp
Definition: SerializationMockComponent.h:46
SerializationMockComponent::didWakeUp
bool didWakeUp
Definition: SerializationMockComponent.h:47
SerializationMockComponent::doInitialize
virtual bool doInitialize()
Interface to be implemented by derived classes.
Definition: SerializationMockComponent.cpp:41
string
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
SerializationMockComponent::SerializationMockComponent
SerializationMockComponent(const std::string &name, bool succeedInit=true, bool succeedWakeUp=true)
Definition: SerializationMockComponent.cpp:20
SerializationMockComponent::~SerializationMockComponent
virtual ~SerializationMockComponent()
Definition: SerializationMockComponent.cpp:36
SerializationMockComponent::succeedWithInit
bool succeedWithInit
Definition: SerializationMockComponent.h:45
SerializationMockComponent::didInit
bool didInit
Definition: SerializationMockComponent.h:48