45 #ifndef __EXPLICIT_AGENT_GENERATOR_H__
46 #define __EXPLICIT_AGENT_GENERATOR_H__
48 #include "mengeCommon.h"
72 virtual size_t agentCount() {
return _positions.size(); }
81 virtual Vector2 agentPos(
size_t i );
88 void addPosition(
const Vector2 & p );
112 virtual const char *
name()
const {
return "explicit"; }
122 return "Agent generation is done via an explicit list of agent positions, given in the XML specification.";
156 virtual bool setFromXML(
AgentGenerator * gen, TiXmlElement * node,
const std::string & specFldr )
const;
165 Vector2 parseAgent( TiXmlElement * node )
const;
169 #endif // __EXPLICIT_AGENT_GENERATOR_H__
std::vector< Vector2 > _positions
The agent positions parsed from the file.
Definition: ExplicitAgentGenerator.h:94
The factory for parsing xml data and instantiating agent generator implementations.
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
Definition of agent generator class which produces agents based on explicit enumeration of agent posi...
Definition: ExplicitAgentGenerator.h:60
virtual const char * name() const
The name of the generator type.
Definition: ExplicitAgentGenerator.h:112
The base class inital agent generation.
Definition: AgentGenerator.h:104
virtual size_t agentCount()
Reports the number of agents created.
Definition: ExplicitAgentGenerator.h:72
A class for parsing the xml description of an agent generator and instantiating particular instances...
Definition: AgentGeneratorFactory.h:59
The definition of the agent generator element. Defines the intial numbers and positions of agents in ...
The namespace that contains the basic simulation mechanisms.
Factory for ExplicitGenerator.
Definition: ExplicitAgentGenerator.h:102
virtual const char * description() const
A description of the agent generator.
Definition: ExplicitAgentGenerator.h:121
AgentGenerator * instance() const
Create an instance of this class's agent generator implementation.
Definition: ExplicitAgentGenerator.h:136