Re: [gnome-db] GdaDataModel virtual functions API question + new PATCH
- From: Daniel Espinosa <esodan gmail com>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] GdaDataModel virtual functions API question + new PATCH
- Date: Fri, 23 Sep 2011 19:02:33 +0200
2011/9/22 Murray Cumming
<murrayc murrayc com>
On Thu, 2011-09-22 at 03:33 +0200, Daniel Espinosa wrote:
> I'm continuing adding more and more annotations in libgda-4.2 (find
> attached another PATCH :-), I'm adding Virtual: annotations to
> GdaDataModel and found that the following virtual functions:
>
> [NoWrapper]
> public abstract bool i_iter_at_row (Gda.DataModelIter iter,
> int row);
> [NoWrapper]
> public abstract bool i_iter_next (Gda.DataModelIter iter);
> [NoWrapper]
> public abstract bool i_iter_prev (Gda.DataModelIter iter);
> [NoWrapper]
> public abstract bool i_iter_set_value (Gda.DataModelIter iter,
> int col, GLib.Value value) throws GLib.Error;
>
> * Must not be part of GdaDataModel* because they are functions of
> GdaDataModelter. Remove this functions in libgda-5.0 could be good to
> cleaning the API.
No, these are used by GdaDataModel. For instance:
http://git.gnome.org/browse/libgda/tree/libgda/gda-data-select.c#n317
(I guess the data model creates and manipulates iterators. That makes
sense.)
DataModel create Iter is Ok. But it returns a DataModelIter object and you can create more iters if you want, then i_iter_next virtual function must be implemented by Provider but called on the required Iter I guess.
If this are the behavior then (in an hipotetical condition) if some one implement a new Provider using Vala will use i_iter_next (and other iter related virtual functions) override directly right?
Just to help feature Providers:
Are there any help (I didn't find them) to implement GdaDataModel interface?
For Providers is only required to subclass GdaDataModelSelect class? What about iterator's virtual functions? Are they implemented by DataModelSelect?
> The following virtual function have a static
You mean virtual rather than static, I guess.
> function and no public function to use it, is this correct? Must be
> removed from the virtual functions API in 5.0?
>
> [NoWrapper]
> public abstract bool i_get_notify ();
That's not unusual at all. It's not a problem.
>
> I'm finding more API comments from the generated VAPI file on Utility:
most functions must be in the object used by them to perform the action.
I don't understand this part.
Is the same as happened on Gda Easy's functions: move this functions as part of the object used, i.e.
utility_check_data_model_v
>>must be:
gda_data_model_check_v
utility_data_model_dump_data_to_xml
>>must be:
gda_data_model_dump_to_xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]