gnomemm r1379 - in libgdamm/trunk: . libgda/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1379 - in libgdamm/trunk: . libgda/src
- Date: Sat, 1 Mar 2008 19:24:28 +0000 (GMT)
Author: murrayc
Date: Sat Mar 1 19:24:28 2008
New Revision: 1379
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1379&view=rev
Log:
2008-03-01 Murray Cumming <murrayc murrayc com>
* libgda/src/dictfield.ccg:
* libgda/src/dictfield.hg: get_constraints(),
* libgda/src/dictfunction.hg: get_arg_dict_types((),
* libgda/src/dicttable.hg: get_parents(), get_constraints(),
* libgda/src/dicttype.hg: get_synonyms(),
* libgda/src/entity.hg: get_fields()
* libgda/src/queryfieldvalue.hg: Added get_is_parameter().
* libgda/src/dictdatabase.hg: update_progress():
Corrected int to guint for parameter
Modified:
libgdamm/trunk/ChangeLog
libgdamm/trunk/libgda/src/datamodelarray.hg
libgdamm/trunk/libgda/src/datamodelindex.hg
libgdamm/trunk/libgda/src/datamodelquery.hg
libgdamm/trunk/libgda/src/dict.hg
libgdamm/trunk/libgda/src/dictconstraint.hg
libgdamm/trunk/libgda/src/dictdatabase.hg
libgdamm/trunk/libgda/src/dictfield.ccg
libgdamm/trunk/libgda/src/dictfield.hg
libgdamm/trunk/libgda/src/dictfunction.hg
libgdamm/trunk/libgda/src/dicttable.hg
libgdamm/trunk/libgda/src/dicttype.hg
libgdamm/trunk/libgda/src/entity.hg
libgdamm/trunk/libgda/src/query.hg
libgdamm/trunk/libgda/src/queryfieldvalue.hg
Modified: libgdamm/trunk/libgda/src/datamodelarray.hg
==============================================================================
--- libgdamm/trunk/libgda/src/datamodelarray.hg (original)
+++ libgdamm/trunk/libgda/src/datamodelarray.hg Sat Mar 1 19:24:28 2008
@@ -48,9 +48,9 @@
_WRAP_METHOD(void set_n_columns(int cols), gda_data_model_array_set_n_columns)
_WRAP_METHOD(void clear(), gda_data_model_array_clear)
-
- //TODO: Wrap this if anyone finds it useful:
- //_WRAP_METHOD(static Glib::RefPtr<DataModelArray> copy(const <Glib::RefPtr<DataModel>& src) const, gda_data_model_array_copy_model, errthrow)
+//TODO: gmmproc can't handle the errthrow with a static, it seems, so hand code:
+//#m4 _CONVERSION(`GdaDataModel*',`Glib::RefPtr<DataModelArray>',`Glib::wrap((GdaDataModelArray*)$3)')
+// _WRAP_METHOD(static Glib::RefPtr<DataModelArray> copy(const Glib::RefPtr<const DataModel>& src) const, gda_data_model_array_copy_model, errthrow)
};
} // namespace Gda
Modified: libgdamm/trunk/libgda/src/datamodelindex.hg
==============================================================================
--- libgdamm/trunk/libgda/src/datamodelindex.hg (original)
+++ libgdamm/trunk/libgda/src/datamodelindex.hg Sat Mar 1 19:24:28 2008
@@ -35,7 +35,8 @@
class Row;
-//TODO:
+/** Management of DataModel indexes.
+ */
class DataModelIndex
{
_CLASS_BOXEDTYPE(DataModelIndex, GdaDataModelIndex, gda_data_model_index_new, gda_data_model_index_copy, gda_data_model_index_free)
Modified: libgdamm/trunk/libgda/src/datamodelquery.hg
==============================================================================
--- libgdamm/trunk/libgda/src/datamodelquery.hg (original)
+++ libgdamm/trunk/libgda/src/datamodelquery.hg Sat Mar 1 19:24:28 2008
@@ -55,8 +55,11 @@
_CLASS_GOBJECT(DataModelQuery, GdaDataModelQuery, GDA_DATA_MODEL_QUERY, Object, GdaObject)
_IMPLEMENTS_INTERFACE(DataModel)
protected:
+
// Hand-coded to also set dict property
- //TODO: Documentation.
+ /** Creates a new DataModel object using the data returned by the execution of the query SELECT query.
+ * @param query A SELECT query.
+ */
explicit DataModelQuery(const Glib::RefPtr<Query>& query);
_IGNORE(gda_data_model_query_new)
Modified: libgdamm/trunk/libgda/src/dict.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dict.hg (original)
+++ libgdamm/trunk/libgda/src/dict.hg Sat Mar 1 19:24:28 2008
@@ -121,7 +121,6 @@
_WRAP_METHOD(Glib::RefPtr<const DataHandler> get_default_handler(GType for_type) const, gda_dict_get_default_handler, refreturn, constversion)
//Note that these are described in libgda_others.defs, because the C functions are actually macros:
- //TODO: Use SListHandle:
#m4 _CONVERSION(`GSList*', `Glib::SListHandle<Glib::RefPtr<DictType> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
#m4 _CONVERSION(`GSList*', `Glib::SListHandle<Glib::RefPtr<const DictType> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
Modified: libgdamm/trunk/libgda/src/dictconstraint.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dictconstraint.hg (original)
+++ libgdamm/trunk/libgda/src/dictconstraint.hg Sat Mar 1 19:24:28 2008
@@ -59,7 +59,8 @@
_IMPLEMENTS_INTERFACE(Referer)
protected:
- //TODO: File bug about gda_dict_constraint_new() and gda_dict_constraint_new_with_db() using private API:
+ //TODO: gda_dict_constraint_new() and gda_dict_constraint_new_with_db() use private API.
+ //see http://bugzilla.gnome.org/show_bug.cgi?id=519772
_WRAP_CTOR(DictConstraint(const Glib::RefPtr<DictTable>& table, DictConstraintType type), gda_dict_constraint_new)
_WRAP_CTOR(DictConstraint(const Glib::RefPtr<DictDatabase>& db), gda_dict_constraint_new_with_db)
@@ -112,7 +113,9 @@
_WRAP_METHOD(Glib::RefPtr<const DictField> not_null_get_field() const, gda_dict_constraint_not_null_get_field)
_WRAP_PROPERTY("user-constraint", bool)
- //TODO: properties, signals, vfuncs.
+ //There are no signals.
+
+ //TODO: vfuncs?
};
} // namespace Gda
Modified: libgdamm/trunk/libgda/src/dictdatabase.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dictdatabase.hg (original)
+++ libgdamm/trunk/libgda/src/dictdatabase.hg Sat Mar 1 19:24:28 2008
@@ -105,11 +105,10 @@
_WRAP_SIGNAL(void constraint_removed(const Glib::RefPtr<DictConstraint>& constraint), "constraint_removed")
_WRAP_SIGNAL(void constraint_updated(const Glib::RefPtr<DictConstraint>& constraint), "constraint_updated")
_WRAP_SIGNAL(void data_update_started(), "data_update_started")
- // TODO: These ints should be unsigned int, but gmmproc bails out when using unsigned ints here. armin.
- #m4 _CONVERSION(`guint', `int', `$3')
- #m4 _CONVERSION(`int', `guint', `$3')
+
#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
- _WRAP_SIGNAL(void update_progress(const Glib::ustring& msg, int now, int total), "update_progress")
+ _WRAP_SIGNAL(void update_progress(const Glib::ustring& msg, guint now, guint total), "update_progress")
+
_WRAP_SIGNAL(void data_update_finished(), "data_update_finished")
};
Modified: libgdamm/trunk/libgda/src/dictfield.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/dictfield.ccg (original)
+++ libgdamm/trunk/libgda/src/dictfield.ccg Sat Mar 1 19:24:28 2008
@@ -22,7 +22,7 @@
#include <libgda/gda-dict-type.h>
#include <libgdamm/dict.h>
-//#include <libgdamm/connection.h>
+#include <libgdamm/connection.h>
#include <libgda/gda-enum-types.h>
namespace Gnome
Modified: libgdamm/trunk/libgda/src/dictfield.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dictfield.hg (original)
+++ libgdamm/trunk/libgda/src/dictfield.hg Sat Mar 1 19:24:28 2008
@@ -64,8 +64,10 @@
_WRAP_METHOD(void set_scale(int length), gda_dict_field_set_scale)
_WRAP_METHOD(int get_scale() const, gda_dict_field_get_scale)
- //TODO: Use ListHandle or similar:
- _WRAP_METHOD(GSList* get_constraints(), gda_dict_field_get_constraints)
+ #m4 _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<Connection> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+ #m4 _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<const Connection> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+ _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<Connection> > get_constraints(), gda_dict_field_get_constraints)
+ _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<const Connection> > get_constraints() const, gda_dict_field_get_constraints)
_WRAP_METHOD(void set_default_value(const Value& value), gda_dict_field_set_default_value)
Value get_default_value() const;
Modified: libgdamm/trunk/libgda/src/dictfunction.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dictfunction.hg (original)
+++ libgdamm/trunk/libgda/src/dictfunction.hg Sat Mar 1 19:24:28 2008
@@ -67,8 +67,9 @@
_WRAP_METHOD(Glib::ustring get_sqlname() const, gda_dict_function_get_sqlname)
_WRAP_METHOD(void set_arg_dict_types(const Glib::SListHandle<DictType>& arg_types), gda_dict_function_set_arg_dict_types)
- // TODO: Does not work because it's a const GSList*
- // _WRAP_METHOD(Glib::SListHandle<const DictType> get_arg_dict_types(), gda_dict_function_get_arg_dict_types)
+
+#m4 _CONVERSION(`const GSList*',`Glib::SListHandle< Glib::RefPtr<const DictType> >',`$2((GSList*)$3, Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<const DictType> > get_arg_dict_types() const, gda_dict_function_get_arg_dict_types)
_WRAP_METHOD(void set_ret_dict_type(const Glib::RefPtr<DictType>& dt), gda_dict_function_set_ret_dict_type)
Modified: libgdamm/trunk/libgda/src/dicttable.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dicttable.hg (original)
+++ libgdamm/trunk/libgda/src/dicttable.hg Sat Mar 1 19:24:28 2008
@@ -64,11 +64,15 @@
_WRAP_METHOD(bool is_view() const, gda_dict_table_is_view)
- //TODO: Use ListHandle or similar:
- _WRAP_METHOD(const GSList* get_parents(), gda_dict_table_get_parents)
- //TODO: Use ListHandle or similar:
- _WRAP_METHOD(GSList* get_constraints(), gda_dict_table_get_constraints)
+#m4 _CONVERSION(`const GSList*',`Glib::SListHandle< Glib::RefPtr<const DictTable> >',`$2((GSList*)$3, Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<const DictTable> > get_parents() const, gda_dict_table_get_parents)
+
+#m4 _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<DictConstraint> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+ _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<DictConstraint> > get_constraints(), gda_dict_table_get_constraints)
+
+#m4 _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<const DictConstraint> >',`$2((GSList*)$3, Glib::OWNERSHIP_SHALLOW)')
+ _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<const DictConstraint> > get_constraints() const, gda_dict_table_get_constraints)
_WRAP_METHOD(Glib::RefPtr<DictConstraint> get_pk_constraint(), gda_dict_table_get_pk_constraint, refreturn)
_WRAP_METHOD(Glib::RefPtr<const DictConstraint> get_pk_constraint() const, gda_dict_table_get_pk_constraint, constversion)
Modified: libgdamm/trunk/libgda/src/dicttype.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dicttype.hg (original)
+++ libgdamm/trunk/libgda/src/dicttype.hg Sat Mar 1 19:24:28 2008
@@ -69,7 +69,7 @@
_WRAP_METHOD(void add_synonym(const Glib::ustring& synonym), gda_dict_type_add_synonym)
#m4 _CONVERSION(`const GSList*', `Glib::SListHandle<Glib::ustring>', `$2(const_cast<GSList*>($3), Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(Glib::SListHandle<Glib::ustring> get_synonyms(), gda_dict_type_get_synonyms)
+ _WRAP_METHOD(Glib::SListHandle<Glib::ustring> get_synonyms() const, gda_dict_type_get_synonyms)
_WRAP_METHOD(void clear_synonyms(), gda_dict_type_clear_synonyms)
Modified: libgdamm/trunk/libgda/src/entity.hg
==============================================================================
--- libgdamm/trunk/libgda/src/entity.hg (original)
+++ libgdamm/trunk/libgda/src/entity.hg Sat Mar 1 19:24:28 2008
@@ -51,8 +51,11 @@
_WRAP_METHOD(bool has_field(const Glib::RefPtr<const EntityField>& field) const, gda_entity_has_field)
- //TODO: Use a ListHandle or similar:
- _WRAP_METHOD(GSList* get_fields(), gda_entity_get_fields)
+#m4 _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<EntityField> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+ _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<EntityField> > get_fields(), gda_entity_get_fields)
+
+#m4 _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<const EntityField> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+ _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<const EntityField> > get_fields() const, gda_entity_get_fields)
_WRAP_METHOD(int get_n_fields() const, gda_entity_get_n_fields)
Modified: libgdamm/trunk/libgda/src/query.hg
==============================================================================
--- libgdamm/trunk/libgda/src/query.hg (original)
+++ libgdamm/trunk/libgda/src/query.hg Sat Mar 1 19:24:28 2008
@@ -193,8 +193,7 @@
_WRAP_METHOD(Glib::SListHandle<Glib::RefPtr<QueryField> > get_fields_by_target(const Glib::RefPtr<QueryTarget>& target, bool visible_fields_only = true), gda_query_get_fields_by_target)
_WRAP_METHOD(Glib::SListHandle<Glib::RefPtr<const QueryField> > get_fields_by_target(const Glib::RefPtr<QueryTarget>& target, bool visible_fields_only = true) const, gda_query_get_fields_by_target)
- // TODO: This is declared in a separate header that has no G_BEGIN_DECS /
- // G_END_DECL pairs and also looks a bit private. We can still add it
+ // TODO: This is declared in a separate header that looks a bit private. We can still add it
// later if we need it. armin.
//_WRAP_METHOD(Glib::RefPtr<QueryField> get_field_by_sql_naming_fields(const Glib::ustring& sql_name, const Glib::SListHandle<Glib::RefPtr<QueryField> >& fields_list), gda_query_get_field_by_sql_naming_fields, refreturn)
//_WRAP_METHOD(Glib::RefPtr<const QueryField> get_field_by_sql_naming_fields(const Glib::ustring& sql_name, const Glib::SListHandle<Glib::RefPtr<QueryField> >& fields_list) const, gda_query_get_field_by_sql_naming_fields, refreturn, constversion)
Modified: libgdamm/trunk/libgda/src/queryfieldvalue.hg
==============================================================================
--- libgdamm/trunk/libgda/src/queryfieldvalue.hg (original)
+++ libgdamm/trunk/libgda/src/queryfieldvalue.hg Sat Mar 1 19:24:28 2008
@@ -73,7 +73,7 @@
_WRAP_METHOD(Value get_default_value() const, gda_query_field_value_get_default_value)
_WRAP_METHOD(void set_is_parameter(bool is_param = true), gda_query_field_value_set_is_parameter)
- //TODO: Uncomment this for the next version (2.99.5?) of libgda which will fix the linker problem: _WRAP_METHOD(bool get_is_parameter() const, gda_query_field_value_get_is_parameter)
+ _WRAP_METHOD(bool get_is_parameter() const, gda_query_field_value_get_is_parameter)
_WRAP_METHOD(void set_not_null(bool not_null = true), gda_query_field_value_set_not_null)
_WRAP_METHOD(bool get_not_null() const, gda_query_field_value_get_not_null)
_WRAP_METHOD(bool is_value_null(const Glib::RefPtr<ParameterList>& context) const, gda_query_field_value_is_value_null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]