|
TuringSim
C++ framework to simulate abstract computing models
|
The transition base class for AmnesicMachine. More...
#include <transition/amnesic/amnesicMachineTransition.h>


Public Member Functions | |
| AmnesicMachineTransition ()=default | |
| The default constructor. | |
| AmnesicMachineTransition (const AmnesicMachineTransition &)=default | |
| The default copy constructor. | |
| AmnesicMachineTransition (AmnesicMachineTransition &&)=default | |
| The default move constructor. | |
| AmnesicMachineTransition & | operator= (const AmnesicMachineTransition &)=default |
| The default copy assignment operator. More... | |
| AmnesicMachineTransition & | operator= (AmnesicMachineTransition &&)=default |
| The default move assignment operator. More... | |
| virtual | ~AmnesicMachineTransition () override=default |
| The default virtual destructor. | |
| virtual std::optional< ApplyHelperType > | match (const StateType &state, const StorageType &storage) const override final |
| Test whether the transition matches a configuration. Returned optional is empty iff the transition does not match. More... | |
| virtual std::optional< ApplyHelperType > | matchFromState (const StateType &state) const =0 |
| Test whether the transition matches a configuration. Returned optional is empty iff the transition does not match. More... | |
| virtual StateType | apply (const StateType &state, StorageType &storage, ApplyHelperType &&helper, bool &running) const override final |
| Apply a previously matching transition and return the new state. More... | |
| virtual StateType | applyFromState (const StateType &state, bool &running) const =0 |
| Apply a previously matching transition and return the new state, without irrelevant parameters. More... | |
Public Member Functions inherited from TuringSim::Transition::Transition< StateType_, std::monostate, std::monostate > | |
| Transition ()=default | |
| The default constructor. | |
| Transition (const Transition &)=default | |
| The default copy constructor. | |
| Transition (Transition &&)=default | |
| The default move constructor. | |
| Transition & | operator= (const Transition &)=default |
| The default copy assignment operator. More... | |
| Transition & | operator= (Transition &&)=default |
| The default move assignment operator. More... | |
| virtual | ~Transition ()=default |
| The default virtual destructor. | |
Additional Inherited Members | |
Public Types inherited from TuringSim::Transition::Transition< StateType_, std::monostate, std::monostate > | |
| typedef StateType_ | StateType |
| The type of states. | |
| typedef std::monostate | StorageType |
| The type of storage. | |
| typedef std::monostate | ApplyHelperType |
| The type of apply helpers. | |
The transition base class for AmnesicMachine.
| StateType_ | the type of states. |
This class holds no data member.
Definition at line 16 of file amnesicMachineTransition.h.
|
inlinefinaloverridevirtual |
Apply a previously matching transition and return the new state.
| [in] | state | the pre-state. |
| [in] | storage | the pre-storage. |
| [in] | helper | the helper, returned by Transition::match(const StateType& state, const StorageType& storage) const. |
| [in,out] | running | whether the machine is still running. If false, the same state is returned, and running is not updated. If true, the transition is applied, and running may be changed if the transition stop the machine. |
| ConfigurationDoesNotMatchException | if the transition does not match, optionally. |
If we try to apply a transition that does not match, the behavior is undefined.
Implements TuringSim::Transition::Transition< StateType_, std::monostate, std::monostate >.
Definition at line 83 of file amnesicMachineTransition.h.

|
pure virtual |
Apply a previously matching transition and return the new state, without irrelevant parameters.
| [in] | state | the pre-state. |
| [in,out] | running | whether the machine is still running. If false, the same state is returned, and running is not updated. If true, the transition is applied, and running may be changed if the transition stop the machine. |
| ConfigurationDoesNotMatchException | if the transition does not match, optionally. |
If we try to apply a transition that does not match, the behavior is undefined.
Implemented in TuringSim::Transition::Amnesic::SimpleAmnesicMachineTransition< StateType_ >.

|
inlinefinaloverridevirtual |
Test whether the transition matches a configuration. Returned optional is empty iff the transition does not match.
| [in] | state | the pre-state. |
| [in] | storage | the pre-storage. |
A FSM transition looks only at the current letter.
Implements TuringSim::Transition::Transition< StateType_, std::monostate, std::monostate >.
Definition at line 59 of file amnesicMachineTransition.h.

|
pure virtual |
Test whether the transition matches a configuration. Returned optional is empty iff the transition does not match.
| [in] | state | the pre-state. |
A FSM transition looks only at the current letter.
Implemented in TuringSim::Transition::Amnesic::SimpleAmnesicMachineTransition< StateType_ >.

|
default |
The default move assignment operator.
*this.
|
default |
The default copy assignment operator.
*this.