ai_controller.hpp

Go to the documentation of this file.
00001 /* $Id: ai_controller.hpp 15462 2009-02-13 00:18:56Z yexo $ */
00002 
00005 #ifndef AI_CONTROLLER_HPP
00006 #define AI_CONTROLLER_HPP
00007 
00008 #include "../../core/string_compare_type.hpp"
00009 #include <map>
00010 
00015 class AIController {
00016   friend class AIScanner;
00017   friend class AIInstance;
00018 
00019 public:
00020   static const char *GetClassName() { return "AIController"; }
00021 
00025   AIController();
00026 
00030   ~AIController();
00031 
00038   void Start();
00039 
00044   static uint GetTick();
00045 
00051   static int GetSetting(const char *name);
00052 
00063   static void SetCommandDelay(int ticks);
00064 
00074   static void Sleep(int ticks);
00075 
00083   static void Print(bool error_msg, const char *message);
00084 
00085 private:
00086   typedef std::map<const char *, const char *, StringCompare> LoadedLibraryList;
00087 
00088   uint ticks;
00089   LoadedLibraryList loaded_library;
00090   int loaded_library_count;
00091 
00095   void RegisterClasses();
00096 
00107   bool LoadedLibrary(const char *library_name, int *next_number, char *fake_class_name, int fake_class_name_len);
00108 
00112   void AddLoadedLibrary(const char *library_name, const char *fake_class_name);
00113 };
00114 
00115 #endif /* AI_CONTROLLER_HPP */

Generated on Sun Mar 15 22:49:44 2009 for openttd by  doxygen 1.5.6