object.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGDAMM_OBJECT_H
00004 #define _LIBGDAMM_OBJECT_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* $Id: object.hg,v 1.3 2006/11/08 00:07:37 murrayc Exp $ */
00010 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
00011 
00012 /* error.h
00013  *
00014  * Copyright 2006 libgdamm Development Team
00015  *
00016  * This library is free software; you can redistribute it and/or
00017  * modify it under the terms of the GNU Library General Public
00018  * License as published by the Free Software Foundation; either
00019  * version 2 of the License, or(at your option) any later version.
00020  *
00021  * This library is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024  * Library General Public License for more details.
00025  *
00026  * You should have received a copy of the GNU Library General Public
00027  * License along with this library; if not, write to the Free
00028  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00029  */
00030 
00031 #include <glibmm/object.h>
00032 //#include <libgdamm/dict.h>
00033 
00034 
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GdaObject GdaObject;
00037 typedef struct _GdaObjectClass GdaObjectClass;
00038 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00039 
00040 
00041 namespace Gnome
00042 {
00043 
00044 namespace Gda
00045 { class Object_Class; } // namespace Gda
00046 
00047 } // namespace Gnome
00048 namespace Gnome
00049 {
00050 
00051 namespace Gda
00052 {
00053 
00067 enum ValueAttribute
00068 {
00069   VALUE_ATTR_NONE = 0,
00070   VALUE_ATTR_IS_NULL = 1 << 0,
00071   VALUE_ATTR_CAN_BE_NULL = 1 << 1,
00072   VALUE_ATTR_IS_DEFAULT = 1 << 2,
00073   VALUE_ATTR_CAN_BE_DEFAULT = 1 << 3,
00074   VALUE_ATTR_IS_UNCHANGED = 1 << 4,
00075   VALUE_ATTR_ACTIONS_SHOWN = 1 << 5,
00076   VALUE_ATTR_DATA_NON_VALID = 1 << 6,
00077   VALUE_ATTR_HAS_VALUE_ORIG = 1 << 7,
00078   VALUE_ATTR_NO_MODIF = 1 << 8,
00079   VALUE_ATTR_UNUSED = 1 << 9
00080 };
00081 
00083 inline ValueAttribute operator|(ValueAttribute lhs, ValueAttribute rhs)
00084   { return static_cast<ValueAttribute>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00085 
00087 inline ValueAttribute operator&(ValueAttribute lhs, ValueAttribute rhs)
00088   { return static_cast<ValueAttribute>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00089 
00091 inline ValueAttribute operator^(ValueAttribute lhs, ValueAttribute rhs)
00092   { return static_cast<ValueAttribute>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00093 
00095 inline ValueAttribute operator~(ValueAttribute flags)
00096   { return static_cast<ValueAttribute>(~static_cast<unsigned>(flags)); }
00097 
00099 inline ValueAttribute& operator|=(ValueAttribute& lhs, ValueAttribute rhs)
00100   { return (lhs = static_cast<ValueAttribute>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00101 
00103 inline ValueAttribute& operator&=(ValueAttribute& lhs, ValueAttribute rhs)
00104   { return (lhs = static_cast<ValueAttribute>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00105 
00107 inline ValueAttribute& operator^=(ValueAttribute& lhs, ValueAttribute rhs)
00108   { return (lhs = static_cast<ValueAttribute>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00109 
00110 } // namespace Gda
00111 
00112 } // namespace Gnome
00113 
00114 
00115 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00116 namespace Glib
00117 {
00118 
00119 template <>
00120 class Value<Gnome::Gda::ValueAttribute> : public Glib::Value_Flags<Gnome::Gda::ValueAttribute>
00121 {
00122 public:
00123   static GType value_type() G_GNUC_CONST;
00124 };
00125 
00126 } // namespace Glib
00127 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00128 
00129 
00130 namespace Gnome
00131 {
00132 
00133 namespace Gda
00134 {
00135 
00136 
00137 class Dict;
00138 
00142 class Object : public Glib::Object
00143 {
00144   
00145 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00146 
00147 public:
00148   typedef Object CppObjectType;
00149   typedef Object_Class CppClassType;
00150   typedef GdaObject BaseObjectType;
00151   typedef GdaObjectClass BaseClassType;
00152 
00153 private:  friend class Object_Class;
00154   static CppClassType object_class_;
00155 
00156 private:
00157   // noncopyable
00158   Object(const Object&);
00159   Object& operator=(const Object&);
00160 
00161 protected:
00162   explicit Object(const Glib::ConstructParams& construct_params);
00163   explicit Object(GdaObject* castitem);
00164 
00165 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00166 
00167 public:
00168   virtual ~Object();
00169 
00170 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00171   static GType get_type()      G_GNUC_CONST;
00172   static GType get_base_type() G_GNUC_CONST;
00173 #endif
00174 
00176   GdaObject*       gobj()       { return reinterpret_cast<GdaObject*>(gobject_); }
00177 
00179   const GdaObject* gobj() const { return reinterpret_cast<GdaObject*>(gobject_); }
00180 
00182   GdaObject* gobj_copy();
00183 
00184 private:
00185 
00186 protected:
00187 
00188  Object();
00189 
00190 public:
00191   
00192   static Glib::RefPtr<Object> create();
00193 
00194 
00198   Glib::RefPtr<Dict> get_dict();
00199   
00203   Glib::RefPtr<const Dict> get_dict() const;
00204 
00205   
00211   void set_id(const Glib::ustring& strid);
00212   
00216   void set_name(const Glib::ustring& name);
00217   
00221   void set_description(const Glib::ustring& descr);
00222   
00226   void set_owner(const Glib::ustring& owner);
00227 
00228   
00232   Glib::ustring get_id() const;
00233   
00237   Glib::ustring get_name() const;
00238   
00242   Glib::ustring get_description() const;
00243   
00247   Glib::ustring get_owner() const;
00248 
00249   //We ignore the *destroy methods because they are not appropriate for C++ and don't even seem necessary as public API.
00250   
00251 
00252   // Ignore this debugging method
00253   
00254 
00258   void signal_emit_changed();
00259   
00262   void block_changed();
00263   
00266   void unblock_changed();
00267 
00268   // IMHO, this one might be useful because it is emitted when a Gda::Parameter changes for example
00269   
00275   Glib::SignalProxy0< void > signal_signal_changed();
00276 
00277 
00278   /* TODO: Ignore these signals for now because they look strange and not useful:
00279   _WRAP_SIGNAL(void id_changed, "id_changed")
00280   _WRAP_SIGNAL(void name_changed, "name_changed")
00281   _WRAP_SIGNAL(void descr_changed, "descr_changed")
00282   _WRAP_SIGNAL(void owner_changed, "owner_changed")
00283 
00284   _WRAP_SIGNAL(void to_be_destroyed, "to_be_destroyed")
00285   _WRAP_SIGNAL(void destroyed, "destroyed")
00286   */
00287 
00288 
00289 public:
00290 
00291 public:
00292   //C++ methods used to invoke GTK+ virtual functions:
00293 #ifdef GLIBMM_VFUNCS_ENABLED
00294 #endif //GLIBMM_VFUNCS_ENABLED
00295 
00296 protected:
00297   //GTK+ Virtual Functions (override these to change behaviour):
00298 #ifdef GLIBMM_VFUNCS_ENABLED
00299 #endif //GLIBMM_VFUNCS_ENABLED
00300 
00301   //Default Signal Handlers::
00302 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00303   virtual void on_signal_changed();
00304 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00305 
00306 
00307 };
00308 
00309 } // namespace Gda
00310 } // namespace Gnome
00311 
00312 
00313 namespace Glib
00314 {
00320   Glib::RefPtr<Gnome::Gda::Object> wrap(GdaObject* object, bool take_copy = false);
00321 }
00322 
00323 
00324 #endif /* _LIBGDAMM_OBJECT_H */
00325 

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