state_machine_observer.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (Apache License)
3  *
4  * Copyright (c) 2018 Plus One Robotics
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #ifndef STATE_MACHINE_OBSERVER_H
19 #define STATE_MACHINE_OBSERVER_H
20 
22 
23 #include <memory>
24 
26 {
27 public:
28  StateMachineObserver(std::shared_ptr<packml_sm::AbstractStateMachine> sm);
30 
31  void setStateChangedCallback(std::function<void(int)> callback);
32 
33 private:
34  std::shared_ptr<packml_sm::AbstractStateMachine> sm_;
35  std::function<void(int)> state_changed_callback_;
36 
38 };
39 
40 #endif // STATE_MACHINE_OBSERVER_H
std::function< void(int)> state_changed_callback_
The StateMachineInterface class defines a implementation independent interface to a PackML state mach...
void setStateChangedCallback(std::function< void(int)> callback)
StateMachineObserver(std::shared_ptr< packml_sm::AbstractStateMachine > sm)
std::shared_ptr< packml_sm::AbstractStateMachine > sm_
void handleStateChanged(packml_sm::AbstractStateMachine &state_machine, const packml_sm::StateChangedEventArgs &args)


packml_sm
Author(s): Shaun Edwards
autogenerated on Fri Jul 12 2019 03:30:55