Empirical
|
Base class for all signals. More...
#include <Signal.h>
Public Member Functions | |
SignalBase ()=delete | |
SignalBase (const SignalBase &)=delete | |
SignalBase (SignalBase &&)=delete | |
SignalBase & | operator= (const SignalBase &)=delete |
SignalBase & | operator= (SignalBase &&)=delete |
virtual | ~SignalBase () |
virtual SignalBase * | Clone () const =0 |
const std::string & | GetName () const |
virtual size_t | GetNumArgs () const =0 |
virtual size_t | GetNumActions () const =0 |
template<typename... ARGS> | |
void | BaseTrigger (ARGS...args) |
template<typename... ARGS> | |
SignalKey | AddAction (const std::function< void(ARGS...)> &in_fun) |
Actions without arguments or a return type can be associated with any signal. More... | |
virtual SignalKey | AddAction (ActionBase &)=0 |
Add an action using an Action object. More... | |
virtual void | Remove (SignalKey key)=0 |
Remove an action specified by its key. More... | |
void | Clear () |
Remove all actions from this signal. More... | |
bool | Has (SignalKey key) const |
Protected Types | |
using | man_t = internal::SignalManager_Base |
Protected Member Functions | |
SignalKey | NextSignalKey () |
SignalBase (const std::string &n, internal::SignalManager_Base *manager=nullptr) | |
Protected Attributes | |
std::string | name |
What is the unique name of this signal? More... | |
uint32_t | signal_id |
What is the unique ID of this signal? More... | |
uint32_t | next_link_id |
What ID shouild the next link have? More... | |
std::map< SignalKey, size_t > | link_key_map |
Map unique link keys to link index for actions. More... | |
emp::vector< man_t * > | managers |
What manager is handling this signal? More... | |
man_t * | prime_manager |
Which manager leads deletion? (nullptr for self) More... | |
Friends | |
class | SignalManager |
Base class for all signals.
|
protected |
|
inlineprotected |
|
delete |
|
delete |
|
delete |
|
inlinevirtual |
|
inline |
Actions without arguments or a return type can be associated with any signal.
|
pure virtual |
Add an action using an Action object.
Implemented in emp::Signal< RETURN(ARGS...)>, and emp::Signal< void(ARGS...)>.
|
inline |
|
inline |
Remove all actions from this signal.
|
pure virtual |
Implemented in emp::Signal< RETURN(ARGS...)>, and emp::Signal< void(ARGS...)>.
|
inline |
|
pure virtual |
Implemented in emp::Signal< RETURN(ARGS...)>, and emp::Signal< void(ARGS...)>.
|
pure virtual |
Implemented in emp::Signal< RETURN(ARGS...)>, and emp::Signal< void(ARGS...)>.
|
inline |
|
inlineprotected |
|
delete |
|
delete |
|
pure virtual |
Remove an action specified by its key.
Implemented in emp::Signal< RETURN(ARGS...)>, and emp::Signal< void(ARGS...)>.
|
friend |
|
protected |
Map unique link keys to link index for actions.
|
protected |
What manager is handling this signal?
|
protected |
What is the unique name of this signal?
|
protected |
What ID shouild the next link have?
|
protected |
Which manager leads deletion? (nullptr for self)
|
protected |
What is the unique ID of this signal?