////////////////////////////////////////////////// // Blabber [AgentList.h] // Stores the list of agents supported by // the server. ////////////////////////////////////////////////// #ifndef AGENT_LIST_H #define AGENT_LIST_H #ifndef __MAP__ #include #endif #ifndef __STRING__ #include #endif #ifndef AGENT_H #include "Agent.h" #endif class AgentList { public: typedef std::map AgentMap; typedef std::map::iterator AgentIter; typedef std::map::const_iterator ConstAgentIter; public: static AgentList *Instance(); ~AgentList(); void AddAgent(Agent *new_agent); Agent *GetAgentByService(std::string service); Agent *GetAgentByID(std::string id); void RemoveAllAgents(); protected: AgentList(); private: static AgentList *_instance; AgentMap _agent_list; }; #endif