1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef RY_SABRINA_AI_INTERFACE_H
20 #define RY_SABRINA_AI_INTERFACE_H
25 #include "nel/misc/types_nl.h"
27 #include "game_share/ai_event.h"
28 #include "game_share/ai_event_report.h"
31 * The Sabrina AI Service Interface singleton
32 * \author David Fleury
33 * \author Nevrax France
36 class CSabrinaAIInterface
39 // init method called at service init by CSabrinaPhraseManager::init()
42 // update called each tick by CSabrinaPhraseManager::update() - dispatches events to the AI services
43 static void flushEvents();
45 // release method called at service release by CSabrinaPhraseManager::release()
46 static void release();
49 * register a service to the event broadcast for AI
50 * \param serviceName name of the registered service
52 static void registerAIService( uint8 serviceId
);
55 * unregister a service to the event broadcast
56 * \param serviceName name of the service to remove
58 static void unregisterAIService( uint8 serviceId
);
61 * add an AI event report for the current tick
62 * \param report the AI event report to add
64 static void addAiEventReport( const CAiEventReport
&report
);
67 * add an AI event for the current tick
68 * \param report the event to add
70 static void addAIEvent( const IAIEvent
*event
);
73 // this is a singleton so prohibit construction
74 CSabrinaAIInterface();
76 /// list of registered services for Event Broadcast for AI
77 static std::vector
<uint8
> _RegisteredServices
;
79 /// the list of ai events
80 typedef std::list
<IAIEvent
*> TAIEventList
;
81 static TAIEventList _AIEvents
;
83 /// the ai event reports
84 static std::vector
<CAiEventReport
> _AIEventReports
;