Struct LayerData

Struct Documentation

struct LayerData

This is the internal data store for LayerDescription Users should only access that data stored within via an instance of LayerDescription

Public Functions

bool operator==(const LayerData &rhs) const

Equality operator, checks whether LayerData hierarchies are functionally the same

Note

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

Returns:

True when layers are the same

bool operator!=(const LayerData &rhs) const

Equality operator, checks whether LayerData hierarchies are functionally different

Note

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

Returns:

True when layers are not the same

LayerData(const LayerData &other) = delete

Default copy constructor, not implemented

Public Members

std::weak_ptr<const ModelData> model

Parent model

std::set<std::shared_ptr<AgentFunctionData>> agent_functions

Set of Agent Functions set<AgentFunctionData>

std::set<FLAMEGPU_HOST_FUNCTION_POINTER> host_functions

Set of host function pointers set<FLAMEGPU_HOST_FUNCTION_POINTER>

std::set<HostFunctionCallback*> host_functions_callbacks

Set of host function callbacks (used by SWIG interface) set<HostFunctionCallback*>

std::shared_ptr<SubModelData> sub_model

SubModel (If present, layer can hold no host_functions or agent_functions)

std::string name

Name of the agent function, used to refer to the agent function in many functions

flamegpu::size_type index

Index of the layer in the stack (Eventually this will be replaced when we move to a more durable mode of layers, e.g. dependency analysis)

Protected Functions

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

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

LayerData(const std::shared_ptr<const ModelData> &model, const std::string &name, const flamegpu::size_type &index)

Normal constructor, only to be called by ModelDescription

Protected Attributes

friend DependencyGraph

Friends

friend class ModelDescription
friend struct ModelData