Class CEnvironmentDescription

Inheritance Relationships

Derived Type

Class Documentation

class CEnvironmentDescription

Subclassed by flamegpu::EnvironmentDescription

Public Functions

explicit CEnvironmentDescription(std::shared_ptr<EnvironmentData> data)

Constructor, creates an interface to the EnvironmentData

Parameters:

data – Data store of this environment’s data

explicit CEnvironmentDescription(std::shared_ptr<const EnvironmentData> 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

Protected Attributes

std::shared_ptr<EnvironmentData> environment

The class which stores all of the environment’s data.