datastore.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMEDBMM_DATASTORE_H
00004 #define _LIBGNOMEDBMM_DATASTORE_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- C++ -*- // 
00010 
00011 /* datastore.hg
00012  * 
00013  * Copyright 2006 libgnomedbmm 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 
00031 #include <glibmm/object.h>
00032 #include <gtkmm/treemodel.h>
00033 #include <libgdamm/datamodel.h>
00034 #include <libgdamm/dataproxy.h>
00035 #include <libgdamm/value.h>
00036 
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038 typedef struct _GnomeDbDataStore GnomeDbDataStore;
00039 typedef struct _GnomeDbDataStoreClass GnomeDbDataStoreClass;
00040 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00041 
00042 
00043 namespace Gnome
00044 {
00045 
00046 namespace Db
00047 { class DataStore_Class; } // namespace Db
00048 
00049 } // namespace Gnome
00050 namespace Gnome
00051 {
00052 
00053 namespace Db
00054 {
00055 
00056 
00057 class DataStore : public Glib::Object, public Gtk::TreeModel
00058 {
00059   
00060 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00061 
00062 public:
00063   typedef DataStore CppObjectType;
00064   typedef DataStore_Class CppClassType;
00065   typedef GnomeDbDataStore BaseObjectType;
00066   typedef GnomeDbDataStoreClass BaseClassType;
00067 
00068 private:  friend class DataStore_Class;
00069   static CppClassType datastore_class_;
00070 
00071 private:
00072   // noncopyable
00073   DataStore(const DataStore&);
00074   DataStore& operator=(const DataStore&);
00075 
00076 protected:
00077   explicit DataStore(const Glib::ConstructParams& construct_params);
00078   explicit DataStore(GnomeDbDataStore* castitem);
00079 
00080 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00081 
00082 public:
00083   virtual ~DataStore();
00084 
00085 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00086   static GType get_type()      G_GNUC_CONST;
00087   static GType get_base_type() G_GNUC_CONST;
00088 #endif
00089 
00091   GnomeDbDataStore*       gobj()       { return reinterpret_cast<GnomeDbDataStore*>(gobject_); }
00092 
00094   const GnomeDbDataStore* gobj() const { return reinterpret_cast<GnomeDbDataStore*>(gobject_); }
00095 
00097   GnomeDbDataStore* gobj_copy();
00098 
00099 private:
00100 
00101 protected:
00102   explicit DataStore(const Glib::RefPtr<Gda::DataModel>& model);
00103   
00104 public:
00105   
00106   static Glib::RefPtr<DataStore> create(const Glib::RefPtr<Gda::DataModel>& model);
00107 
00108 
00115   bool set_value(const Gtk::TreeModel::iterator& iter, int col, const Gda::Value& value);
00116 
00117   // We renamed delete/undelete to erase/unerase in C++ because delete is a
00118   // C++ keyword.
00119   
00123   void erase(const Gtk::TreeModel::iterator& iter);
00124   
00128   void unerase(const Gtk::TreeModel::iterator& iter);
00129   
00134   bool append(Gtk::TreeModel::iterator& iter);
00135 
00136   
00140   Glib::RefPtr<Gda::DataProxy> get_proxy();
00141   
00145   Glib::RefPtr<const Gda::DataProxy> get_proxy() const;
00146 
00147   
00152   int get_row_from_iter(const Gtk::TreeModel::iterator& iter) const;
00153 
00154    
00164   bool get_iter_from_values(Gtk::TreeModel::iterator& iter, const Glib::SListHandle<Gda::Value>& values, const Glib::ArrayHandle<int>& cols_index) const;
00165 
00166   #ifdef GLIBMM_PROPERTIES_ENABLED
00167 
00173   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gda::DataModel> > property_model() const;
00174 #endif //#GLIBMM_PROPERTIES_ENABLED
00175 
00176 
00177   #ifdef GLIBMM_PROPERTIES_ENABLED
00178 
00184   Glib::PropertyProxy<bool> property_prepend_null_entry() ;
00185 #endif //#GLIBMM_PROPERTIES_ENABLED
00186 
00187 #ifdef GLIBMM_PROPERTIES_ENABLED
00188 
00194   Glib::PropertyProxy_ReadOnly<bool> property_prepend_null_entry() const;
00195 #endif //#GLIBMM_PROPERTIES_ENABLED
00196 
00197   #ifdef GLIBMM_PROPERTIES_ENABLED
00198 
00204   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gda::DataProxy> > property_proxy() const;
00205 #endif //#GLIBMM_PROPERTIES_ENABLED
00206 
00207 
00208 public:
00209 
00210 public:
00211   //C++ methods used to invoke GTK+ virtual functions:
00212 #ifdef GLIBMM_VFUNCS_ENABLED
00213 #endif //GLIBMM_VFUNCS_ENABLED
00214 
00215 protected:
00216   //GTK+ Virtual Functions (override these to change behaviour):
00217 #ifdef GLIBMM_VFUNCS_ENABLED
00218 #endif //GLIBMM_VFUNCS_ENABLED
00219 
00220   //Default Signal Handlers::
00221 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00222 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00223 
00224 
00225 };
00226 
00227 } // namespace Db
00228 
00229 } // namespace Gnome
00230 
00231 
00232 namespace Glib
00233 {
00239   Glib::RefPtr<Gnome::Db::DataStore> wrap(GnomeDbDataStore* object, bool take_copy = false);
00240 }
00241 
00242 
00243 #endif /* _LIBGNOMEDBMM_DATASTORE_H */
00244 

Generated on Mon Feb 12 16:48:59 2007 for libgnomedbmm by  doxygen 1.4.7