Struct SubEnvironmentData

Inheritance Relationships

Base Type

  • public std::enable_shared_from_this< SubEnvironmentData >

Struct Documentation

struct SubEnvironmentData : public std::enable_shared_from_this<SubEnvironmentData>

Holds all the mappings between the environment properties in the submodel and the parent model Properties of matching type and length can be mapped

Public Types

typedef std::unordered_map<std::string, std::string> Mapping

Map of submodel item name:parent model item name map<string, string>

Public Functions

bool operator==(const SubEnvironmentData &rhs) const

Equality operator, checks whether SubAgentData 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 SubEnvironmentData &rhs) const

Equality operator, checks whether SubAgentData 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

SubEnvironmentData(const SubEnvironmentData &other) = delete

Default copy constructor, not implemented

Public Members

std::weak_ptr<const ModelData> model

Parent model

std::weak_ptr<EnvironmentData> subEnvironment

The sub environment which is bound

std::weak_ptr<EnvironmentData> masterEnvironment

The master environment which is bound

Mapping properties

Holds all of the model’s environment property mappings

Mapping macro_properties

Holds all of the model’s environment macro property mappings

Mapping directed_graphs

Holds all of the model’s environment directed graph mappings

std::weak_ptr<SubModelData> parent

The model which this environment is a member of

Protected Functions

explicit SubEnvironmentData(std::shared_ptr<const ModelData> model, const std::shared_ptr<SubModelData> &parent, const SubEnvironmentData &other)

Copy constructor This should only be called via clone();

explicit SubEnvironmentData(std::shared_ptr<const ModelData> model, const std::shared_ptr<SubModelData> &_parent, const std::shared_ptr<EnvironmentData> &subEnv)

Normal constructor This should only be called by SubModelDescription

Friends

friend class SubEnvironmentDescription
friend class SubModelDescription
friend struct ModelData