00001
00002
00003 #ifndef _LIBGDAMM_ROW_H
00004 #define _LIBGDAMM_ROW_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <libgdamm/value.h>
00033 #include <glibmm/object.h>
00034
00035
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GdaRow GdaRow;
00038 typedef struct _GdaRowClass GdaRowClass;
00039 #endif
00040
00041
00042 namespace Gnome
00043 {
00044
00045 namespace Gda
00046 { class Row_Class; }
00047
00048 }
00049 namespace Gnome
00050 {
00051
00052 namespace Gda
00053 {
00054
00055 class DataModel;
00056 class Value;
00057
00058
00059
00060 class Row : public Glib::Object
00061 {
00062 protected:
00063
00064 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00065
00066 public:
00067 typedef Row CppObjectType;
00068 typedef Row_Class CppClassType;
00069 typedef GdaRow BaseObjectType;
00070 typedef GdaRowClass BaseClassType;
00071
00072 private: friend class Row_Class;
00073 static CppClassType row_class_;
00074
00075 private:
00076
00077 Row(const Row&);
00078 Row& operator=(const Row&);
00079
00080 protected:
00081 explicit Row(const Glib::ConstructParams& construct_params);
00082 explicit Row(GdaRow* castitem);
00083
00084 #endif
00085
00086 public:
00087 virtual ~Row();
00088
00089 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00090 static GType get_type() G_GNUC_CONST;
00091 static GType get_base_type() G_GNUC_CONST;
00092 #endif
00093
00095 GdaRow* gobj() { return reinterpret_cast<GdaRow*>(gobject_); }
00096
00098 const GdaRow* gobj() const { return reinterpret_cast<GdaRow*>(gobject_); }
00099
00101 GdaRow* gobj_copy();
00102
00103 private:
00104
00105
00106 explicit Row(const Glib::RefPtr<DataModel>& model, int count);
00107
00108
00109 explicit Row(const Glib::RefPtr<DataModel>& model, const GList *values);
00110
00111 public:
00112
00116 Glib::RefPtr<Row> copy() const;
00117
00118
00119 static Glib::RefPtr<Row> create(const Glib::RefPtr<DataModel>& model, int count);
00120
00121
00122 static Glib::RefPtr<Row> create(const Glib::RefPtr<DataModel>& model, const GList * values);
00123
00124
00129 int get_number() const;
00130
00134 void set_number(int number);
00135
00139 Glib::ustring get_id() const;
00140
00145 void set_id(const Glib::ustring& id);
00146
00147 Value get_value(int num) const;
00148
00149
00156 bool set_value(int num, const Value& value);;
00157
00158
00162 Glib::RefPtr<DataModel> get_model();
00163
00167 Glib::RefPtr<const DataModel> get_model() const;
00168
00169
00175 void set_model(const Glib::RefPtr<DataModel>& model);
00176
00177
00181 int get_length() const;
00182
00183
00184 void set_is_default(int num, bool is_default = true);
00185
00189 bool get_is_default(int num) const;
00190
00191
00192
00193
00194 public:
00195
00196 public:
00197
00198 #ifdef GLIBMM_VFUNCS_ENABLED
00199 #endif //GLIBMM_VFUNCS_ENABLED
00200
00201 protected:
00202
00203 #ifdef GLIBMM_VFUNCS_ENABLED
00204 #endif //GLIBMM_VFUNCS_ENABLED
00205
00206
00207 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00208 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00209
00210
00211 };
00212
00213 }
00214 }
00215
00216
00217 namespace Glib
00218 {
00224 Glib::RefPtr<Gnome::Gda::Row> wrap(GdaRow* object, bool take_copy = false);
00225 }
00226
00227
00228 #endif
00229