Class CLayerDescription

Inheritance Relationships

Derived Type

Class Documentation

class CLayerDescription

Subclassed by flamegpu::LayerDescription

Public Functions

explicit CLayerDescription(std::shared_ptr<LayerData> data)

Constructor, creates an interface to the LayerData

Parameters:

data – Data store of this layer’s data

explicit CLayerDescription(std::shared_ptr<const LayerData> data)
CLayerDescription(const CLayerDescription &other_layer) = default

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

CLayerDescription(CLayerDescription &&other_layer) = default
CLayerDescription &operator=(const CLayerDescription &other_layer) = default

Assignment operator Assigns this interface to the same LayerData/ModelData

CLayerDescription &operator=(CLayerDescription &&other_layer) = default
bool operator==(const CLayerDescription &rhs) const

Equality operator, checks whether LayerDescription 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 layers are the same

bool operator!=(const CLayerDescription &rhs) const

Equality operator, checks whether LayerDescription 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 layers are not the same

std::string getName() const

Const Accessors

Returns:

The layer’s name

flamegpu::size_type getIndex() const
Returns:

The index of the layer within the model’s execution

flamegpu::size_type getAgentFunctionsCount() const
Returns:

The total number of agent functions within the layer

flamegpu::size_type getHostFunctionsCount() const
Returns:

The total number of host functions within the layer

CAgentFunctionDescription getAgentFunction(unsigned int index) const

Note

Functions are stored in a set, so order may change as new functions are added

Parameters:

index – Index of the function to return

Throws:

exception::OutOfBoundsException – When index exceeds number of agent functions in the layer

Returns:

An immutable reference to the agent function at the provided index

FLAMEGPU_HOST_FUNCTION_POINTER getHostFunction(unsigned int index) const

Note

Functions are stored in a set, so order may change as new functions are added

Parameters:

index – Index of the function to return

Throws:

exception::OutOfBoundsException – When index exceeds number of host functions in the layer

Returns:

A function pointer to the host function at the provided index

Protected Attributes

std::shared_ptr<LayerData> layer

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