AIScanner Class Reference

Class that scans for available AIs. More...

#include <ai_scanner.hpp>

Inheritance diagram for AIScanner:
ScriptScanner

Public Member Functions

bool ImportLibrary (const char *library, const char *class_name, int version, HSQUIRRELVM vm, class AIController *controller)
 Import a library inside the Squirrel VM.
void RegisterLibrary (class AILibrary *library)
 Register a library to be put in the available list.
void RegisterAI (class AIInfo *info)
 Register an AI to be put in the available list.
void SetDummyAI (class AIInfo *info)
 Register the dummy AI.
class AIInfoSelectRandomAI () const
 Select a Random AI.
class AIInfoFindInfo (const char *name, int version, bool force_exact_match)
 Find an AI by name.
char * GetAIConsoleList (char *p, const char *last, bool newest_only) const
 Get the list of available AIs for the console.
char * GetAIConsoleLibraryList (char *p, const char *last) const
 Get the list of available AI Libraries for the console.
const AIInfoListGetAIInfoList ()
 Get the list of all registered AIs.
const AIInfoListGetUniqueAIInfoList ()
 Get the list of the newest version of all registered AIs.
void RescanAIDir ()
 Rescan the AI dir for scripts.
bool HasAI (const struct ContentInfo *ci, bool md5sum)

Private Types

typedef std::map< const char
*, class AILibrary
*, StringCompare
AILibraryList
 Type for the list of libraries.

Private Member Functions

void ScanAIDir ()
 Scan the AI dir for scripts.
void Reset ()
 Reset all allocated lists.

Private Attributes

AIInfoinfo_dummy
 The dummy AI.
AIInfoList info_list
 The list of all AIs.
AIInfoList info_single_list
 The list of all unique AIs, based on shortname. The best AI (highest version) is shown.
AILibraryList library_list
 The list of libraries.

Detailed Description

Class that scans for available AIs.

Definition at line 21 of file ai_scanner.hpp.


Member Function Documentation

void AIScanner::SetDummyAI ( class AIInfo info  )  [inline]

Register the dummy AI.

Parameters:
info The dummy AI that.

Definition at line 45 of file ai_scanner.hpp.

References info_dummy.

Referenced by AIInfo::DummyConstructor().


The documentation for this class was generated from the following files:

Generated on Mon May 9 05:19:36 2011 for OpenTTD by  doxygen 1.6.1