Atoms Crowd  4.1.0
Atoms::AgentTypes Class Reference

Container for all agent types. More...

#include <AgentTypes.h>

Public Member Functions

 AgentTypes ()
 constructor
 
 ~AgentTypes ()
 Destructor.
 
 AgentTypes (const AgentTypes &)
 Copy constructor.
 
AgentTypesoperator= (const AgentTypes &)
 Assign operator.
 
AgentTypePtr agentType (const std::string &typeName)
 Gets the agent type with the given name. More...
 
AgentTypeCPtr agentType (const std::string &typeName) const
 Gets the agent type with the given name. More...
 
void addAgentType (const std::string &name, const AgentType &agentType, bool replace=true)
 Adds an agent type to the map. More...
 
void removeAgentType (const std::string &name)
 Removes an agent type from the map. More...
 
std::vector< std::string > agentTypeNames () const
 Gets all agent types names. More...
 
bool agentTypeExists (const std::string &name) const
 Checks if an agent type with the given name exists. More...
 
unsigned int numAgentTypes () const
 Gets the number of agent types.
 
void clear ()
 Removes all agent types.
 

Static Public Member Functions

static AgentTypesinstance ()
 Singleton access for global data.
 

Detailed Description

Container for all agent types.

Member Function Documentation

◆ addAgentType()

void Atoms::AgentTypes::addAgentType ( const std::string &  name,
const AgentType agentType,
bool  replace = true 
)

Adds an agent type to the map.

Parameters
nameagent type name \patam agentType Agent type

◆ agentType() [1/2]

AgentTypePtr Atoms::AgentTypes::agentType ( const std::string &  typeName)

Gets the agent type with the given name.

Parameters
typeNameagent type name
Returns
Pointer to the agent type stored inside this class

◆ agentType() [2/2]

AgentTypeCPtr Atoms::AgentTypes::agentType ( const std::string &  typeName) const

Gets the agent type with the given name.

Parameters
typeNameagent type name
Returns
Pointer to the agent type stored inside this class

◆ agentTypeExists()

bool Atoms::AgentTypes::agentTypeExists ( const std::string &  name) const

Checks if an agent type with the given name exists.

Parameters
nameAgent type name
Returns
Return true if the agent type exists

◆ agentTypeNames()

std::vector<std::string> Atoms::AgentTypes::agentTypeNames ( ) const

Gets all agent types names.

Returns
List of all agent types

◆ removeAgentType()

void Atoms::AgentTypes::removeAgentType ( const std::string &  name)

Removes an agent type from the map.

Parameters
nameagent type name

The documentation for this class was generated from the following file: