Class SubAgentDescription
Defined in File SubAgentDescription.h
Inheritance Relationships
Base Type
public flamegpu::CSubAgentDescription
(Class CSubAgentDescription)
Class Documentation
-
class SubAgentDescription : public flamegpu::CSubAgentDescription
This class provides an interface to a mapping between a parent and submodel agent
Public Functions
Constructor, creates an interface to the SubAgentData Constructors
- Parameters:
data – Data store of this agent’s data
-
SubAgentDescription(const SubAgentDescription &other_agent) = default
Copy constructor Creates a new interface to the same SubAgentData/ModelData
-
SubAgentDescription(SubAgentDescription &&other_agent) = default
-
SubAgentDescription &operator=(const SubAgentDescription &other_agent) = default
Assignment operator Assigns this interface to the same SubAgentData/ModelData
-
SubAgentDescription &operator=(SubAgentDescription &&other_agent) = default
-
void mapState(const std::string &sub_state_name, const std::string &master_state_name)
Links the named states between the master and sub agent
- Parameters:
sub_state_name – Name of the state in the sub models agent
master_state_name – Name of the state in the master models agent
- Throws:
exception::InvalidParent – If the sub agent or master agent weak_ptrs have expired (this should never happen)
exception::InvalidAgentState – If the named state does not exist within the bound sub or master agent
-
void mapVariable(const std::string &sub_variable_name, const std::string &master_variable_name)
Links the named variables between the master and sub agent These variables must have the same type and number of elements (1 unless they’re an array variable)
- Parameters:
sub_variable_name – Name of the variable in the sub models agent
master_variable_name – Name of the variable in the master models agent
- Throws:
exception::InvalidParent – If the sub agent or master agent weak_ptrs have expired (this should never happen)
exception::InvalidAgentVar – If the named variable does not exist within the bound sub or master agent
exception::InvalidAgentVar – If there is a mismatch between the variables types or number of elements