Class CAgentFunctionDescription

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class CAgentFunctionDescription : public flamegpu::DependencyNode

Subclassed by flamegpu::AgentFunctionDescription

Public Functions

explicit CAgentFunctionDescription(std::shared_ptr<AgentFunctionData> data)

Constructor, creates an interface to the AgentFunctionData

Parameters:

data – Data store of this function’s data

explicit CAgentFunctionDescription(std::shared_ptr<const AgentFunctionData> data)
CAgentFunctionDescription(const CAgentFunctionDescription &other_function) = default

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

CAgentFunctionDescription(CAgentFunctionDescription &&other_function) = default
CAgentFunctionDescription &operator=(const CAgentFunctionDescription &other_function) = default

Assignment operator Assigns this interface to the same AgentFunctionData/ModelData

CAgentFunctionDescription &operator=(CAgentFunctionDescription &&other_function) = default
bool operator==(const CAgentFunctionDescription &rhs) const

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

bool operator!=(const CAgentFunctionDescription &rhs) const

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

std::string getName() const

Const Accessors

Returns:

The function’s name

std::string getInitialState() const
Returns:

The state which agents must be in to execute this agent function

std::string getEndState() const
Returns:

The state which agents executing this function enter

MessageBruteForce::CDescription getMessageInput() const

See also

AgentFunctionDescription::MessageInput() for the mutable version

Throws:

exception::OutOfBoundsException – If the message input has not been set

Returns:

An immutable reference to the message input of this agent function

MessageBruteForce::CDescription getMessageOutput() const

See also

AgentFunctionDescription::MessageOutput() for the mutable version

Throws:

exception::OutOfBoundsException – If the message output has not been set

Returns:

An immutable reference to the message output of this agent function

bool getMessageOutputOptional() const
Returns:

True if message output from this agent function is optional

CAgentDescription getAgentOutput() const
Throws:

exception::OutOfBoundsException – If the agent output has not been set

Returns:

A immutable interface to the agent output of this agent function

std::string getAgentOutputState() const
Throws:

exception::OutOfBoundsException – If the agent output has not been set

Returns:

The state output agents will be output in

bool getAllowAgentDeath() const
Returns:

True if this agent function can kill agents

bool hasMessageInput() const

See also

AgentFunctionDescription::setMessageInput(MessageDescription &)

Returns:

True if setMessageInput() has been called successfully

bool hasMessageOutput() const

See also

AgentFunctionDescription::setMessageOutput(MessageDescription &)

Returns:

True if setMessageOutput() has been called successfully

bool hasAgentOutput() const

See also

AgentFunctionDescription::setAgentOutput(const std::string &)

See also

AgentFunctionDescription::setAgentOutput(AgentDescription &)

Returns:

True if setAgentOutput() has been called successfully

bool hasFunctionCondition() const

Returns:

True if setFunctionCondition() has been called successfully

AgentFunctionWrapper *getFunctionPtr() const
Returns:

The cuda kernel entry point for executing the agent function

AgentFunctionConditionWrapper *getConditionPtr() const
Returns:

The cuda kernel entry point for executing the agent function condition

bool isRTC() const
Returns:

True if the function is a runtime time specified function

Protected Attributes

std::shared_ptr<AgentFunctionData> function

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