Program Listing for File SubModelData.h
↰ Return to documentation for file (include/flamegpu/model/SubModelData.h
)
#ifndef INCLUDE_FLAMEGPU_MODEL_SUBMODELDATA_H_
#define INCLUDE_FLAMEGPU_MODEL_SUBMODELDATA_H_
#include <memory>
#include <string>
#include <unordered_map>
#include "flamegpu/model/SubModelDescription.h"
namespace flamegpu {
struct ModelData;
struct SubAgentData;
struct AgentData;
struct SubEnvironmentData;
class SubModelDescription;
struct SubModelData : std::enable_shared_from_this<SubModelData> {
friend class SubModelDescription;
friend struct ModelData;
friend class ModelDescription;
std::weak_ptr<const ModelData> model;
std::shared_ptr<const ModelData> submodel;
typedef std::unordered_map<std::string, std::shared_ptr<SubAgentData>> SubAgentMap;
SubAgentMap subagents = {};
std::shared_ptr<SubEnvironmentData> subenvironment;
unsigned int max_steps;
std::string name;
bool operator==(const SubModelData& rhs) const;
bool operator!=(const SubModelData& rhs) const;
SubModelData(const SubModelData &other) = delete;
protected:
explicit SubModelData(std::shared_ptr<ModelData> model, const SubModelData &other);
explicit SubModelData(std::shared_ptr<ModelData> model, const std::string &submodel_name, const std::shared_ptr<ModelData> &submodel);
};
} // namespace flamegpu
#endif // INCLUDE_FLAMEGPU_MODEL_SUBMODELDATA_H_