Empirical
|
#include <Action.h>
Public Types | |
using | this_t = Action< void(ARGS...)> |
using | parent_t = ActionSize< sizeof...(ARGS)> |
Public Member Functions | |
Action (const std::function< void(ARGS...)> &in_fun, const std::string &in_name="") | |
template<typename RETURN > | |
Action (const std::function< RETURN(ARGS...)> &in_fun, const std::string &in_name="") | |
Action (const this_t &)=default | |
Action (this_t &&)=default | |
this_t & | operator= (const this_t &)=default |
this_t & | operator= (this_t &&)=default |
const std::function< void(ARGS...)> & | GetFun () const |
void | Call (ARGS &&...args) |
Call the function associated with this action. More... | |
this_t * | Clone () const |
Build a copy of this Action. More... | |
size_t | GetArgCount () const |
Get number of arguments this action takes. More... | |
const std::string & | GetName () const |
Get the name of this action. More... | |
Protected Attributes | |
std::function< void(ARGS...)> | fun |
The specific function associated with this action. More... | |
std::string | name |
A unique name for this action so it can be called at runtime. More... | |
This Action class specialization takes a function with a void return tyime and builds it off of the action base classes.
using emp::Action< void(ARGS...)>::parent_t = ActionSize<sizeof...(ARGS)> |
using emp::Action< void(ARGS...)>::this_t = Action<void(ARGS...)> |
|
inline |
|
inline |
|
default |
|
default |
|
inline |
Call the function associated with this action.
|
inlinevirtual |
Build a copy of this Action.
Implements emp::ActionBase.
|
inlinevirtualinherited |
Get number of arguments this action takes.
Implements emp::ActionBase.
|
inline |
|
inlineinherited |
Get the name of this action.
|
default |
|
default |
|
protected |
The specific function associated with this action.
|
protectedinherited |
A unique name for this action so it can be called at runtime.