Empirical
Classes | Namespaces | Functions
Action.h File Reference

A mechanism to abstract functions from their underlying type and provide run-time names. More...

#include <functional>
#include <string>

Go to the source code of this file.

Classes

class  emp::ActionBase
 
class  emp::ActionSize< ARG_COUNT >
 
class  emp::Action< ARGS >
 
class  emp::Action< void(ARGS...)>
 
class  emp::Action< RETURN(ARGS...)>
 

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Functions

template<typename RETURN , typename... ARGS>
auto emp::make_action (const std::function< RETURN(ARGS...)> &in_fun, const std::string &name="")
 Build an action object using this function. More...
 

Detailed Description

A mechanism to abstract functions from their underlying type and provide run-time names.

Allow functions to be bundled (as Actions) and triggered enmasse.

ActionManager collects sets of Actions to be looked up or manipulated later.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2016-2017
Note
Status: Beta
Todo:

Create an ActionDefaults class that can take fewer args than expected and fill in rest.

Allow for named arguments to facilite intepreted functions.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2016-2017
Note
Status: Beta
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2016-2018
Note
Status: Beta
Todo:

Setup easier mechanism to control the order in which actions are triggered.

Signals should have default parameters so not all need be supplied when triggered.