Struct SubModelData
Defined in File SubModelData.h
Inheritance Relationships
Base Type
public std::enable_shared_from_this< SubModelData >
Struct Documentation
-
struct SubModelData : public std::enable_shared_from_this<SubModelData>
Holds all the mappings between a submodel and master/parent/host model
Public Types
-
typedef std::unordered_map<std::string, std::shared_ptr<SubAgentData>> SubAgentMap
Map of name:subagent definition map<string, SubAgentData>
Public Functions
-
bool operator==(const SubModelData &rhs) const
Equality operator, checks whether SubModelData hierarchies are functionally the same
Note
Instead compare pointers if you wish to check that they are the same instance
- Returns:
True when models are the same
-
bool operator!=(const SubModelData &rhs) const
Equality operator, checks whether SubModelData hierarchies are functionally different
Note
Instead compare pointers if you wish to check that they are not the same instance
- Returns:
True when models are not the same
-
SubModelData(const SubModelData &other) = delete
Default copy constructor, not implemented
Public Members
-
SubAgentMap subagents = {}
Holds all of the model’s subagent definitions
-
std::shared_ptr<SubEnvironmentData> subenvironment
The SubModel represented by this class
-
unsigned int max_steps
Max number of steps per submodel execution 0 is unlimited, but requires the submodel to have an exit condition
-
std::string name
Name assigned to the submodel at creation
Protected Functions
Copy constructor This should only be called via clone();
Normal constructor This should only be called by ModelDescription
Friends
- friend class SubModelDescription
- friend struct ModelData
- friend class ModelDescription
-
typedef std::unordered_map<std::string, std::shared_ptr<SubAgentData>> SubAgentMap