mirror of
https://github.com/JHUAPL/kami.git
synced 2026-01-09 14:58:02 -05:00
Add dummy c'stor and d'stor to the starter example
This commit is contained in:
@@ -53,6 +53,14 @@ struct fmt::formatter<kami::AgentID> : fmt::formatter<std::string> {
|
||||
}
|
||||
};
|
||||
|
||||
StarterAgent::StarterAgent() {
|
||||
console->debug("StarterAgent with ID {} constructed", this->get_agent_id());
|
||||
}
|
||||
|
||||
StarterAgent::~StarterAgent() {
|
||||
console->debug("StarterAgent with ID {} deconstructed", this->get_agent_id());
|
||||
}
|
||||
|
||||
kami::AgentID StarterAgent::step(std::shared_ptr<kami::Model> model) {
|
||||
this->_step_counter++;
|
||||
return this->get_agent_id();
|
||||
|
||||
@@ -32,20 +32,32 @@
|
||||
|
||||
#include <kami/agent.h>
|
||||
#include <kami/kami.h>
|
||||
#include <kami/multigrid1d.h>
|
||||
#include <kami/random.h>
|
||||
|
||||
/**
|
||||
* A starter agent for a starter model
|
||||
*/
|
||||
class StarterAgent : public kami::Agent {
|
||||
private:
|
||||
int _step_counter = 0;
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
StarterAgent();
|
||||
|
||||
/**
|
||||
* Deconstructor
|
||||
*/
|
||||
~StarterAgent();
|
||||
|
||||
/**
|
||||
* Execute a single time-step for the agent
|
||||
*/
|
||||
kami::AgentID step(std::shared_ptr<kami::Model> model) override;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user