Update for doxygen 1.5.5, graph generation, and match current code.
[tagua/yd.git] / src / agentgroup.h
blob5b7b39a6538c68a174d86da66c71ee9f71270df4
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #ifndef AGENTGROUP_H
12 #define AGENTGROUP_H
14 #include <boost/shared_ptr.hpp>
15 #include <vector>
16 #include "weakset.h"
17 #include "agent.h"
19 class AgentGroup {
20 typedef boost::shared_ptr<Agent> AgentPtr;
21 typedef std::vector<AgentPtr> AgentList;
23 weak_set<Agent> m_agents;
24 public:
25 void addAgent(const AgentPtr& agent);
27 void clockUpdate(Agent* source, int, int);
28 void move(Agent* source, const Index&);
29 void back(Agent* source);
30 void forward(Agent* source);
31 void gotoFirst(Agent* source);
32 void gotoLast(Agent* source);
35 class AgentGroupDispatcher {
36 AgentGroup* m_group;
37 Agent* m_agent;
38 public:
39 AgentGroupDispatcher(AgentGroup* group, Agent* agent);
40 virtual ~AgentGroupDispatcher(){}
42 virtual void clockUpdate(int, int);
43 virtual bool move(const Index&);
44 virtual bool back();
45 virtual bool forward();
46 virtual bool gotoFirst();
47 virtual bool gotoLast();
50 #endif // AGENTGROUP_H