Empirical
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
emp::ActionBase Class Referenceabstract

#include <Action.h>

Inheritance diagram for emp::ActionBase:
emp::ActionSize< sizeof...(ARGS)> emp::ActionSize< ARG_COUNT > emp::Action< RETURN(ARGS...)> emp::Action< void(ARGS...)>

Public Member Functions

virtual ~ActionBase ()
 
const std::string & GetName () const
 Get the name of this action. More...
 
virtual size_t GetArgCount () const =0
 Get number of arguments this action takes. More...
 
virtual ActionBaseClone () const =0
 Clone() will produce a pointer to a full copy of an Action, going through derived version. More...
 

Protected Member Functions

 ActionBase (const std::string &in_name)
 
 ActionBase (const ActionBase &)=default
 
 ActionBase (ActionBase &&)=default
 
ActionBaseoperator= (const ActionBase &)=default
 
ActionBaseoperator= (ActionBase &&)=default
 

Protected Attributes

std::string name
 A unique name for this action so it can be called at runtime. More...
 

Detailed Description

BaseActions abstract functions and allow for signals to be setup at runtime; they can be called with types specified in the call.

Actions can be a bit heavyweight, but can easily be converted to more lightweight std:function objects.

Constructor & Destructor Documentation

emp::ActionBase::ActionBase ( const std::string &  in_name)
inlineprotected
emp::ActionBase::ActionBase ( const ActionBase )
protecteddefault
emp::ActionBase::ActionBase ( ActionBase &&  )
protecteddefault
virtual emp::ActionBase::~ActionBase ( )
inlinevirtual

Member Function Documentation

virtual ActionBase* emp::ActionBase::Clone ( ) const
pure virtual

Clone() will produce a pointer to a full copy of an Action, going through derived version.

Implemented in emp::Action< RETURN(ARGS...)>, and emp::Action< void(ARGS...)>.

virtual size_t emp::ActionBase::GetArgCount ( ) const
pure virtual

Get number of arguments this action takes.

Implemented in emp::ActionSize< ARG_COUNT >, and emp::ActionSize< sizeof...(ARGS)>.

const std::string& emp::ActionBase::GetName ( ) const
inline

Get the name of this action.

ActionBase& emp::ActionBase::operator= ( const ActionBase )
protecteddefault
ActionBase& emp::ActionBase::operator= ( ActionBase &&  )
protecteddefault

Member Data Documentation

std::string emp::ActionBase::name
protected

A unique name for this action so it can be called at runtime.


The documentation for this class was generated from the following file: