summaryrefslogtreecommitdiff
path: root/src/ai/ai.hpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-07-31 22:16:34 +0000
committeryexo <yexo@openttd.org>2010-07-31 22:16:34 +0000
commit6d4900ed7c1631c40aec59cab9c11881107456a5 (patch)
tree7e3bc6a621693ec52811f4bf50de8756f5db30dc /src/ai/ai.hpp
parent5b20472ccbae53f70e7528ecb7322c92690cffef (diff)
downloadopenttd-6d4900ed7c1631c40aec59cab9c11881107456a5.tar.xz
(svn r20271) -Doc: add doxygen comments to several items under src/ai/
Diffstat (limited to 'src/ai/ai.hpp')
-rw-r--r--src/ai/ai.hpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/ai/ai.hpp b/src/ai/ai.hpp
index ef0f6fc18..387812993 100644
--- a/src/ai/ai.hpp
+++ b/src/ai/ai.hpp
@@ -18,9 +18,12 @@
#include "../core/string_compare_type.hpp"
#include <map>
+/** A list that maps AI names to their AIInfo object. */
typedef std::map<const char *, class AIInfo *, StringCompare> AIInfoList;
-
+/**
+ * Main AI class. Contains all functions needed to start, stop, save and load AIs.
+ */
class AI {
public:
/**
@@ -121,18 +124,29 @@ public:
*/
static int GetStartNextTime();
+ /** Wrapper function for AIScanner::GetAIConsoleList */
static char *GetConsoleList(char *p, const char *last);
+ /** Wrapper function for AIScanner::GetAIInfoList */
static const AIInfoList *GetInfoList();
+ /** Wrapper function for AIScanner::GetUniqueAIInfoList */
static const AIInfoList *GetUniqueInfoList();
+ /** Wrapper function for AIScanner::FindInfo */
static AIInfo *FindInfo(const char *name, int version, bool force_exact_match);
+ /** Wrapper function for AIScanner::ImportLibrary */
static bool ImportLibrary(const char *library, const char *class_name, int version, HSQUIRRELVM vm);
+
+ /**
+ * Rescans all searchpaths for available AIs. If a used AI is no longer
+ * found it is removed from the config.
+ */
static void Rescan();
#if defined(ENABLE_NETWORK)
+ /** Wrapper function for AIScanner::HasAI */
static bool HasAI(const struct ContentInfo *ci, bool md5sum);
#endif
private:
- static uint frame_counter;
- static class AIScanner *ai_scanner;
+ static uint frame_counter; //!< Tick counter for the AI code
+ static class AIScanner *ai_scanner; //!< AIScanner instance that is used to find AIs
};
#else /* ENABLE_AI */