ai_log.hpp

Go to the documentation of this file.
00001 /* $Id: ai_log.hpp 15481 2009-02-14 20:03:06Z yexo $ */
00002 
00005 #ifndef AI_LOG_HPP
00006 #define AI_LOG_HPP
00007 
00008 #include "ai_object.hpp"
00009 
00013 class AILog : public AIObject {
00014   /* AIController needs access to Enum and Log, in order to keep the flow from
00015    *  OpenTTD core to NoAI API clear and simple. */
00016   friend class AIController;
00017 
00018 public:
00019   static const char *GetClassName() { return "AILog"; }
00020 
00021 #ifndef EXPORT_SKIP
00022 
00026   enum AILogType {
00027     LOG_SQ_ERROR = 0, 
00028     LOG_ERROR = 1,    
00029     LOG_SQ_INFO = 2,  
00030     LOG_WARNING = 3,  
00031     LOG_INFO = 4,     
00032   };
00033 
00038   struct LogData {
00039     char **lines;           
00040     AILog::AILogType *type; 
00041     int count;              
00042     int pos;                
00043     int used;               
00044   };
00045 #endif /* EXPORT_SKIP */
00046 
00051   static void Info(const char *message);
00052 
00057   static void Warning(const char *message);
00058 
00063   static void Error(const char *message);
00064 
00065 #ifndef EXPORT_SKIP
00066 
00070   static void FreeLogPointer();
00071 #endif /* EXPORT_SKIP */
00072 
00073 private:
00077   static void Log(AILog::AILogType level, const char *message);
00078 };
00079 
00080 #endif /* AI_LOG_HPP */

Generated on Tue Dec 1 00:06:14 2009 for OpenTTD by  doxygen 1.5.6