.. _program_listing_file_include_flamegpu_model_ModelData.h: Program Listing for File ModelData.h ==================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/flamegpu/model/ModelData.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef INCLUDE_FLAMEGPU_MODEL_MODELDATA_H_ #define INCLUDE_FLAMEGPU_MODEL_MODELDATA_H_ #include #include #include #include #include #include #include "flamegpu/defines.h" #include "flamegpu/runtime/HostAPI_macros.h" #include "flamegpu/runtime/messaging/MessageBruteForce.h" namespace flamegpu { class HostFunctionCallback; class HostConditionCallback; class DependencyGraph; struct EnvironmentData; struct AgentData; struct LayerData; struct SubModelData; struct ModelData : std::enable_shared_from_this{ virtual ~ModelData() = default; static const char *DEFAULT_STATE; // "default" friend class ModelDescription; typedef std::unordered_map> AgentMap; typedef std::unordered_map> MessageMap; typedef std::unordered_map> SubModelMap; typedef std::list> LayerList; typedef std::vector InitFunctionVector; typedef std::vector StepFunctionVector; typedef std::vector HostFunctionCallbackVector; typedef std::vector HostConditionCallbackVector; typedef std::vector ExitFunctionVector; typedef std::vector ExitConditionVector; AgentMap agents; MessageMap messages; SubModelMap submodels; LayerList layers; InitFunctionVector initFunctions; HostFunctionCallbackVector initFunctionCallbacks; StepFunctionVector stepFunctions; HostFunctionCallbackVector stepFunctionCallbacks; ExitFunctionVector exitFunctions; HostFunctionCallbackVector exitFunctionCallbacks; ExitConditionVector exitConditions; HostConditionCallbackVector exitConditionCallbacks; std::shared_ptr environment; std::string name; std::shared_ptr dependencyGraph; std::shared_ptr clone() const; bool operator==(const ModelData& rhs) const; bool operator!=(const ModelData& rhs) const; flamegpu::size_type getMaxLayerWidth() const; protected: friend SubModelData; // Uses private copy constructor explicit ModelData(const ModelData &other); explicit ModelData(const std::string &model_name); private: bool hasSubModelRecursive(const std::shared_ptr &submodel_data) const; }; } // namespace flamegpu #endif // INCLUDE_FLAMEGPU_MODEL_MODELDATA_H_