Program Listing for File application.h¶
↰ Return to documentation for file (applications/application.h)
#pragma once
#include <yaml-cpp/yaml.h>
#include "lupnt/core/config.h"
#include "lupnt/core/definitions.h"
#include "lupnt/core/object.h"
namespace lupnt {
class Agent;
class Application : public Object<Application> {
public:
Application() = default;
Application(Config& config);
virtual ~Application() = default;
virtual void Setup();
virtual void Step(Real t) = 0;
virtual void Log(Real t);
std::string GetName() const { return name_; }
void SetName(std::string name) { name_ = name; }
Real GetFrequency() const { return frequency_; }
void SetFrequency(Real frequency) { frequency_ = frequency; }
Agent* GetAgent() const { return agent_; }
void SetAgent(Agent* agent) { agent_ = agent; }
protected:
std::string name_;
Real frequency_ = 0.0;
Agent* agent_ = nullptr;
Config config_;
};
}; // namespace lupnt