Atoms Crowd  4.1.0
Atoms::AgentsSimulations Class Reference

Container for all AgentSimulation instances. More...

#include <AgentsSimulations.h>

Public Types

typedef std::map< std::string, AtomsPtr< AgentsSimulation > > AgentsSimulationMap
 

Public Member Functions

AtomsPtr< AgentsSimulationagentsSimulation (const std::string &simName)
 Gets an agent simulation by name. More...
 
void addAgentsSimulation (const std::string &name, AtomsPtr< AgentsSimulation > &agentSim, bool replace=true)
 Adds an agent simulation. More...
 
void removeAgentsSimulation (const std::string &name)
 Removes the agent simulation with the given name. More...
 
std::vector< std::string > agentsSimulationNames ()
 Gets all agent simulation names. More...
 
bool agentsSimulationExists (const std::string &name)
 Checks if an agent simulation with the given name exists. More...
 
unsigned int numAgentsSimulation ()
 Gets the number of agent simulations.
 
void clear ()
 Removes all agent simulations.
 
AgentsSimulationMap::iterator begin ()
 
AgentsSimulationMap::iterator end ()
 
AgentsSimulationMap::const_iterator cbegin () const
 
AgentsSimulationMap::const_iterator cend () const
 

Static Public Member Functions

static AgentsSimulationsinstance ()
 Singleton access.
 

Detailed Description

Container for all AgentSimulation instances.

Member Function Documentation

◆ addAgentsSimulation()

void Atoms::AgentsSimulations::addAgentsSimulation ( const std::string &  name,
AtomsPtr< AgentsSimulation > &  agentSim,
bool  replace = true 
)

Adds an agent simulation.

Parameters
nameAgent simulation name
agentSimAgent simulation

◆ agentsSimulation()

AtomsPtr<AgentsSimulation> Atoms::AgentsSimulations::agentsSimulation ( const std::string &  simName)

Gets an agent simulation by name.

Parameters
simNameagent simulation name
Returns
Pointer to the agent simulation stored inside this class

◆ agentsSimulationExists()

bool Atoms::AgentsSimulations::agentsSimulationExists ( const std::string &  name)

Checks if an agent simulation with the given name exists.

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

◆ agentsSimulationNames()

std::vector<std::string> Atoms::AgentsSimulations::agentsSimulationNames ( )

Gets all agent simulation names.

Returns
List of all agent simulations

◆ removeAgentsSimulation()

void Atoms::AgentsSimulations::removeAgentsSimulation ( const std::string &  name)

Removes the agent simulation with the given name.

Parameters
nameAgent simulation name

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