renderer.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGDAMM_RENDERER_H
00004 #define _LIBGDAMM_RENDERER_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
00010 
00011 /* renderer.h
00012  *
00013  * Copyright 2003 libgdamm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <glibmm/interface.h>
00031 #include <libgdamm/parameterlist.h>
00032 #include <libgda/gda-renderer.h>
00033 
00034 
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GdaRenderer GdaRenderer;
00037 typedef struct _GdaRendererClass GdaRendererClass;
00038 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00039 
00040 
00041 namespace Gnome
00042 {
00043 
00044 namespace Gda
00045 { class Renderer_Class; } // namespace Gda
00046 
00047 } // namespace Gnome
00048 namespace Gnome
00049 {
00050 
00051 namespace Gda
00052 {
00053 
00067 enum RendererOptions
00068 {
00069   RENDERER_EXTRA_PRETTY_SQL = 1 << 0,
00070   RENDERER_PARAMS_AS_DETAILED = 1 << 1,
00071   RENDERER_ERROR_IF_DEFAULT = 1 << 2,
00072   RENDERER_FIELDS_NO_TARGET_ALIAS = 1 << 3,
00073   RENDERER_PARAMS_AS_COLON = 1 << 4,
00074   RENDERER_PARAMS_AS_DOLLAR = 1 << 5
00075 };
00076 
00078 inline RendererOptions operator|(RendererOptions lhs, RendererOptions rhs)
00079   { return static_cast<RendererOptions>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00080 
00082 inline RendererOptions operator&(RendererOptions lhs, RendererOptions rhs)
00083   { return static_cast<RendererOptions>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00084 
00086 inline RendererOptions operator^(RendererOptions lhs, RendererOptions rhs)
00087   { return static_cast<RendererOptions>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00088 
00090 inline RendererOptions operator~(RendererOptions flags)
00091   { return static_cast<RendererOptions>(~static_cast<unsigned>(flags)); }
00092 
00094 inline RendererOptions& operator|=(RendererOptions& lhs, RendererOptions rhs)
00095   { return (lhs = static_cast<RendererOptions>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00096 
00098 inline RendererOptions& operator&=(RendererOptions& lhs, RendererOptions rhs)
00099   { return (lhs = static_cast<RendererOptions>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00100 
00102 inline RendererOptions& operator^=(RendererOptions& lhs, RendererOptions rhs)
00103   { return (lhs = static_cast<RendererOptions>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00104 
00105 } // namespace Gda
00106 
00107 } // namespace Gnome
00108 
00109 
00110 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00111 namespace Glib
00112 {
00113 
00114 template <>
00115 class Value<Gnome::Gda::RendererOptions> : public Glib::Value_Flags<Gnome::Gda::RendererOptions>
00116 {
00117 public:
00118   static GType value_type() G_GNUC_CONST;
00119 };
00120 
00121 } // namespace Glib
00122 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00123 
00124 
00125 namespace Gnome
00126 {
00127 
00128 namespace Gda
00129 {
00130 
00131 
00135 class Renderer : public Glib::Interface
00136 {
00137   
00138 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00139 
00140 public:
00141   typedef Renderer CppObjectType;
00142   typedef Renderer_Class CppClassType;
00143   typedef GdaRenderer BaseObjectType;
00144   typedef GdaRendererIface BaseClassType;
00145 
00146 private:
00147   friend class Renderer_Class;
00148   static CppClassType renderer_class_;
00149 
00150   // noncopyable
00151   Renderer(const Renderer&);
00152   Renderer& operator=(const Renderer&);
00153 
00154 protected:
00155   Renderer(); // you must derive from this class
00156   explicit Renderer(GdaRenderer* castitem);
00157 
00158 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00159 
00160 public:
00161   virtual ~Renderer();
00162 
00163   static void add_interface(GType gtype_implementer);
00164 
00165 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00166   static GType get_type()      G_GNUC_CONST;
00167   static GType get_base_type() G_GNUC_CONST;
00168 #endif
00169 
00171   GdaRenderer*       gobj()       { return reinterpret_cast<GdaRenderer*>(gobject_); }
00172 
00174   const GdaRenderer* gobj() const { return reinterpret_cast<GdaRenderer*>(gobject_); }
00175 
00176 private:
00177 
00178 public:
00179  
00180   // TODO: Wrap GSList* output parameter:
00181   //_WRAP_METHOD(Glib::ustring render_as_sql(const Glib::RefPtr<GdaParameterList> context, GSList **out_params_used, RendererOptions options), gda_renderer_render_as_sql, errthrow)
00182 
00183   
00188   Glib::ustring render_as_str(const Glib::RefPtr<ParameterList>& context) const;
00189   
00196 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00197   bool is_valid(const Glib::RefPtr<ParameterList>& context) const;
00198 #else
00199   bool is_valid(const Glib::RefPtr<ParameterList>& context, std::auto_ptr<Glib::Error>& error) const;
00200 #endif //GLIBMM_EXCEPTIONS_ENABLED
00201 
00202 
00203 public:
00204 
00205 public:
00206   //C++ methods used to invoke GTK+ virtual functions:
00207 #ifdef GLIBMM_VFUNCS_ENABLED
00208 #endif //GLIBMM_VFUNCS_ENABLED
00209 
00210 protected:
00211   //GTK+ Virtual Functions (override these to change behaviour):
00212 #ifdef GLIBMM_VFUNCS_ENABLED
00213 #endif //GLIBMM_VFUNCS_ENABLED
00214 
00215   //Default Signal Handlers::
00216 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00217 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00218 
00219 
00220 };
00221 
00222 } // namespace Gda
00223 } // namespace Gnome
00224 
00225 
00226 namespace Glib
00227 {
00233   Glib::RefPtr<Gnome::Gda::Renderer> wrap(GdaRenderer* object, bool take_copy = false);
00234 
00235 } // namespace Glib
00236 
00237 
00238 #endif /* _LIBGDAMM_RENDERER_H */
00239 

Generated on Sat Feb 10 20:06:26 2007 for libgdamm by  doxygen 1.4.7