Struct AgentData¶
Defined in File AgentData.h
Inheritance Relationships¶
Base Type¶
public std::enable_shared_from_this< AgentData >
Struct Documentation¶
-
struct AgentData : public std::enable_shared_from_this<AgentData>¶
This is the internal data store for AgentDescription Users should only access that data stored within via an instance of AgentDescription
Public Types
-
typedef std::unordered_map<std::string, std::shared_ptr<AgentFunctionData>> FunctionMap¶
Map of name:agent function definition map<string, AgentFunctionData>
Public Functions
-
bool isOutputOnDevice() const¶
Check whether any agent functions within the ModelDescription hierarchy output agents of this type
- Returns:
true if this type of agent is created by any agent functions
-
bool operator==(const AgentData &rhs) const¶
Equality operator
Note
Instead compare pointers if you wish to check that they are the same instance
- Parameters:
rhs – Right hand side
- Returns:
True when agents are the same
-
bool operator==(const CAgentDescription &rhs) const¶
Equality operator
- Parameters:
rhs – Right hand side
- Returns:
True when agents are the same
Public Members
-
FunctionMap functions¶
Holds all of the agent’s function definitions
-
VariableMap variables¶
Holds all of the agent’s variable definitions
-
std::set<std::string> states¶
Holds all of the agent’s possible states
-
std::string initial_state¶
The initial state of newly created agents
Note
must be found within member set states
-
unsigned int agent_outputs¶
The number of functions that have agent output of this agent type This value is modified by AgentFunctionDescription
-
std::string name¶
Name of the agent, used to refer to the agent in many functions
-
bool keepDefaultState¶
Internal value used to track whether the user has requested the default state as a state
-
unsigned int sortPeriod¶
Sort the agent every sortPeriod steps. 0 means no sorting.
Protected Functions
Copy constructor This is unsafe, should only be used internally, use clone() instead This does not setup functions map
Normal constructor, only to be called by ModelDescription
- Parameters:
model – Parent model
agent_name – Name of the agent
Friends
- friend class ModelDescription
- friend struct ModelData
- friend class DependencyGraph
-
typedef std::unordered_map<std::string, std::shared_ptr<AgentFunctionData>> FunctionMap¶