1 // Copyright (C) 2009 - 2012 Mathias Froehlich
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License as
5 // published by the Free Software Foundation; either version 2 of the
6 // License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #ifndef AISubsystem_hxx
18 #define AISubsystem_hxx
21 #include <simgear/structure/SGWeakReferenced.hxx>
22 #include <simgear/timing/timestamp.hxx>
28 class AISubsystem : public SGWeakReferenced {
32 virtual ~AISubsystem()
35 virtual void update(AIObject& object, const SGTimeStamp& dt) = 0;
38 class AISubsystemGroup : public AISubsystem {
42 virtual ~AISubsystemGroup()
45 virtual void update(AIObject& object, const SGTimeStamp& dt)
47 for (SubsystemList::iterator i = _subsystemList.begin();
48 i != _subsystemList.end(); ++i) {
49 (*i)->update(object, dt);
54 typedef std::list<SGSharedPtr<AISubsystem> > SubsystemList;
55 SubsystemList _subsystemList;