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<EnvironmentDescription> subEnvironment

The sub environment which is bound

std::weak_ptr<EnvironmentDescription> masterEnvironment

The master environment which is bound

Mapping properties

Holds all of the model’s environment property mappings

std::weak_ptr<SubModelData> parent

The model which this environment is a member of

std::shared_ptr<SubEnvironmentDescription> description

Description class which provides convenient accessors This may be null if the instance has been cloned

Protected Functions

explicit SubEnvironmentData(const 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(const std::shared_ptr<const ModelData> &model, const std::shared_ptr<SubModelData> &_parent, const std::shared_ptr<EnvironmentDescription> &subEnv)

Normal constructor This should only be called by SubModelDescription

Friends

friend class SubEnvironmentDescription
friend class SubModelDescription
friend struct ModelData