[libgda] Added virtual methods to GdaDataModelIter
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Added virtual methods to GdaDataModelIter
- Date: Fri, 17 Aug 2018 22:05:52 +0000 (UTC)
commit 2e07689610cf920d02f92f0c87ceb7d8a93fc8c1
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Aug 15 09:03:45 2018 -0500
Added virtual methods to GdaDataModelIter
Step to allow per DataModel implementation to use its own
DataModelIter implementation
libgda/gda-data-model-iter.c | 12 ++++++++----
libgda/gda-data-model-iter.h | 8 ++++++++
libgda/gda-data-select.h | 2 ++
3 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/libgda/gda-data-model-iter.c b/libgda/gda-data-model-iter.c
index 7f298188b..5b845bdda 100644
--- a/libgda/gda-data-model-iter.c
+++ b/libgda/gda-data-model-iter.c
@@ -133,6 +133,10 @@ gda_data_model_iter_class_init (GdaDataModelIterClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ class->move_to_row = gda_data_model_iter_move_to_row;
+ class->move_next = gda_data_model_iter_move_next;
+ class->move_prev = gda_data_model_iter_move_prev;
+ class->set_value_at = gda_data_model_iter_set_value_at;
class->row_changed = NULL;
class->end_of_data = NULL;
@@ -574,7 +578,7 @@ gda_data_model_iter_get_property (GObject *object,
}
/**
- * gda_data_model_iter_move_to_row:
+ * gda_data_model_iter_move_to_row: (virtual move_to_row)
* @iter: a #GdaDataModelIter object
* @row: the row to set @iter to
*
@@ -721,7 +725,7 @@ gda_data_model_iter_move_to_row_default (GdaDataModel *model, GdaDataModelIter *
/**
- * gda_data_model_iter_move_next:
+ * gda_data_model_iter_move_next: (virtual move_next)
* @iter: a #GdaDataModelIter object
*
* Moves @iter one row further than where it already is
@@ -822,7 +826,7 @@ gda_data_model_iter_move_next_default (GdaDataModel *model, GdaDataModelIter *it
}
/**
- * gda_data_model_iter_move_prev:
+ * gda_data_model_iter_move_prev: (virtual move_prev)
* @iter: a #GdaDataModelIter object
*
* Moves @iter one row before where it already is (synchronizes the values of the parameters in @iter
@@ -1073,7 +1077,7 @@ gda_data_model_iter_get_value_at_e (GdaDataModelIter *iter, gint col, GError **e
}
/**
- * gda_data_model_iter_set_value_at:
+ * gda_data_model_iter_set_value_at: (virtual set_value_at)
* @iter: a #GdaDataModelIter object
* @col: the column number
* @value: a #GValue (not %NULL)
diff --git a/libgda/gda-data-model-iter.h b/libgda/gda-data-model-iter.h
index 6f5e0134f..2b5fcf504 100644
--- a/libgda/gda-data-model-iter.h
+++ b/libgda/gda-data-model-iter.h
@@ -36,6 +36,14 @@ struct _GdaDataModelIterClass
{
GdaSetClass parent_class;
+ /* Virtual methods */
+ gboolean (* move_to_row) (GdaDataModelIter *iter, gint row);
+ gboolean (* move_next) (GdaDataModelIter *iter);
+ gboolean (* move_prev) (GdaDataModelIter *iter);
+ gboolean (* set_value_at) (GdaDataModelIter *iter, gint col,
+ const GValue *value, GError **error);
+
+ /* Signals */
void (* row_changed) (GdaDataModelIter *iter, gint row);
void (* end_of_data) (GdaDataModelIter *iter);
diff --git a/libgda/gda-data-select.h b/libgda/gda-data-select.h
index d537e5006..56d99890f 100644
--- a/libgda/gda-data-select.h
+++ b/libgda/gda-data-select.h
@@ -178,6 +178,8 @@ GdaConnection *gda_data_select_get_connection (GdaDataSelect *m
gboolean gda_data_select_rerun (GdaDataSelect *model, GError **error);
gboolean gda_data_select_prepare_for_offline (GdaDataSelect *model, GError **error);
+#define GDA_TYPE_DATA_SELECT_ITER gda_data_select_iter_get_type()
+
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]