ai_controller.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef AI_CONTROLLER_HPP
00013 #define AI_CONTROLLER_HPP
00014
00015 #include "../../core/string_compare_type.hpp"
00016 #include <map>
00017
00022 class AIController {
00023 friend class AIScanner;
00024 friend class AIInstance;
00025
00026 public:
00027 static const char *GetClassName() { return "AIController"; }
00028
00032 AIController();
00033
00037 ~AIController();
00038
00045 void Start();
00046
00051 static uint GetTick();
00052
00058 static int GetSetting(const char *name);
00059
00070 static uint GetVersion();
00071
00082 static void SetCommandDelay(int ticks);
00083
00093 static void Sleep(int ticks);
00094
00102 static void Print(bool error_msg, const char *message);
00103
00104 private:
00105 typedef std::map<const char *, const char *, StringCompare> LoadedLibraryList;
00106
00107 uint ticks;
00108 LoadedLibraryList loaded_library;
00109 int loaded_library_count;
00110
00114 void RegisterClasses();
00115
00126 bool LoadedLibrary(const char *library_name, int *next_number, char *fake_class_name, int fake_class_name_len);
00127
00131 void AddLoadedLibrary(const char *library_name, const char *fake_class_name);
00132 };
00133
00134 #endif