Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

gql++/warnable.h

Go to the documentation of this file.
00001 /* This is for emacs: -*-Mode: C++;-*- */ 00002 #if !defined(__INC_WARNABLE_H) 00003 #define __INC_WARNABLE_H 00004 00005 #include <queue> 00006 00007 #include <sigc++/sigc++.h> 00008 00009 #include <gql++/warning.h> 00010 00011 namespace GQL 00012 { 00013 00014 class Warnable : public SigC::Object 00015 { 00016 public: 00017 Warnable(); 00018 const SQLWarning *get_warning() { 00019 return(warnings_.front()); 00020 } 00021 void next_warning() { 00022 delete warnings_.front(); 00023 warnings_.pop(); 00024 } 00025 void clear_warnings() { 00026 while (!warnings_.empty()) 00027 next_warning(); 00028 } 00029 protected: 00030 // Attention: The warning parameter must have been created with 00031 // new - it will be deleted. 00032 void add_warning(SQLWarning *warning) { 00033 warnings_.push(warning); 00034 } 00035 private: 00036 std::queue<SQLWarning *> warnings_; 00037 }; 00038 00039 } 00040 00041 #endif

Generated on Fri Aug 13 14:16:18 2004 for gql by doxygen 1.3.7