.. _program_listing_file_include_flamegpu_model_SubModelDescription.h: Program Listing for File SubModelDescription.h ============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/flamegpu/model/SubModelDescription.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef INCLUDE_FLAMEGPU_MODEL_SUBMODELDESCRIPTION_H_ #define INCLUDE_FLAMEGPU_MODEL_SUBMODELDESCRIPTION_H_ #include #include #include "flamegpu/model/LayerDescription.h" #include "flamegpu/model/DependencyNode.h" namespace flamegpu { class CSubAgentDescription; class SubAgentDescription; class CSubEnvironmentDescription; class SubEnvironmentDescription; struct ModelData; struct SubModelData; class CSubModelDescription : public DependencyNode { friend struct SubModelData; friend void LayerDescription::addSubModel(const CSubModelDescription&); public: explicit CSubModelDescription(std::shared_ptr data); explicit CSubModelDescription(std::shared_ptr data); CSubModelDescription(const CSubModelDescription& other_agent) = default; CSubModelDescription(CSubModelDescription&& other_agent) = default; CSubModelDescription& operator=(const CSubModelDescription& other_agent) = default; CSubModelDescription& operator=(CSubModelDescription&& other_agent) = default; bool operator==(const CSubModelDescription& rhs) const; bool operator!=(const CSubModelDescription& rhs) const; unsigned int getMaxSteps() const; const std::string getName() const; protected: std::shared_ptr submodel; }; class SubModelDescription : public CSubModelDescription { public: explicit SubModelDescription(std::shared_ptr data); SubModelDescription(const SubModelDescription& other_agent) = default; SubModelDescription(SubModelDescription&& other_agent) = default; SubModelDescription& operator=(const SubModelDescription& other_agent) = default; SubModelDescription& operator=(SubModelDescription&& other_agent) = default; SubAgentDescription bindAgent(const std::string &sub_agent_name, const std::string &master_agent_name, bool auto_map_vars = false, bool auto_map_states = true); SubAgentDescription SubAgent(const std::string &sub_agent_name); CSubAgentDescription getSubAgent(const std::string &sub_agent_name) const; SubEnvironmentDescription SubEnvironment(bool auto_map = false); CSubEnvironmentDescription getSubEnvironment() const; void setMaxSteps(unsigned int max_steps); }; } // namespace flamegpu #endif // INCLUDE_FLAMEGPU_MODEL_SUBMODELDESCRIPTION_H_