Class CEnvironmentDescription
Defined in File EnvironmentDescription.h
Inheritance Relationships
Derived Type
public flamegpu::EnvironmentDescription
(Class EnvironmentDescription)
Class Documentation
-
class CEnvironmentDescription
Subclassed by flamegpu::EnvironmentDescription
Public Functions
Constructor, creates an interface to the EnvironmentData
- Parameters:
data – Data store of this environment’s data
-
CEnvironmentDescription(const CEnvironmentDescription &other_agent) = default
Copy constructor Creates a new interface to the same EnvironmentData/ModelData
-
CEnvironmentDescription(CEnvironmentDescription &&other_agent) = default
-
CEnvironmentDescription &operator=(const CEnvironmentDescription &other_agent) = default
Assignment operator Assigns this interface to the same EnvironmentData/ModelData
-
CEnvironmentDescription &operator=(CEnvironmentDescription &&other_agent) = default
-
bool operator==(const CEnvironmentDescription &rhs) const
Equality operator, checks whether EnvironmentDescription hierarchies are functionally the same
Note
Instead compare pointers if you wish to check that they are the same instance
- Parameters:
rhs – right hand side
- Returns:
True when environments are the same
-
bool operator!=(const CEnvironmentDescription &rhs) const
Equality operator, checks whether EnvironmentDescription hierarchies are functionally different
Note
Instead compare pointers if you wish to check that they are not the same instance
- Parameters:
rhs – right hand side
- Returns:
True when environments are not the same
-
template<typename T>
T getProperty(const std::string &name) const Gets an environment property
Getters
- Parameters:
name – name used for accessing the property
- Template Parameters:
T – Type of the value to be returned
- Throws:
exception::InvalidEnvProperty – If a property of the name does not exist
-
template<typename T, flamegpu::size_type N>
std::array<T, N> getProperty(const std::string &name) const Gets an environment property array
- Parameters:
name – name used for accessing the property
- Template Parameters:
T – Type of the value to be returned
N – Length of the array to be returned
- Throws:
exception::InvalidEnvProperty – If a property array of the name does not exist
-
template<typename T>
T getProperty(const std::string &name, flamegpu::size_type index) const Gets an element of an environment property array
- Parameters:
name – name used for accessing the property
index – element from the environment property array to return
- Template Parameters:
T – Type of the value to be returned
- Throws:
exception::InvalidEnvProperty – If a property of the name does not exist
std::out_of_range –
-
bool getConst(const std::string &name) const
Returns whether an environment property is marked as const
Const Accessors
- Parameters:
name – name used for accessing the property
- Throws:
exception::InvalidEnvProperty – If a property of the name does not exist
-
CEnvironmentDirectedGraphDescription getDirectedGraph(const std::string &graph_name) const
Returns an existing directed graph
Directed graphs are environmental graph structures which can hold properties on their vertices and edges Agent’s can traverse the graph structure and assign messages to the graph using related communication strategies
- Parameters:
graph_name – The name used to refer to the graph throughout the model
Protected Attributes
-
std::shared_ptr<EnvironmentData> environment
The class which stores all of the environment’s data.