1 // Warnings.h 2 3 #ifndef WARNINGS_H 4 #define WARNINGS_H 5 6 #include <stdarg.h> 7 8 #include <List.h> 9 #include <String.h> 10 11 class Warnings { 12 public: 13 Warnings(); 14 virtual ~Warnings(); 15 16 static Warnings* GetCurrentWarnings(); 17 static void SetCurrentWarnings(Warnings* warnings); 18 19 void AddWarning(BString warning); 20 void AddWarning(const char* format,...); 21 void AddWarningV(const char* format, va_list arg); 22 static void AddCurrentWarning(BString warning); 23 static void AddCurrentWarning(const char* format,...); 24 static void AddCurrentWarningV(const char* format, 25 va_list arg); 26 27 int32 CountWarnings() const; 28 const char* WarningAt(int32 index) const; 29 30 private: 31 static Warnings* fCurrentWarnings; 32 BList fWarnings; 33 }; 34 35 #endif // WARNINGS_H 36