![]() |
fpmas 1.6
|
#include <model.h>
Public Member Functions | |
BehaviorWithArgs (void(AgentType::*behavior)(Args...), Args... args) | |
void | execute (api::model::Agent *agent) const override |
virtual void | execute (Agent *agent) const =0 |
An api::model::Behavior implementation that can take some arbitrary arguments.
The arguments are provided in the constructor, and are passed to the specified behavior each time execute() is called. Using pointers or references can be used as arguments if dynamic parameter update is required.
|
inline |
BehaviorWithArgs constructor.
behavior | The AgentType method that will be called by execute() with the specified arguments |
args | argument list that will be passed to behavior |
|
inlineoverridevirtual |
Calls behavior
on the specified agent
with the arguments specified in the constructor.
agent | agent to execute |
Implements fpmas::api::model::Behavior.