39 lines
891 B
C++
39 lines
891 B
C++
/*
|
||
* ControlStateActions.hh
|
||
*
|
||
* Created on: 23 окт. 2022 г.
|
||
* Author: titov
|
||
*/
|
||
|
||
#ifndef UMLIBRARY_TECHNOLOGICAL_DRIVECONTROL_CONTROLSTATEACTIONS_HH_
|
||
#define UMLIBRARY_TECHNOLOGICAL_DRIVECONTROL_CONTROLSTATEACTIONS_HH_
|
||
|
||
#include "../IExecutorState.hh"
|
||
#include "../../systemic/IFunctor.hh"
|
||
|
||
namespace technological { namespace drivecontrol {
|
||
|
||
struct ControlStateActions : public IExecutorState {
|
||
|
||
typedef systemic::IFunctor<void> Action;
|
||
|
||
bool on_entry();
|
||
bool execute( CommandCode code, const char * args, std::size_t size );
|
||
CommandCode isComplite() const;
|
||
void reset();
|
||
void on_exit();
|
||
|
||
ControlStateActions( IExecutorState & state, Action & do_entry, Action & do_exit );
|
||
private:
|
||
IExecutorState & state;
|
||
|
||
Action & entry_action;
|
||
Action & exit_action;
|
||
};
|
||
|
||
}}
|
||
|
||
|
||
|
||
#endif /* UMLIBRARY_TECHNOLOGICAL_DRIVECONTROL_CONTROLSTATEACTIONS_HH_ */
|