Program Listing for File SubAgentData.h
↰ Return to documentation for file (include/flamegpu/model/SubAgentData.h
)
#ifndef INCLUDE_FLAMEGPU_MODEL_SUBAGENTDATA_H_
#define INCLUDE_FLAMEGPU_MODEL_SUBAGENTDATA_H_
#include <memory>
#include <string>
#include <unordered_map>
#include "flamegpu/model/SubModelData.h"
namespace flamegpu {
struct AgentData;
class SubAgentDescription;
struct SubAgentData : std::enable_shared_from_this<SubAgentData> {
friend class SubAgentDescription;
friend class SubModelDescription;
friend struct ModelData;
std::weak_ptr<const ModelData> model;
std::weak_ptr<AgentData> subAgent;
std::weak_ptr<AgentData> masterAgent;
typedef std::unordered_map<std::string, std::string> Mapping;
Mapping variables = {};
Mapping states = {};
std::weak_ptr<SubModelData> parent;
bool operator==(const SubAgentData& rhs) const;
bool operator!=(const SubAgentData& rhs) const;
SubAgentData(const SubAgentData &other) = delete;
protected:
explicit SubAgentData(std::shared_ptr<const ModelData> model, const std::shared_ptr<SubModelData> &parent, const SubAgentData &other);
explicit SubAgentData(std::shared_ptr<const ModelData> model, const std::shared_ptr<SubModelData> &_parent, const std::shared_ptr<AgentData> &subAgent, const std::shared_ptr<AgentData> &masterAgent);
};
} // namespace flamegpu
#endif // INCLUDE_FLAMEGPU_MODEL_SUBAGENTDATA_H_