1 // Generated by gmmproc 2.46.1 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <libgdamm/dataproxy.h>
7 #include <libgdamm/private/dataproxy_p.h>
8 
9 
10 // -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
11 
12 /* dataproxy.cc
13  *
14  * Copyright 2003 libgdamm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 #include <libgda/gda-data-proxy.h>
32 #include <libgdamm/dataproxy.h>
33 
34 namespace Gnome
35 {
36 
37 namespace Gda
38 {
39 
get_values(int proxy_row,const std::vector<int> & cols_index) const40 DataProxy::ValueVector DataProxy::get_values(int proxy_row, const std::vector<int>& cols_index) const
41 {
42   GSList* values = gda_data_proxy_get_values(const_cast<GdaDataProxy*>(gobj()), proxy_row, const_cast<gint*>(cols_index.data()), cols_index.size());
43   return Glib::SListHandler<Value, ValueTraits>::slist_to_vector(values, Glib::OWNERSHIP_SHALLOW);
44 }
45 
46 } /* namespace Gda */
47 
48 } /* namespace Gnome */
49 
50 
51 namespace
52 {
53 
54 
DataProxy_signal_row_delete_changed_callback(GdaDataProxy * self,gint p0,gboolean p1,void * data)55 static void DataProxy_signal_row_delete_changed_callback(GdaDataProxy* self, gint p0,gboolean p1,void* data)
56 {
57   using namespace Gnome::Gda;
58   typedef sigc::slot< void,int,bool > SlotType;
59 
60   auto obj = dynamic_cast<DataProxy*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
61   // Do not try to call a signal on a disassociated wrapper.
62   if(obj)
63   {
64     try
65     {
66       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
67         (*static_cast<SlotType*>(slot))(p0
68 , p1
69 );
70     }
71     catch(...)
72     {
73        Glib::exception_handlers_invoke();
74     }
75   }
76 }
77 
78 static const Glib::SignalProxyInfo DataProxy_signal_row_delete_changed_info =
79 {
80   "row-delete-changed",
81   (GCallback) &DataProxy_signal_row_delete_changed_callback,
82   (GCallback) &DataProxy_signal_row_delete_changed_callback
83 };
84 
85 
DataProxy_signal_sample_changed_callback(GdaDataProxy * self,gint p0,gint p1,void * data)86 static void DataProxy_signal_sample_changed_callback(GdaDataProxy* self, gint p0,gint p1,void* data)
87 {
88   using namespace Gnome::Gda;
89   typedef sigc::slot< void,int,int > SlotType;
90 
91   auto obj = dynamic_cast<DataProxy*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
92   // Do not try to call a signal on a disassociated wrapper.
93   if(obj)
94   {
95     try
96     {
97       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
98         (*static_cast<SlotType*>(slot))(p0
99 , p1
100 );
101     }
102     catch(...)
103     {
104        Glib::exception_handlers_invoke();
105     }
106   }
107 }
108 
109 static const Glib::SignalProxyInfo DataProxy_signal_sample_changed_info =
110 {
111   "sample-changed",
112   (GCallback) &DataProxy_signal_sample_changed_callback,
113   (GCallback) &DataProxy_signal_sample_changed_callback
114 };
115 
116 
DataProxy_signal_sample_size_changed_callback(GdaDataProxy * self,gint p0,void * data)117 static void DataProxy_signal_sample_size_changed_callback(GdaDataProxy* self, gint p0,void* data)
118 {
119   using namespace Gnome::Gda;
120   typedef sigc::slot< void,int > SlotType;
121 
122   auto obj = dynamic_cast<DataProxy*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
123   // Do not try to call a signal on a disassociated wrapper.
124   if(obj)
125   {
126     try
127     {
128       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
129         (*static_cast<SlotType*>(slot))(p0
130 );
131     }
132     catch(...)
133     {
134        Glib::exception_handlers_invoke();
135     }
136   }
137 }
138 
139 static const Glib::SignalProxyInfo DataProxy_signal_sample_size_changed_info =
140 {
141   "sample-size-changed",
142   (GCallback) &DataProxy_signal_sample_size_changed_callback,
143   (GCallback) &DataProxy_signal_sample_size_changed_callback
144 };
145 
146 
147 static const Glib::SignalProxyInfo DataProxy_signal_filter_changed_info =
148 {
149   "filter-changed",
150   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
151   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
152 };
153 
154 
DataProxy_signal_validate_row_changes_callback(GdaDataProxy * self,gint p0,gint p1,void * data)155 static GError* DataProxy_signal_validate_row_changes_callback(GdaDataProxy* self, gint p0,gint p1,void* data)
156 {
157   using namespace Gnome::Gda;
158   typedef sigc::slot< Glib::Error,int,int > SlotType;
159 
160   auto obj = dynamic_cast<DataProxy*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
161   // Do not try to call a signal on a disassociated wrapper.
162   if(obj)
163   {
164     try
165     {
166       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
167         return ((*static_cast<SlotType*>(slot))(p0
168 , p1
169 )).gobj();
170     }
171     catch(...)
172     {
173        Glib::exception_handlers_invoke();
174     }
175   }
176 
177   typedef GError* RType;
178   return RType();
179 }
180 
DataProxy_signal_validate_row_changes_notify_callback(GdaDataProxy * self,gint p0,gint p1,void * data)181 static GError* DataProxy_signal_validate_row_changes_notify_callback(GdaDataProxy* self, gint p0,gint p1, void* data)
182 {
183   using namespace Gnome::Gda;
184   typedef sigc::slot< void,int,int > SlotType;
185 
186   auto obj = dynamic_cast<DataProxy*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
187   // Do not try to call a signal on a disassociated wrapper.
188   if(obj)
189   {
190     try
191     {
192       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
193         (*static_cast<SlotType*>(slot))(p0
194 , p1
195 );
196     }
197     catch(...)
198     {
199       Glib::exception_handlers_invoke();
200     }
201   }
202 
203   typedef GError* RType;
204   return RType();
205 }
206 
207 static const Glib::SignalProxyInfo DataProxy_signal_validate_row_changes_info =
208 {
209   "validate-row-changes",
210   (GCallback) &DataProxy_signal_validate_row_changes_callback,
211   (GCallback) &DataProxy_signal_validate_row_changes_notify_callback
212 };
213 
214 
DataProxy_signal_row_changes_applied_callback(GdaDataProxy * self,gint p0,gint p1,void * data)215 static void DataProxy_signal_row_changes_applied_callback(GdaDataProxy* self, gint p0,gint p1,void* data)
216 {
217   using namespace Gnome::Gda;
218   typedef sigc::slot< void,int,int > SlotType;
219 
220   auto obj = dynamic_cast<DataProxy*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
221   // Do not try to call a signal on a disassociated wrapper.
222   if(obj)
223   {
224     try
225     {
226       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
227         (*static_cast<SlotType*>(slot))(p0
228 , p1
229 );
230     }
231     catch(...)
232     {
233        Glib::exception_handlers_invoke();
234     }
235   }
236 }
237 
238 static const Glib::SignalProxyInfo DataProxy_signal_row_changes_applied_info =
239 {
240   "row-changes-applied",
241   (GCallback) &DataProxy_signal_row_changes_applied_callback,
242   (GCallback) &DataProxy_signal_row_changes_applied_callback
243 };
244 
245 
246 } // anonymous namespace
247 
248 
249 namespace Glib
250 {
251 
wrap(GdaDataProxy * object,bool take_copy)252 Glib::RefPtr<Gnome::Gda::DataProxy> wrap(GdaDataProxy* object, bool take_copy)
253 {
254   return Glib::RefPtr<Gnome::Gda::DataProxy>( dynamic_cast<Gnome::Gda::DataProxy*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
255   //We use dynamic_cast<> in case of multiple inheritance.
256 }
257 
258 } /* namespace Glib */
259 
260 
261 namespace Gnome
262 {
263 
264 namespace Gda
265 {
266 
267 
268 /* The *_Class implementation: */
269 
init()270 const Glib::Class& DataProxy_Class::init()
271 {
272   if(!gtype_) // create the GType if necessary
273   {
274     // Glib::Class has to know the class init function to clone custom types.
275     class_init_func_ = &DataProxy_Class::class_init_function;
276 
277     // This is actually just optimized away, apparently with no harm.
278     // Make sure that the parent type has been created.
279     //CppClassParent::CppObjectType::get_type();
280 
281     // Create the wrapper type, with the same class/instance size as the base type.
282     register_derived_type(gda_data_proxy_get_type());
283 
284     // Add derived versions of interfaces, if the C type implements any interfaces:
285   DataModel::add_interface(get_type());
286 
287   }
288 
289   return *this;
290 }
291 
292 
class_init_function(void * g_class,void * class_data)293 void DataProxy_Class::class_init_function(void* g_class, void* class_data)
294 {
295   const auto klass = static_cast<BaseClassType*>(g_class);
296   CppClassParent::class_init_function(klass, class_data);
297 
298 
299   klass->row_delete_changed = &row_delete_changed_callback;
300   klass->sample_changed = &sample_changed_callback;
301   klass->sample_size_changed = &sample_size_changed_callback;
302   klass->row_changes_applied = &row_changes_applied_callback;
303 }
304 
305 
row_delete_changed_callback(GdaDataProxy * self,gint p0,gboolean p1)306 void DataProxy_Class::row_delete_changed_callback(GdaDataProxy* self, gint p0, gboolean p1)
307 {
308   const auto obj_base = static_cast<Glib::ObjectBase*>(
309       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
310 
311   // Non-gtkmmproc-generated custom classes implicitly call the default
312   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
313   // generated classes can use this optimisation, which avoids the unnecessary
314   // parameter conversions if there is no possibility of the virtual function
315   // being overridden:
316   if(obj_base && obj_base->is_derived_())
317   {
318     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
319     if(obj) // This can be NULL during destruction.
320     {
321       try // Trap C++ exceptions which would normally be lost because this is a C callback.
322       {
323         // Call the virtual member method, which derived classes might override.
324         obj->on_row_delete_changed(p0
325 , p1
326 );
327         return;
328       }
329       catch(...)
330       {
331         Glib::exception_handlers_invoke();
332       }
333     }
334   }
335 
336   const auto base = static_cast<BaseClassType*>(
337         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
338     );
339 
340   // Call the original underlying C function:
341   if(base && base->row_delete_changed)
342     (*base->row_delete_changed)(self, p0, p1);
343 }
sample_changed_callback(GdaDataProxy * self,gint p0,gint p1)344 void DataProxy_Class::sample_changed_callback(GdaDataProxy* self, gint p0, gint p1)
345 {
346   const auto obj_base = static_cast<Glib::ObjectBase*>(
347       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
348 
349   // Non-gtkmmproc-generated custom classes implicitly call the default
350   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
351   // generated classes can use this optimisation, which avoids the unnecessary
352   // parameter conversions if there is no possibility of the virtual function
353   // being overridden:
354   if(obj_base && obj_base->is_derived_())
355   {
356     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
357     if(obj) // This can be NULL during destruction.
358     {
359       try // Trap C++ exceptions which would normally be lost because this is a C callback.
360       {
361         // Call the virtual member method, which derived classes might override.
362         obj->on_sample_changed(p0
363 , p1
364 );
365         return;
366       }
367       catch(...)
368       {
369         Glib::exception_handlers_invoke();
370       }
371     }
372   }
373 
374   const auto base = static_cast<BaseClassType*>(
375         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
376     );
377 
378   // Call the original underlying C function:
379   if(base && base->sample_changed)
380     (*base->sample_changed)(self, p0, p1);
381 }
sample_size_changed_callback(GdaDataProxy * self,gint p0)382 void DataProxy_Class::sample_size_changed_callback(GdaDataProxy* self, gint p0)
383 {
384   const auto obj_base = static_cast<Glib::ObjectBase*>(
385       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
386 
387   // Non-gtkmmproc-generated custom classes implicitly call the default
388   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
389   // generated classes can use this optimisation, which avoids the unnecessary
390   // parameter conversions if there is no possibility of the virtual function
391   // being overridden:
392   if(obj_base && obj_base->is_derived_())
393   {
394     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
395     if(obj) // This can be NULL during destruction.
396     {
397       try // Trap C++ exceptions which would normally be lost because this is a C callback.
398       {
399         // Call the virtual member method, which derived classes might override.
400         obj->on_sample_size_changed(p0
401 );
402         return;
403       }
404       catch(...)
405       {
406         Glib::exception_handlers_invoke();
407       }
408     }
409   }
410 
411   const auto base = static_cast<BaseClassType*>(
412         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
413     );
414 
415   // Call the original underlying C function:
416   if(base && base->sample_size_changed)
417     (*base->sample_size_changed)(self, p0);
418 }
row_changes_applied_callback(GdaDataProxy * self,gint p0,gint p1)419 void DataProxy_Class::row_changes_applied_callback(GdaDataProxy* self, gint p0, gint p1)
420 {
421   const auto obj_base = static_cast<Glib::ObjectBase*>(
422       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
423 
424   // Non-gtkmmproc-generated custom classes implicitly call the default
425   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
426   // generated classes can use this optimisation, which avoids the unnecessary
427   // parameter conversions if there is no possibility of the virtual function
428   // being overridden:
429   if(obj_base && obj_base->is_derived_())
430   {
431     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
432     if(obj) // This can be NULL during destruction.
433     {
434       try // Trap C++ exceptions which would normally be lost because this is a C callback.
435       {
436         // Call the virtual member method, which derived classes might override.
437         obj->on_row_changes_applied(p0
438 , p1
439 );
440         return;
441       }
442       catch(...)
443       {
444         Glib::exception_handlers_invoke();
445       }
446     }
447   }
448 
449   const auto base = static_cast<BaseClassType*>(
450         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
451     );
452 
453   // Call the original underlying C function:
454   if(base && base->row_changes_applied)
455     (*base->row_changes_applied)(self, p0, p1);
456 }
457 
458 
wrap_new(GObject * object)459 Glib::ObjectBase* DataProxy_Class::wrap_new(GObject* object)
460 {
461   return new DataProxy((GdaDataProxy*)object);
462 }
463 
464 
465 /* The implementation: */
466 
gobj_copy()467 GdaDataProxy* DataProxy::gobj_copy()
468 {
469   reference();
470   return gobj();
471 }
472 
DataProxy(const Glib::ConstructParams & construct_params)473 DataProxy::DataProxy(const Glib::ConstructParams& construct_params)
474 :
475   Glib::Object(construct_params)
476 {
477 
478 }
479 
DataProxy(GdaDataProxy * castitem)480 DataProxy::DataProxy(GdaDataProxy* castitem)
481 :
482   Glib::Object((GObject*)(castitem))
483 {}
484 
485 
DataProxy(DataProxy && src)486 DataProxy::DataProxy(DataProxy&& src) noexcept
487 : Glib::Object(std::move(src))
488   , DataModel(std::move(src))
489 {}
490 
operator =(DataProxy && src)491 DataProxy& DataProxy::operator=(DataProxy&& src) noexcept
492 {
493   Glib::Object::operator=(std::move(src));
494   DataModel::operator=(std::move(src));
495   return *this;
496 }
497 
~DataProxy()498 DataProxy::~DataProxy() noexcept
499 {}
500 
501 
502 DataProxy::CppClassType DataProxy::dataproxy_class_; // initialize static member
503 
get_type()504 GType DataProxy::get_type()
505 {
506   return dataproxy_class_.init().get_type();
507 }
508 
509 
get_base_type()510 GType DataProxy::get_base_type()
511 {
512   return gda_data_proxy_get_type();
513 }
514 
515 
DataProxy(const Glib::RefPtr<DataModel> & model)516 DataProxy::DataProxy(const Glib::RefPtr<DataModel>& model)
517 :
518   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
519   Glib::ObjectBase(0),
520   Glib::Object(Glib::ConstructParams(dataproxy_class_.init(), "model", Glib::unwrap(model), static_cast<char*>(0)))
521 {
522 
523 
524 }
525 
create(const Glib::RefPtr<DataModel> & model)526 Glib::RefPtr<DataProxy> DataProxy::create(const Glib::RefPtr<DataModel>& model)
527 {
528   return Glib::RefPtr<DataProxy>( new DataProxy(model) );
529 }
530 
get_proxied_model()531 Glib::RefPtr<DataModel> DataProxy::get_proxied_model()
532 {
533   Glib::RefPtr<DataModel> retvalue = Glib::wrap(gda_data_proxy_get_proxied_model(gobj()));
534   if(retvalue)
535     retvalue->reference(); //The function does not do a ref for us.
536   return retvalue;
537 }
538 
get_proxied_model() const539 Glib::RefPtr<const DataModel> DataProxy::get_proxied_model() const
540 {
541   return const_cast<DataProxy*>(this)->get_proxied_model();
542 }
543 
get_proxied_model_n_cols() const544 int DataProxy::get_proxied_model_n_cols() const
545 {
546   return gda_data_proxy_get_proxied_model_n_cols(const_cast<GdaDataProxy*>(gobj()));
547 }
548 
get_proxied_model_n_rows() const549 int DataProxy::get_proxied_model_n_rows() const
550 {
551   return gda_data_proxy_get_proxied_model_n_rows(const_cast<GdaDataProxy*>(gobj()));
552 }
553 
is_read_only() const554 bool DataProxy::is_read_only() const
555 {
556   return gda_data_proxy_is_read_only(const_cast<GdaDataProxy*>(gobj()));
557 }
558 
get_value_attributes(int proxy_row,int col) const559 ValueAttribute DataProxy::get_value_attributes(int proxy_row, int col) const
560 {
561   return ((ValueAttribute)(gda_data_proxy_get_value_attributes(const_cast<GdaDataProxy*>(gobj()), proxy_row, col)));
562 }
563 
alter_value_attributes(int proxy_row,int col,ValueAttribute alter_flags)564 void DataProxy::alter_value_attributes(int proxy_row, int col, ValueAttribute alter_flags)
565 {
566   gda_data_proxy_alter_value_attributes(gobj(), proxy_row, col, ((GdaValueAttribute)(alter_flags)));
567 }
568 
get_proxied_model_row(int proxy_row) const569 int DataProxy::get_proxied_model_row(int proxy_row) const
570 {
571   return gda_data_proxy_get_proxied_model_row(const_cast<GdaDataProxy*>(gobj()), proxy_row);
572 }
573 
erase(int proxy_row)574 void DataProxy::erase(int proxy_row)
575 {
576   gda_data_proxy_delete(gobj(), proxy_row);
577 }
578 
unerase(int proxy_row)579 void DataProxy::unerase(int proxy_row)
580 {
581   gda_data_proxy_undelete(gobj(), proxy_row);
582 }
583 
row_is_deleted(int proxy_row) const584 bool DataProxy::row_is_deleted(int proxy_row) const
585 {
586   return gda_data_proxy_row_is_deleted(const_cast<GdaDataProxy*>(gobj()), proxy_row);
587 }
588 
row_is_inserted(int proxy_row) const589 bool DataProxy::row_is_inserted(int proxy_row) const
590 {
591   return gda_data_proxy_row_is_inserted(const_cast<GdaDataProxy*>(gobj()), proxy_row);
592 }
593 
cancel_row_changes(int proxy_row,int col)594 void DataProxy::cancel_row_changes(int proxy_row, int col)
595 {
596   gda_data_proxy_cancel_row_changes(gobj(), proxy_row, col);
597 }
598 
apply_row_changes(int proxy_row)599 void DataProxy::apply_row_changes(int proxy_row)
600 {
601   GError* gerror = nullptr;
602   gda_data_proxy_apply_row_changes(gobj(), proxy_row, &(gerror));
603   if(gerror)
604     ::Glib::Error::throw_exception(gerror);
605 }
606 
has_changed() const607 bool DataProxy::has_changed() const
608 {
609   return gda_data_proxy_has_changed(const_cast<GdaDataProxy*>(gobj()));
610 }
611 
row_has_changed(int proxy_row) const612 bool DataProxy::row_has_changed(int proxy_row) const
613 {
614   return gda_data_proxy_row_has_changed(const_cast<GdaDataProxy*>(gobj()), proxy_row);
615 }
616 
get_n_new_rows() const617 int DataProxy::get_n_new_rows() const
618 {
619   return gda_data_proxy_get_n_new_rows(const_cast<GdaDataProxy*>(gobj()));
620 }
621 
get_n_modified_rows() const622 int DataProxy::get_n_modified_rows() const
623 {
624   return gda_data_proxy_get_n_modified_rows(const_cast<GdaDataProxy*>(gobj()));
625 }
626 
set_sample_size(int sample_size)627 void DataProxy::set_sample_size(int sample_size)
628 {
629   gda_data_proxy_set_sample_size(gobj(), sample_size);
630 }
631 
get_sample_size() const632 int DataProxy::get_sample_size() const
633 {
634   return gda_data_proxy_get_sample_size(const_cast<GdaDataProxy*>(gobj()));
635 }
636 
set_sample_start(int sample_start)637 void DataProxy::set_sample_start(int sample_start)
638 {
639   gda_data_proxy_set_sample_start(gobj(), sample_start);
640 }
641 
get_sample_start() const642 int DataProxy::get_sample_start() const
643 {
644   return gda_data_proxy_get_sample_start(const_cast<GdaDataProxy*>(gobj()));
645 }
646 
get_sample_end() const647 int DataProxy::get_sample_end() const
648 {
649   return gda_data_proxy_get_sample_end(const_cast<GdaDataProxy*>(gobj()));
650 }
651 
apply_all_changes()652 bool DataProxy::apply_all_changes()
653 {
654   GError* gerror = nullptr;
655   bool retvalue = gda_data_proxy_apply_all_changes(gobj(), &(gerror));
656   if(gerror)
657     ::Glib::Error::throw_exception(gerror);
658   return retvalue;
659 }
660 
cancel_all_changes()661 bool DataProxy::cancel_all_changes()
662 {
663   return gda_data_proxy_cancel_all_changes(gobj());
664 }
665 
get_filtered_n_rows()666 int DataProxy::get_filtered_n_rows()
667 {
668   return gda_data_proxy_get_filtered_n_rows(gobj());
669 }
670 
get_filter_expr()671 Glib::ustring DataProxy::get_filter_expr()
672 {
673   return Glib::convert_const_gchar_ptr_to_ustring(gda_data_proxy_get_filter_expr(gobj()));
674 }
675 
get_filter_expr(const Glib::ustring & filter_expr)676 void DataProxy::get_filter_expr(const Glib::ustring& filter_expr)
677 {
678   GError* gerror = nullptr;
679   gda_data_proxy_set_filter_expr(gobj(), filter_expr.c_str(), &(gerror));
680   if(gerror)
681     ::Glib::Error::throw_exception(gerror);
682 }
683 
set_ordering_column(int col)684 void DataProxy::set_ordering_column(int col)
685 {
686   GError* gerror = nullptr;
687   gda_data_proxy_set_ordering_column(gobj(), col, &(gerror));
688   if(gerror)
689     ::Glib::Error::throw_exception(gerror);
690 }
691 
692 
signal_row_delete_changed()693 Glib::SignalProxy2< void,int,bool > DataProxy::signal_row_delete_changed()
694 {
695   return Glib::SignalProxy2< void,int,bool >(this, &DataProxy_signal_row_delete_changed_info);
696 }
697 
698 
signal_sample_changed()699 Glib::SignalProxy2< void,int,int > DataProxy::signal_sample_changed()
700 {
701   return Glib::SignalProxy2< void,int,int >(this, &DataProxy_signal_sample_changed_info);
702 }
703 
704 
signal_sample_size_changed()705 Glib::SignalProxy1< void,int > DataProxy::signal_sample_size_changed()
706 {
707   return Glib::SignalProxy1< void,int >(this, &DataProxy_signal_sample_size_changed_info);
708 }
709 
710 
signal_filter_changed()711 Glib::SignalProxy0< void > DataProxy::signal_filter_changed()
712 {
713   return Glib::SignalProxy0< void >(this, &DataProxy_signal_filter_changed_info);
714 }
715 
716 
signal_validate_row_changes()717 Glib::SignalProxy2< Glib::Error,int,int > DataProxy::signal_validate_row_changes()
718 {
719   return Glib::SignalProxy2< Glib::Error,int,int >(this, &DataProxy_signal_validate_row_changes_info);
720 }
721 
722 
signal_row_changes_applied()723 Glib::SignalProxy2< void,int,int > DataProxy::signal_row_changes_applied()
724 {
725   return Glib::SignalProxy2< void,int,int >(this, &DataProxy_signal_row_changes_applied_info);
726 }
727 
728 
property_model()729 Glib::PropertyProxy< Glib::RefPtr<DataModel> > DataProxy::property_model()
730 {
731   return Glib::PropertyProxy< Glib::RefPtr<DataModel> >(this, "model");
732 }
733 
property_model() const734 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DataModel> > DataProxy::property_model() const
735 {
736   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DataModel> >(this, "model");
737 }
738 
property_prepend_null_entry()739 Glib::PropertyProxy< bool > DataProxy::property_prepend_null_entry()
740 {
741   return Glib::PropertyProxy< bool >(this, "prepend-null-entry");
742 }
743 
property_prepend_null_entry() const744 Glib::PropertyProxy_ReadOnly< bool > DataProxy::property_prepend_null_entry() const
745 {
746   return Glib::PropertyProxy_ReadOnly< bool >(this, "prepend-null-entry");
747 }
748 
property_defer_sync()749 Glib::PropertyProxy< bool > DataProxy::property_defer_sync()
750 {
751   return Glib::PropertyProxy< bool >(this, "defer-sync");
752 }
753 
property_defer_sync() const754 Glib::PropertyProxy_ReadOnly< bool > DataProxy::property_defer_sync() const
755 {
756   return Glib::PropertyProxy_ReadOnly< bool >(this, "defer-sync");
757 }
758 
property_sample_size()759 Glib::PropertyProxy< int > DataProxy::property_sample_size()
760 {
761   return Glib::PropertyProxy< int >(this, "sample-size");
762 }
763 
property_sample_size() const764 Glib::PropertyProxy_ReadOnly< int > DataProxy::property_sample_size() const
765 {
766   return Glib::PropertyProxy_ReadOnly< int >(this, "sample-size");
767 }
768 
769 
on_row_delete_changed(int row,bool to_be_deleted)770 void Gnome::Gda::DataProxy::on_row_delete_changed(int row, bool to_be_deleted)
771 {
772   const auto base = static_cast<BaseClassType*>(
773       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
774   );
775 
776   if(base && base->row_delete_changed)
777     (*base->row_delete_changed)(gobj(),row,static_cast<int>(to_be_deleted));
778 }
on_sample_changed(int sample_start,int sample_end)779 void Gnome::Gda::DataProxy::on_sample_changed(int sample_start, int sample_end)
780 {
781   const auto base = static_cast<BaseClassType*>(
782       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
783   );
784 
785   if(base && base->sample_changed)
786     (*base->sample_changed)(gobj(),sample_start,sample_end);
787 }
on_sample_size_changed(int sample_size)788 void Gnome::Gda::DataProxy::on_sample_size_changed(int sample_size)
789 {
790   const auto base = static_cast<BaseClassType*>(
791       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
792   );
793 
794   if(base && base->sample_size_changed)
795     (*base->sample_size_changed)(gobj(),sample_size);
796 }
on_row_changes_applied(int row,int proxied_row)797 void Gnome::Gda::DataProxy::on_row_changes_applied(int row, int proxied_row)
798 {
799   const auto base = static_cast<BaseClassType*>(
800       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
801   );
802 
803   if(base && base->row_changes_applied)
804     (*base->row_changes_applied)(gobj(),row,proxied_row);
805 }
806 
807 
808 } // namespace Gda
809 
810 } // namespace Gnome
811 
812 
813