Represents class which is responsible for storing and mapping Action
functor value to a string key.
More...
#include <ConversionContextActionMap.hpp>
|
void | AddAction (const std::string &key, ActionFunctor action) |
| Adds new action to the ActionMap mapped to a string key. Duplicated key will be rewritten.
|
|
bool | VerifyKey (const std::string &key) const |
| Verifies if the given key exists in the ActionMap.
|
|
std::shared_ptr< ConversionContextAction< ConversionContext > > | GetAction (const std::string &key, Argument arg) const |
| Gets a shared pointer owning a ConversionContextAction object. The function creates new object using functor stored in the ActionMap and passed arg which is passed in to the Action constructor.
|
|
Represents class which is responsible for storing and mapping Action
functor value to a string key.
◆ AddAction()
Adds new action to the ActionMap mapped to a string key. Duplicated key will be rewritten.
- Parameters
-
key | key which will be mapped to the Action |
action | ActionFunctor representing the given Action |
◆ GetAction()
Gets a shared pointer owning a ConversionContextAction object. The function creates new object using functor stored in the ActionMap and passed arg
which is passed in to the Action constructor.
- Parameters
-
key | key identifying the given Action |
arg | argument passed into the function responsible for creating the given Action |
- Returns
- nullptr if the key does not exists, otherwise shared pointer owning the given ConversionContextAction object
◆ VerifyKey()
Verifies if the given key exists in the ActionMap.
- Parameters
-
key | key identifying the given Action |
- Returns
- true if the key is present, false if the key is not present.
The documentation for this class was generated from the following file: