Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 <yehia/object.h>
00010 
00011 #include <gql++/warning.h>
00012 
00013 namespace GQL
00014 {
00015 
00016 class Warnable : public Yehia::Object
00017 {
00018   public:
00019     Warnable();
00020     const SQLWarning *get_warning() {
00021       return(warnings_.front());
00022     }
00023     void next_warning() {
00024       delete warnings_.front();
00025       warnings_.pop();
00026     }
00027     void clear_warnings() {
00028       while (!warnings_.empty())
00029         next_warning();
00030     }
00031   protected:
00032     // Attention: The warning parameter must have been created with
00033     // new - it will be deleted.
00034     void add_warning(SQLWarning *warning) {
00035       warnings_.push(warning);
00036     }
00037   private:
00038     std::queue<SQLWarning *> warnings_;
00039 };
00040 
00041 }
00042 
00043 #endif

Generated on Thu May 1 18:08:01 2003 for gql by doxygen1.3