row.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGDAMM_ROW_H
00004 #define _LIBGDAMM_ROW_H
00005 
00006 #include <glibmm.h>
00007 
00008 /* $Id: row.hg,v 1.5 2004/04/23 11:14:49 murrayc Exp $ */
00009 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
00010 
00011 /* row.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 
00031 #include <libgdamm/value.h>
00032 //#include <glibmm/object.h>
00033 
00034 
00035 #include <libgda/gda-data-model.h>
00036 
00037 namespace Gnome
00038 {
00039 
00040 namespace Gda
00041 {
00042 
00043 class DataModel;
00044 class Value;
00045 
00046 class Row
00047 {
00048   public:
00049 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00050   typedef Row CppObjectType;
00051   typedef GdaRow BaseObjectType;
00052 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00053 
00054   Row();
00055 
00056   // Use make_a_copy=true when getting it directly from a struct.
00057   explicit Row(GdaRow* castitem, bool make_a_copy = false);
00058 
00059   Row(const Row& src);
00060   Row& operator=(const Row& src);
00061 
00062   ~Row();
00063 
00064   GdaRow*       gobj()       { return gobject_; }
00065   const GdaRow* gobj() const { return gobject_; }
00066 
00068   GdaRow* gobj_copy() const;
00069 
00070 protected:
00071   GdaRow* gobject_;
00072 
00073 private:
00074 
00075   
00076 public:
00077 
00078   Row(const Glib::RefPtr<DataModel>& model, int count);
00079   
00080   Row(const Glib::RefPtr<DataModel>& model, const GList *values);
00081   
00082 
00083   Glib::RefPtr<DataModel> get_model();
00084   
00085   Glib::RefPtr<const DataModel> get_model() const;
00086 
00087   
00088   int get_number() const;
00089   
00090   void set_number(int number);
00091   
00092   Glib::ustring get_id() const;
00093   
00094   void set_id(const Glib::ustring& id);
00095 
00096   //We use a custom conversion here, because we need to copy the value:
00097    
00098 
00099   Value get_value(int num) const;
00100   
00101   
00102   int get_length() const;
00103 
00104 
00105 };
00106 
00107 } // namespace Gda
00108 } // namespace Gnome
00109 
00110 
00111 namespace Glib
00112 {
00113 
00119 Gnome::Gda::Row wrap(GdaRow* object, bool take_copy = false);
00120 
00121 } // namespace Glib
00122 
00123 #endif /* _LIBGDAMM_ROW_H */
00124 

Generated on Sat Dec 31 18:34:52 2005 for libgdamm by  doxygen 1.4.5