Class sdm::BaseAction
template <typename TAction typename TAction>
Class List > sdm > BaseAction
A base class inheriting from the Action interface. More...
#include <base_action.hpp>
Inherits the following classes: Action
Public Functions
| Type | Name |
|---|---|
| BaseAction () | |
| BaseAction (const TAction & action) | |
| virtual TAction | getAction () const Get the data corresponding to the stored state. |
| virtual void | setAction (const TAction & action) Set the data corresponding to the stored state. |
| virtual std::string | str () const |
| virtual | ~BaseAction () |
Protected Attributes
| Type | Name |
|---|---|
| TAction | action_ |
Detailed Description
Template parameters:
TActionthe type of data used for the action.
This class can be used to instantiate an action represented by any type.
BaseState<char> action('a'), action2('b'); // Instanciate an action stored as a character.
BaseState<float> float_action(0.0), float_action2(0.1); // Instanciate an action stored as a float.
Public Functions Documentation
function BaseAction [1/2]
inline sdm::BaseAction::BaseAction ()
function BaseAction [2/2]
inline sdm::BaseAction::BaseAction (
const TAction & action
)
function getAction
inline virtual TAction sdm::BaseAction::getAction () const
Returns:
the data
function setAction
inline virtual void sdm::BaseAction::setAction (
const TAction & action
)
Parameters:
statethe data
function str
inline virtual std::string sdm::BaseAction::str () const
function ~BaseAction
inline virtual sdm::BaseAction::~BaseAction ()
Protected Attributes Documentation
variable action_
TAction sdm::BaseAction< TAction >::action_;
The documentation for this class was generated from the following file src/sdm/core/action/base_action.hpp