GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

error.hh

Go to the documentation of this file.
00001 /* GFC-Core: GTK+ Foundation Classes (Core Library) 00002 * Copyright (C) 2002-2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00026 00027 #ifndef GFC_G_ERROR_HH 00028 #define GFC_G_ERROR_HH 00029 00030 #ifndef GFC_STACK_OBJECT_HH 00031 #include <gfc/stackobject.hh> 00032 #endif 00033 00034 #ifndef GFC_UTF_STRING_HH 00035 #include <gfc/utfstring.hh> 00036 #endif 00037 00038 #ifndef __G_ERROR_H__ 00039 #include <glib/gerror.h> 00040 #endif 00041 00042 namespace GFC { 00043 00044 namespace G { 00045 00046 class Quark; 00047 00086 00087 class Error : public StackObject 00088 { 00089 GError *error_; 00090 00091 public: 00094 00095 Error(); 00097 00098 Error(GQuark domain, int code, const char *format, ...); 00104 00105 Error(GQuark domain, int code, const String& message); 00114 00115 Error(GError *error); 00117 00118 Error(const Error& src); 00120 00121 ~Error(); 00123 00124 Error& operator=(const Error& src); 00126 00130 00131 operator GError* () const; 00133 00134 operator GError** (); 00136 00137 bool get() const; 00139 00140 bool matches(GQuark domain, int code) const; 00145 00146 Quark domain() const; 00148 00149 int code() const; 00151 00152 const char* message() const; 00154 00158 00159 void set(GQuark domain, int code, const char *format, ...); 00165 00166 void set(GQuark domain, int code, const String& message); 00175 00176 void propagate(const Error& src); 00178 00179 void clear(); 00181 00183 }; 00184 00185 } // namespace G 00186 00187 } // namespace GFC 00188 00189 #include <gfc/glib/inline/error.inl> 00190 00191 #endif // GFC_G_ERROR_HH

Generated on Tue Aug 24 00:04:56 2004 for GFC-Core by doxygen 1.3.8