datamodelindex.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGDAMM_DATAMODELINDEX_H
00004 #define _LIBGDAMM_DATAMODELINDEX_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* $Id: datamodelindex.hg,v 1.1 2005/09/10 11:02:10 murrayc Exp $ */
00010 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
00011 
00012 /* datamodel.h
00013  *
00014  * Copyright 2003 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/columnindex.h>
00033 #include <libgda/gda-data-model-index.h>
00034 
00035 
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 extern "C" { typedef struct _GdaDataModelIndex GdaDataModelIndex; }
00038 #endif
00039 
00040 namespace Gnome
00041 {
00042 
00043 namespace Gda
00044 {
00045 
00046 class Row;
00047 
00048 //TODO:
00049 class DataModelIndex
00050 {
00051   public:
00052 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00053   typedef DataModelIndex CppObjectType;
00054   typedef GdaDataModelIndex BaseObjectType;
00055 
00056   static GType get_type() G_GNUC_CONST;
00057 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00058 
00059   DataModelIndex();
00060 
00061   explicit DataModelIndex(GdaDataModelIndex* gobject, bool make_a_copy = true);
00062 
00063   DataModelIndex(const DataModelIndex& other);
00064   DataModelIndex& operator=(const DataModelIndex& other);
00065 
00066   ~DataModelIndex();
00067 
00068   void swap(DataModelIndex& other);
00069 
00071   GdaDataModelIndex*       gobj()       { return gobject_; }
00072 
00074   const GdaDataModelIndex* gobj() const { return gobject_; }
00075 
00077   GdaDataModelIndex* gobj_copy() const;
00078 
00079 protected:
00080   GdaDataModelIndex* gobject_;
00081 
00082 private:
00083 
00084   
00085 public:
00086 
00087   
00088    // hmm, seems like gmmproc doesn't know that we used it in _WRAP_EQUAL().
00089 
00090   
00094   Glib::ustring get_name() const;
00095   
00099   void gda_data_set_name(const Glib::ustring& name);
00100   
00104   Glib::ustring get_table_name() const;
00105   
00109   void set_table_name(const Glib::ustring& name);
00110   
00114   bool get_primary_key() const;
00115   
00119   void set_primary_key(bool pk = true);
00120   
00124   bool get_unique_key() const;
00125   
00129   void set_unique_key(bool uk = true);
00130   
00134   Glib::ustring get_references() const;
00135   
00139   void set_references(const Glib::ustring& ref);
00140 
00141   //TODO: Use correct list types (and ownershipt). Johannes
00142   // _WRAP_METHOD(Glib::ListHandle<ColumnIndex> get_column_index_list() const, gda_data_model_index_get_column_index_list)
00143   //_WRAP_METHOD(void set_column_index_list(const Glib::ListHandle<ColumnIndex>& col_idx_list), gda_data_model_index_set_column_index_list)
00144 
00145 
00146 };
00147 
00148 } // namespace Gda
00149 } // namespace Gnome
00150 
00151 
00152 namespace Gnome
00153 {
00154 
00155 namespace Gda
00156 {
00157 
00163 bool operator==(const DataModelIndex& lhs, const DataModelIndex& rhs);
00164 
00170 bool operator!=(const DataModelIndex& lhs, const DataModelIndex& rhs);
00171 
00172 
00173 } // namespace Gda
00174 
00175 } // namespace Gnome
00176 
00177 
00178 namespace Gnome
00179 {
00180 
00181 namespace Gda
00182 {
00183 
00188 inline void swap(DataModelIndex& lhs, DataModelIndex& rhs)
00189   { lhs.swap(rhs); }
00190 
00191 } // namespace Gda
00192 
00193 } // namespace Gnome
00194 
00195 namespace Glib
00196 {
00197 
00203 Gnome::Gda::DataModelIndex wrap(GdaDataModelIndex* object, bool take_copy = false);
00204 
00205 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00206 template <>
00207 class Value<Gnome::Gda::DataModelIndex> : public Glib::Value_Boxed<Gnome::Gda::DataModelIndex>
00208 {};
00209 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00210 
00211 } // namespace Glib
00212 
00213 
00214 #endif /* _LIBGDAMM_DATAMODELINDEX_H */
00215 

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