Struct EnvironmentData

Nested Relationships

Nested Types

Struct Documentation

struct EnvironmentData

Public Functions

bool operator==(const EnvironmentData &rhs) const

Equality operator, checks whether EnvironmentData hierarchies are functionally the same

Note

Instead compare pointers if you wish to check that they are the same instance

Returns

True when environments are the same

bool operator!=(const EnvironmentData &rhs) const

Equality operator, checks whether EnvironmentData hierarchies are functionally different

Note

Instead compare pointers if you wish to check that they are not the same instance

Returns

True when environments are not the same

EnvironmentData(const EnvironmentData &other) = delete

Default copy constructor, not implemented

Public Members

std::weak_ptr<const ModelData> model

Parent model

std::unordered_map<std::string, PropData> properties = {}

Main storage of all properties

std::unordered_map<std::string, MacroPropData> macro_properties = {}

Main storage of all macroproperties

Protected Functions

EnvironmentData(std::shared_ptr<const ModelData> model, const EnvironmentData &other)

Copy constructor This is unsafe, should only be used internally, use clone() instead

explicit EnvironmentData(std::shared_ptr<const ModelData> model)

Normal constructor, only to be called by ModelDescription

Friends

friend class ModelDescription
friend class std::shared_ptr<ModelData> clone() const

Used to access the protected copy constructor

struct MacroPropData

Holds all of the properties required to add a value to EnvironmentManager

Public Functions

inline MacroPropData(const std::type_index &_type, const size_t _type_size, const std::array<unsigned int, 4> &_elements)
Parameters
  • _type – The type index of the base type (e.g. typeid(float))

  • _type_size – The size of the base type (e.g. sizeof(float))

  • _elements – Number of elements in each dimension

inline bool operator==(const MacroPropData &rhs) const
inline bool operator!=(const MacroPropData &rhs) const

Public Members

std::type_index type
size_t type_size
std::array<unsigned int, 4> elements
struct PropData

Constructor has access to privately add reserved items Might be a cleaner way to do this Holds all of the properties required to add a value to EnvironmentManager

Public Functions

inline PropData(bool _is_const, const util::Any &_data)
Parameters
  • _is_const – Is the property constant

  • _data – The data to initially fill the property with

inline bool operator==(const PropData &rhs) const
inline bool operator!=(const PropData &rhs) const

Public Members

bool isConst
const util::Any data