ActionManager.hpp
ActionManager collects sets of Actions to be looked up or manipulated later.
Note
Status: Beta
-
class ActionManager
- #include <ActionManager.hpp>
Public Functions
-
inline ActionManager()
-
ActionManager(ActionManager&&) = default
-
inline ActionManager(const ActionManager &in)
-
inline ~ActionManager()
-
inline int GetNextID() const
Get the ID to be used for the next new function.
-
inline size_t GetSize() const
How many actions are in this manager?
-
inline ActionBase &operator[](const std::string &name)
Look up an action with the specified name.
-
inline const ActionBase &operator[](const std::string &name) const
Look up an action with the specified name (const version)
-
template<typename RETURN, typename ...ARGS>
inline auto &Add(const std::function<RETURN(ARGS...)> &in_fun, const std::string &name) Add a functon to this manager with a pre-specified name.
-
template<typename RETURN, typename ...ARGS>
inline auto &Add(const std::function<RETURN(ARGS...)> &in_fun) Add a function to this manager with an auto-generated name.
-
inline auto &Add(const ActionBase &action)
Add an action to this manager.
-
inline ActionManager()