Class SubEnvironmentDescription

Inheritance Relationships

Base Type

Class Documentation

class SubEnvironmentDescription : public flamegpu::CSubEnvironmentDescription

This class provides an interface to a mapping between a parent and submodel’s environment properties

Public Functions

explicit SubEnvironmentDescription(std::shared_ptr<SubEnvironmentData> data)

Constructor, creates an interface to the SubEnvironmentData Constructors

Parameters:

data – Data store of this subenvironment’s data

SubEnvironmentDescription(const SubEnvironmentDescription &other_agent) = default

Copy constructor Creates a new interface to the same SubEnvironmentData/ModelData

SubEnvironmentDescription(SubEnvironmentDescription &&other_agent) = default
SubEnvironmentDescription &operator=(const SubEnvironmentDescription &other_agent) = default

Assignment operator Assigns this interface to the same SubEnvironmentData/ModelData

SubEnvironmentDescription &operator=(SubEnvironmentDescription &&other_agent) = default
void autoMap()

Automatically map all compatible properties, macro properties and directed graphs In order to be compatible, properties must share the same name, type, dimensions/length (number of elements) Const master properties cannot be mapped to non-const sub properties, however the inverse is permitted

void autoMapProperties()

Automatically map all compatible properties In order to be compatible, properties must share the same name, type, length (number of elements) Const master properties cannot be mapped to non-const sub properties, however the inverse is permitted

void autoMapMacroProperties()

Automatically map all compatible macro properties In order to be compatible, properties must share the same name, type, dimensions

void autoMapDirectedGraphs()

Automatically map all compatible directed graphs In order to be compatible, directed graphs must share the same name, vertices and edges

void mapProperty(const std::string &sub_property_name, const std::string &master_property_name)

Links the named properties between the master and sub environment In order to be compatible, properties must share the same name, type, length (number of elements) Const master properties cannot be mapped to non-const sub properties, however the inverse is permitted

Parameters:
  • sub_property_name – Name of the property in the sub model’s environment

  • master_property_name – Name of the property in the master model’s environment

Throws:
  • exception::InvalidParent – If the sub agent or master agent weak_ptrs have expired (this should never happen)

  • exception::InvalidEnvProperty – If the named property does not exist within the bound sub or master environment

  • exception::InvalidEnvProperty – If the named properties do not share the same type and length

  • exception::ReservedName – If either sub_property_name or master_property_name refers to an internal property

void mapMacroProperty(const std::string &sub_property_name, const std::string &master_property_name)

Links the named macro properties between the master and sub environment In order to be compatible, macro properties must share the same name, type, dimensions

Parameters:
  • sub_property_name – Name of the macro property in the sub model’s environment

  • master_property_name – Name of the macro property in the master model’s environment

Throws:
  • exception::InvalidParent – If the sub agent or master agent weak_ptrs have expired (this should never happen)

  • exception::InvalidEnvProperty – If the named macro property does not exist within the bound sub or master environment

  • exception::InvalidEnvProperty – If the named macro properties do not share the same type and length

  • exception::ReservedName – If either sub_property_name or master_property_name refers to an internal macro property

void mapDirectedGraph(const std::string &sub_graph_name, const std::string &master_graph_name)

Links the named directed graphs between the master and sub environment In order to be compatible, directed graphs must share the same name, vertices and edges

Parameters:
  • sub_graph_name – Name of the directed graph in the sub model’s environment

  • master_graph_name – Name of the macro property in the master model’s environment

Throws:
  • exception::InvalidParent – If the sub agent or master agent weak_ptrs have expired (this should never happen)

  • exception::InvalidEnvGraph – If the named directed graph does not exist within the bound sub or master environment

  • exception::InvalidEnvGraph – If the named directed graph do not share the same vertices and edges

  • exception::ReservedName – If either sub_graph_name or master_graph_name refers to an internal graph