1 #ifndef HEADER_AGENTPACK_H 2 #define HEADER_AGENTPACK_H 3 4 class BaseAgent; 5 6 #include "NoCopy.h" 7 #include <string> 8 9 #include <map> 10 11 /** 12 * List of agents. 13 */ 14 class AgentPack : public NoCopy { 15 private: 16 typedef std::map<std::string,BaseAgent*> t_agents; 17 t_agents m_agents; 18 static AgentPack *ms_singleton; 19 public: 20 AgentPack(); 21 ~AgentPack(); 22 23 void addAgent(BaseAgent *agent); 24 void removeAgent(const std::string &name); 25 26 static BaseAgent *getAgent(const std::string &name); 27 28 void init(const std::string &stopAgent=""); 29 void update(); 30 void shutdown(); 31 }; 32 33 #endif 34