Class CSubAgentDescription

Inheritance Relationships

Derived Type

Class Documentation

class CSubAgentDescription

Subclassed by flamegpu::SubAgentDescription

Public Functions

explicit CSubAgentDescription(std::shared_ptr<SubAgentData> data)

Constructor, creates an interface to the SubAgentData

Parameters:

data – Data store of this subagents’s data

explicit CSubAgentDescription(std::shared_ptr<const SubAgentData> data)
CSubAgentDescription(const CSubAgentDescription &other_agent) = default

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

CSubAgentDescription(CSubAgentDescription &&other_agent) = default
CSubAgentDescription &operator=(const CSubAgentDescription &other_agent) = default

Assignment operator Assigns this interface to the same SubAgentData/ModelData

CSubAgentDescription &operator=(CSubAgentDescription &&other_agent) = default
bool operator==(const CSubAgentDescription &rhs) const

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

bool operator!=(const CSubAgentDescription &rhs) const

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

std::string getStateMapping(const std::string &sub_state_name) const

Returns the master agent state which has been mapped to the name subagent state

Const Accessors

Parameters:

sub_state_name – Name of the state in the sub agent to check

Throws:

exception::InvalidAgentState – If the sub agent state does not exist or has not been mapped yet

Returns:

The name of the state within the master agent which is mapped

std::string getVariableMapping(const std::string &sub_variable_name) const

Returns the master agent variable which has been mapped to the name subagent variable

Parameters:

sub_variable_name – Name of the variable in the sub agent to check

Throws:

exception::InvalidAgentVar – If the sub agent variable does not exist or has not been mapped yet

Returns:

The name of the variable within the master agent which is mapped

Protected Attributes

std::shared_ptr<SubAgentData> subagent

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