gnomemm r1794 - in libgdamm/trunk: . libgda/src tools/m4



Author: murrayc
Date: Mon Nov 17 09:44:42 2008
New Revision: 1794
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1794&view=rev

Log:
2008-11-17  Murray Cumming  <murrayc murrayc com>

* libgda/src/batch.ccg:
* libgda/src/batch.hg:
* libgda/src/blob.hg:
* libgda/src/column.hg:
* libgda/src/config.hg:
* libgda/src/connection.hg:
* libgda/src/connectionevent.hg:
* libgda/src/dataaccesswrapper.hg:
* libgda/src/datacomparator.hg:
* libgda/src/datamodel.hg:
* libgda/src/datamodelarray.hg:
* libgda/src/datamodelimport.hg:
* libgda/src/datamodeliter.hg:
* libgda/src/dataselect.hg:
* libgda/src/error.hg:
* libgda/src/holder.hg:
* libgda/src/metastore.ccg:
* libgda/src/metastore.hg:
* libgda/src/metastruct.hg:
* libgda/src/quarklist.hg:
* libgda/src/row.hg:
* libgda/src/serveroperation.hg:
* libgda/src/serverprovider.ccg:
* libgda/src/serverprovider.hg:
* libgda/src/set.hg:
* libgda/src/sqlparser.hg:
* libgda/src/statement.hg:
* libgda/src/threader.hg:
* libgda/src/xatransaction.hg:
* tools/m4/convert_libgdamm.m4:
Several const corrections.
Moved typedefs into classes.
Moved signal conversions into .hg files and added the extra ref.
Put fullstop at end of all doxygen first sentences.

Modified:
   libgdamm/trunk/ChangeLog
   libgdamm/trunk/libgda/src/batch.ccg
   libgdamm/trunk/libgda/src/batch.hg
   libgdamm/trunk/libgda/src/blob.hg
   libgdamm/trunk/libgda/src/column.hg
   libgdamm/trunk/libgda/src/config.hg
   libgdamm/trunk/libgda/src/connection.hg
   libgdamm/trunk/libgda/src/connectionevent.hg
   libgdamm/trunk/libgda/src/dataaccesswrapper.hg
   libgdamm/trunk/libgda/src/datacomparator.hg
   libgdamm/trunk/libgda/src/datamodel.hg
   libgdamm/trunk/libgda/src/datamodelarray.hg
   libgdamm/trunk/libgda/src/datamodelimport.hg
   libgdamm/trunk/libgda/src/datamodeliter.hg
   libgdamm/trunk/libgda/src/dataselect.hg
   libgdamm/trunk/libgda/src/error.hg
   libgdamm/trunk/libgda/src/holder.hg
   libgdamm/trunk/libgda/src/metastore.ccg
   libgdamm/trunk/libgda/src/metastore.hg
   libgdamm/trunk/libgda/src/metastruct.hg
   libgdamm/trunk/libgda/src/quarklist.hg
   libgdamm/trunk/libgda/src/row.hg
   libgdamm/trunk/libgda/src/serveroperation.hg
   libgdamm/trunk/libgda/src/serverprovider.ccg
   libgdamm/trunk/libgda/src/serverprovider.hg
   libgdamm/trunk/libgda/src/set.hg
   libgdamm/trunk/libgda/src/sqlparser.hg
   libgdamm/trunk/libgda/src/statement.hg
   libgdamm/trunk/libgda/src/threader.hg
   libgdamm/trunk/libgda/src/xatransaction.hg
   libgdamm/trunk/tools/m4/convert_libgdamm.m4

Modified: libgdamm/trunk/libgda/src/batch.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/batch.ccg	(original)
+++ libgdamm/trunk/libgda/src/batch.ccg	Mon Nov 17 09:44:42 2008
@@ -22,12 +22,17 @@
 #include <libgdamm/batch.h>
 #include <libgda/gda-batch.h>
 
+
 namespace Gnome
 {
 
 namespace Gda
 {
 
+//Fix compilation of our generated code:
+typedef Batch::StatementSList StatementSList;
+
+
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
 bool Batch::get_parameters(Glib::RefPtr<Set>& out_params)
 #else

Modified: libgdamm/trunk/libgda/src/batch.hg
==============================================================================
--- libgdamm/trunk/libgda/src/batch.hg	(original)
+++ libgdamm/trunk/libgda/src/batch.hg	Mon Nov 17 09:44:42 2008
@@ -31,9 +31,7 @@
 namespace Gda
 {
 
-typedef Glib::SListHandle<Glib::RefPtr<const Statement> > StatementSList;
-
-/** Multiple SQL statements groupped
+/** Multiple SQL statements grouped together.
  *
  * The Gda::Batch object represents one or more SQL statements (as Gda::Statement objects) in a single object.
  * A Gda::Batch can either be built "manually" by assembling together several Gda::Statement objects, or from an 
@@ -52,10 +50,13 @@
   
   _WRAP_METHOD(void add_statement(const Glib::RefPtr<Statement>& stmt), gda_batch_add_statement)
   _WRAP_METHOD(void remove_statement(const Glib::RefPtr<Statement>& stmt), gda_batch_remove_statement)
-  _WRAP_METHOD(Glib::ustring serialize(), gda_batch_serialize)
+  _WRAP_METHOD(Glib::ustring serialize() const, gda_batch_serialize)
+
+  typedef Glib::SListHandle<Glib::RefPtr<const Statement> > StatementSList;
 
+  //There is no non-const override for this, because the C function returns const items.
   #m4 _CONVERSION(`const GSList*',`StatementSList',`$2((GSList*)$3, Glib::OWNERSHIP_NONE)')
-  _WRAP_METHOD(StatementSList get_statements(), gda_batch_get_statements)
+  _WRAP_METHOD(StatementSList get_statements() const, gda_batch_get_statements)
 
   _WRAP_METHOD_DOCS_ONLY(gda_statement_get_parameters)
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -64,7 +65,7 @@
   bool get_parameters(Glib::RefPtr<Set>& out_params, std::auto_ptr<Glib::Error>& error);
   #endif //GLIBMM_EXCEPTIONS_ENABLED
     
-  // FIXME: Use better marshaller in libgda
+  // FIXME: Use better marshaller in libgda. TODO: Bug number?
   #m4 _CONVERSION(`GObject*',`Glib::RefPtr<Statement>',`Glib::wrap(GDA_STATEMENT($3))')
   _WRAP_SIGNAL(void changed(Glib::RefPtr<Statement> stmt), "changed", no_default_handler)
 };

Modified: libgdamm/trunk/libgda/src/blob.hg
==============================================================================
--- libgdamm/trunk/libgda/src/blob.hg	(original)
+++ libgdamm/trunk/libgda/src/blob.hg	Mon Nov 17 09:44:42 2008
@@ -43,7 +43,7 @@
   
   public:
     _WRAP_METHOD(void set_op(const Glib::RefPtr<BlobOp>& op), gda_blob_set_op)
-    _WRAP_METHOD(Glib::ustring to_string(guint maxlen), gda_blob_to_string)
+    _WRAP_METHOD(Glib::ustring to_string(guint maxlen = 0) const, gda_blob_to_string)
 };
 
 } // namespace Gda

Modified: libgdamm/trunk/libgda/src/column.hg
==============================================================================
--- libgdamm/trunk/libgda/src/column.hg	(original)
+++ libgdamm/trunk/libgda/src/column.hg	Mon Nov 17 09:44:42 2008
@@ -70,6 +70,7 @@
   _WRAP_METHOD(gint get_position() const, gda_column_get_position)
   _WRAP_METHOD(void set_position(gint position), gda_column_set_position)
 
+   //TODO: Documentation.
    Glib::ValueBase get_default_value() const;
   _IGNORE(gda_column_get_default_value)
   

Modified: libgdamm/trunk/libgda/src/config.hg
==============================================================================
--- libgdamm/trunk/libgda/src/config.hg	(original)
+++ libgdamm/trunk/libgda/src/config.hg	Mon Nov 17 09:44:42 2008
@@ -33,7 +33,7 @@
 namespace Gda
 {
   
-/** Configuration â Access/Management of libgda configuration
+/** Configuration â Access/Management of libgda configuration.
  *
  * @ingroup Configuration
  */
@@ -64,6 +64,7 @@
   _WRAP_SIGNAL(void dsn_changed(GdaDsnInfo* info), "dsn-changed", no_default_handler)
   _WRAP_SIGNAL(void dsn_removed(GdaDsnInfo* info), "dsn-removed", no_default_handler)
   _WRAP_SIGNAL(void dsn_to_be_removed(GdaDsnInfo* info), "dsn-to-be-removed", no_default_handler)
+
   _WRAP_PROPERTY("system-filename", Glib::ustring);
   _WRAP_PROPERTY("user-filename", Glib::ustring);
 };

Modified: libgdamm/trunk/libgda/src/connection.hg
==============================================================================
--- libgdamm/trunk/libgda/src/connection.hg	(original)
+++ libgdamm/trunk/libgda/src/connection.hg	Mon Nov 17 09:44:42 2008
@@ -166,7 +166,7 @@
   _IGNORE(gda_connection_update_meta_store)
   //_WRAP_METHOD(bool update_meta_store (MetaContext* context), gda_connection_update_meta_store, errthrow)
   
-  _WRAP_METHOD(bool statement_prepare (const Glib::RefPtr<Statement>& stmt), gda_connection_statement_prepare, errthrow)
+  _WRAP_METHOD(bool statement_prepare(const Glib::RefPtr<Statement>& stmt), gda_connection_statement_prepare, errthrow)
 
   _IGNORE(gda_connection_get_meta_store_data)
   #m4 _CONVERSION(`const Glib::ListHandle< Glib::RefPtr<Holder> >&',`GList*',`$3.data()')
@@ -179,6 +179,7 @@
   _WRAP_METHOD(bool perform_operation (const Glib::RefPtr<ServerOperation>& op), gda_connection_perform_operation, errthrow)
 
   _WRAP_METHOD(Glib::RefPtr<ServerProvider> get_provider(), gda_connection_get_provider)
+  _WRAP_METHOD(Glib::RefPtr<const ServerProvider> get_provider() const, gda_connection_get_provider)
    
   _WRAP_METHOD_DOCS_ONLY(gda_connection_statement_to_sql)
   #ifdef GLIBMM_EXCEPTIONS_ENABLED

Modified: libgdamm/trunk/libgda/src/connectionevent.hg
==============================================================================
--- libgdamm/trunk/libgda/src/connectionevent.hg	(original)
+++ libgdamm/trunk/libgda/src/connectionevent.hg	Mon Nov 17 09:44:42 2008
@@ -35,7 +35,7 @@
 _WRAP_ENUM(ConnectionEventCode, GdaConnectionEventCode)
 _WRAP_ENUM(ConnectionEventType, GdaConnectionEventType)
 
-/** Any event which has occurred on a GdaConnection.
+/** Any event which has occurred on a Gda::Connection.
  * Events occuring on a connection are each represented as a ConnectionEvent object. 
  * Each Connection is responsible for keeping a list of past events; that list can be consulted using the Connection::get_events() function.
  *

Modified: libgdamm/trunk/libgda/src/dataaccesswrapper.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dataaccesswrapper.hg	(original)
+++ libgdamm/trunk/libgda/src/dataaccesswrapper.hg	Mon Nov 17 09:44:42 2008
@@ -30,7 +30,7 @@
 namespace Gda
 {
 
-/** Offers a random access on top of a cursor-only access data model
+/** Offers random access on top of a cursor-only access data model.
  *
  * The Gda::DataAccessWrapper object simply wraps around another Gda::DataModel data model 
  * object and allows data to be accessed in a random way while remaining memory efficient as much as possible.

Modified: libgdamm/trunk/libgda/src/datacomparator.hg
==============================================================================
--- libgdamm/trunk/libgda/src/datacomparator.hg	(original)
+++ libgdamm/trunk/libgda/src/datacomparator.hg	Mon Nov 17 09:44:42 2008
@@ -31,11 +31,12 @@
 namespace Gda
 {
 
+//TODO: Document and/or wrap this:
 typedef GdaDiff Diff;
 	
-/** Simple data model's contents comparison
+/** Simple data model's contents comparison.
  *
- * The GdaDataComparator is a simple object which takes two GdaDataModel objects
+ * The DataComparator is a simple object which takes two DataModel objects
  * and compare them. Actual comparison is performed when the 
  * compute_diff() is called; for each difference found, the diff-computed signal
  * is emitted (any user installed signal handler which returns FALSE stops 
@@ -65,14 +66,17 @@
 public:
   _WRAP_CREATE(const Glib::RefPtr<DataModel>& old_model, const Glib::RefPtr<DataModel>& new_model)
 
-  _WRAP_METHOD(void set_key_for_columns (const Glib::ArrayHandle<int>& col_numbers, int nb_cols), gda_data_comparator_set_key_columns)
+  //TODO: The nb_cols parmetetr is unnecessary:
+  _WRAP_METHOD(void set_key_for_columns(const Glib::ArrayHandle<int>& col_numbers, int nb_cols), gda_data_comparator_set_key_columns)
+
   _WRAP_METHOD(bool compute_diff(), gda_data_comparator_compute_diff, errthrow)
-  _WRAP_METHOD(int get_n_diffs(), gda_data_comparator_get_n_diffs)
+  _WRAP_METHOD(int get_n_diffs() const, gda_data_comparator_get_n_diffs)
   _WRAP_METHOD(const Diff* get_diff(int pos), gda_data_comparator_get_diff)
 		
   _WRAP_PROPERTY("old-model", Glib::RefPtr<DataModel>)
   _WRAP_PROPERTY("new-model", Glib::RefPtr<DataModel>)
 
+//TODO: Register the type in libgda properly?
 #m4 _CONVERSION(`gpointer',`Diff*',`(Diff*)($3)')
 #m4 _CONVERSION(`Diff*',`gpointer',`(gpointer)($3)')
     _WRAP_SIGNAL(bool diff_computed(Diff* diff), "diff-computed", no_default_handler)

Modified: libgdamm/trunk/libgda/src/datamodel.hg
==============================================================================
--- libgdamm/trunk/libgda/src/datamodel.hg	(original)
+++ libgdamm/trunk/libgda/src/datamodel.hg	Mon Nov 17 09:44:42 2008
@@ -44,13 +44,10 @@
 
 typedef GdaValueAttribute ValueAttribute;
 
-typedef Glib::ListHandle<Value, ValueTraits> ValueList;
-typedef Glib::SListHandle<Value, ValueTraits> ValueSList;
-
 /** @defgroup DataModels Data Models
  */
 
-/** Abstract DataModel (Base class for all DataModels)
+/** Abstract DataModel (Base class for all DataModels).
  *
  * A DataModel represents an array of values organized in rows and columns. 
  * All the data in the same column have the same type, and all the data in each row have the same semantic meaning. 
@@ -100,7 +97,7 @@
   _WRAP_METHOD(void set_column_title(int col, const Glib::ustring& title), gda_data_model_set_column_title)
 
   _WRAP_METHOD(Value get_value_at(int col, int row) const, gda_data_model_get_value_at, errthrow);
-  _WRAP_METHOD(Value get_typed_value_at (int col, int row, GType expected_type, bool nullok) const, gda_data_model_get_typed_value_at, errthrow);
+  _WRAP_METHOD(Value get_typed_value_at(int col, int row, GType expected_type, bool nullok) const, gda_data_model_get_typed_value_at, errthrow);
   _WRAP_METHOD(ValueAttribute get_attributes_at(int col, int row), gda_data_model_get_attributes_at)
 
   _WRAP_METHOD(Glib::RefPtr<DataModelIter> create_iter(), gda_data_model_create_iter)
@@ -110,6 +107,9 @@
 
   _WRAP_METHOD(bool set_value_at(int col, int row, const Value& value), gda_data_model_set_value_at, errthrow)
 
+  typedef Glib::ListHandle<Value, ValueTraits> ValueList;
+  typedef Glib::SListHandle<Value, ValueTraits> ValueSList;
+
   #m4 _CONVERSION(`const ValueList&',`const GList*',`$3.data()')
   #m4 _CONVERSION(`const ValueList&',`GList*',`$3.data()')
   _WRAP_METHOD(bool set_values(int row, const ValueList& values), gda_data_model_set_values, errthrow)
@@ -143,8 +143,8 @@
    * @param options List of options for the export.
    * @result The string.
    */
-  _IGNORE(gda_data_model_export_to_string)
   Glib::ustring export_to_string(DataModelIOFormat format, const Glib::ArrayHandle<int>& cols, const Glib::ArrayHandle<int>& rows, const Glib::RefPtr<Set>& options);
+  _IGNORE(gda_data_model_export_to_string)
     
   /** Exports data contained in @a model to the @a file; the format is specified using the @a format argument.
    *
@@ -167,6 +167,7 @@
 #endif
   _IGNORE(gda_data_model_export_to_file)
 
+  //TODO: Avoid use of C GHashTable? 
   _WRAP_METHOD(bool import_from_model(const Glib::RefPtr<DataModel>& from,  bool overwrite, GHashTable *cols_trans), gda_data_model_import_from_model, errthrow)
   _WRAP_METHOD(bool import_from_string(const Glib::ustring& string, GHashTable *cols_trans, const Glib::RefPtr<const Set>& options), gda_data_model_import_from_string, errthrow)
   _WRAP_METHOD(bool import_from_file(const std::string& file, GHashTable *cols_trans, const Glib::RefPtr<const Set>& options), gda_data_model_import_from_file, errthrow)
@@ -181,7 +182,7 @@
 
   //These are from gda-datamodel-extra.h:
   //TODO: Are these meant to be public API?
-  //See http://bugzilla.gnome.org/show_bug.cgi?id=513543
+  //See http://bugzilla.gnome.org/show_bug.cgi?id=513543 (wrong bug number? murrayc)
   /* Let's assume not. It's safer to add them later if necessary:
   _WRAP_METHOD(void signal_emit_changed(), gda_data_model_signal_emit_changed)
   _WRAP_METHOD(void row_inserted(int row), gda_data_model_row_inserted)
@@ -189,13 +190,13 @@
   _WRAP_METHOD(void row_removed(int row), gda_data_model_row_removed)
   */
 
-  _WRAP_METHOD(void set_column_name (int col, const Glib::ustring& name), gda_data_model_set_column_name)
-  _WRAP_METHOD(Glib::ustring get_column_name (int col), gda_data_model_get_column_name)      
+  _WRAP_METHOD(void set_column_name(int col, const Glib::ustring& name), gda_data_model_set_column_name)
+  _WRAP_METHOD(Glib::ustring get_column_name(int col) const, gda_data_model_get_column_name)      
   
   // It is a bit strange that those are int GdaDataModel and not in GdaDataModelIter
-  _WRAP_METHOD(bool iter_move_next_default (const Glib::RefPtr<DataModelIter>& iter), gda_data_model_iter_move_next_default)
-  _WRAP_METHOD(bool iter_move_prev_default (const Glib::RefPtr<DataModelIter>& iter), gda_data_model_iter_move_prev_default)    
-  _WRAP_METHOD(bool iter_move_at_row_default (const Glib::RefPtr<DataModelIter>& iter, int row), gda_data_model_iter_move_at_row_default)    
+  _WRAP_METHOD(bool iter_move_next_default(const Glib::RefPtr<DataModelIter>& iter), gda_data_model_iter_move_next_default)
+  _WRAP_METHOD(bool iter_move_prev_default(const Glib::RefPtr<DataModelIter>& iter), gda_data_model_iter_move_prev_default)    
+  _WRAP_METHOD(bool iter_move_at_row_default(const Glib::RefPtr<DataModelIter>& iter, int row), gda_data_model_iter_move_at_row_default)    
     
   //These are in a private header. Ignore them:
   _IGNORE(gda_data_model_changed, gda_data_model_row_inserted, gda_data_model_row_updated, gda_data_model_row_removed, 

Modified: libgdamm/trunk/libgda/src/datamodelarray.hg
==============================================================================
--- libgdamm/trunk/libgda/src/datamodelarray.hg	(original)
+++ libgdamm/trunk/libgda/src/datamodelarray.hg	Mon Nov 17 09:44:42 2008
@@ -56,7 +56,8 @@
   _WRAP_METHOD(void set_n_columns(int cols), gda_data_model_array_set_n_columns)
   _WRAP_METHOD(void clear(), gda_data_model_array_clear)
 
-  _WRAP_METHOD(Glib::RefPtr<Row> get_row (int row), gda_data_model_array_get_row, errthrow)
+  _WRAP_METHOD(Glib::RefPtr<Row> get_row(int row), gda_data_model_array_get_row, errthrow)
+  _WRAP_METHOD(Glib::RefPtr<const Row> get_row(int row) const, gda_data_model_array_get_row, errthrow)
     
   _WRAP_PROPERTY("n-columns", guint);
 };

Modified: libgdamm/trunk/libgda/src/datamodelimport.hg
==============================================================================
--- libgdamm/trunk/libgda/src/datamodelimport.hg	(original)
+++ libgdamm/trunk/libgda/src/datamodelimport.hg	Mon Nov 17 09:44:42 2008
@@ -34,6 +34,7 @@
 
 
 /** Importing data from a string or a file.
+ *
  * This data model imports data from a string or a file. The data can either be in a CSV (comma separated values) 
  * format or in an XML format as described by the libgda-array.dtd DTD (It is also possible to import 
  * data from an already-build XML tree validated against that DTD).
@@ -71,6 +72,7 @@
   _IGNORE(gda_data_model_import_new_xml_node)
 
 public:
+  //TODO: Documentation:
   _WRAP_CREATE(const std::string& filename, bool random_access, const Glib::RefPtr<const Set>& options)
   _WRAP_CREATE(const gchar* data, bool random_access, const Glib::RefPtr<const Set>& options)
   _WRAP_CREATE(xmlNodePtr node)

Modified: libgdamm/trunk/libgda/src/datamodeliter.hg
==============================================================================
--- libgdamm/trunk/libgda/src/datamodeliter.hg	(original)
+++ libgdamm/trunk/libgda/src/datamodeliter.hg	Mon Nov 17 09:44:42 2008
@@ -34,35 +34,35 @@
 
 _WRAP_GERROR(DataModelIterError, GdaDataModelIterError, GDA_DATA_MODEL_ITER_ERROR)
 
-/** Data model iterator
-  *
-  * A Gda::DataModelIter object is used to iterate through the rows of a Gda::DataModel. 
-  * If the data model is accessible in a random access way then any number of Gda::DataModelIter 
-  * objects can be created on the same data model, and if the data model only supports a cursor 
-  * based access then only one Gda::DataModelIter can be created. In any case creating a 
-  * Gda::DataModelIter should be done using the create_iter() method. 
-  *
-  * When a Gda::DataModelIter is valid (that is when it points to an existing row in the data model it iterates through), 
-  * the individual values (corresponding to each column of the data model, at the pointer row) 
-  * can be accessed using the get_value_at() or 
-  * get_value_for_field() methods (or in the same way Gda::Set's values are 
-  * accessed as Gda::DataModelIter inherits the Gda::Set).
-  *
-  * Right after being created, a Gda::DataModelIter is invalid (does not point to any row of its data model).
-  * To read the first row of the data model, use the move_next() method. 
-  * Calling this method several times will move the iterator forward, up to when the data model has 
-  * no more rows and the Gda::DataModelIter will be declared invalid (and move_next() 
-  * has returned FALSE). Note that at this point, the number of rows in the data model will be known.
-  *
-  * If the data model supports it, a Gda::DataModelIter can be moved backwards using the 
-  * move_prev() method. However if the iterator is invalid, moving backwards will 
-  * not be possible (on the contrary to move_next() which moves to the first row).
-  *
-  * The move_at_row() method, if the iterator can be moved both forward and backwards,
-  * can move the iterator to a specific row (sometimes faster than moving it forward or backwards a number of times).
-  *
-  * @ingroup DataModels
-  */
+/** Data model iterator.
+ *
+ * A Gda::DataModelIter object is used to iterate through the rows of a Gda::DataModel. 
+ * If the data model is accessible in a random access way then any number of Gda::DataModelIter 
+ * objects can be created on the same data model, and if the data model only supports a cursor 
+ * based access then only one Gda::DataModelIter can be created. In any case creating a 
+ * Gda::DataModelIter should be done using the create_iter() method. 
+ *
+ * When a Gda::DataModelIter is valid (that is when it points to an existing row in the data model it iterates through), 
+ * the individual values (corresponding to each column of the data model, at the pointer row) 
+ * can be accessed using the get_value_at() or 
+ * get_value_for_field() methods (or in the same way Gda::Set's values are 
+ * accessed as Gda::DataModelIter inherits the Gda::Set).
+ *
+ * Right after being created, a Gda::DataModelIter is invalid (does not point to any row of its data model).
+ * To read the first row of the data model, use the move_next() method. 
+ * Calling this method several times will move the iterator forward, up to when the data model has 
+ * no more rows and the Gda::DataModelIter will be declared invalid (and move_next() 
+ * has returned FALSE). Note that at this point, the number of rows in the data model will be known.
+ *
+ * If the data model supports it, a Gda::DataModelIter can be moved backwards using the 
+ * move_prev() method. However if the iterator is invalid, moving backwards will 
+ * not be possible (on the contrary to move_next() which moves to the first row).
+ *
+ * The move_at_row() method, if the iterator can be moved both forward and backwards,
+ * can move the iterator to a specific row (sometimes faster than moving it forward or backwards a number of times).
+ *
+ * @ingroup DataModels
+ */
 class DataModelIter
  : public Set
 {
@@ -79,8 +79,8 @@
   _WRAP_METHOD(int get_row() const, gda_data_model_iter_get_row)
   _WRAP_METHOD(void invalidate_contents(), gda_data_model_iter_invalidate_contents)
 
-  _WRAP_METHOD(Value get_value_at (int col), gda_data_model_iter_get_value_at)
-  _WRAP_METHOD(Value get_value_for_field (const Glib::ustring& field_name), gda_data_model_iter_get_value_for_field)
+  _WRAP_METHOD(Value get_value_at(int col) const, gda_data_model_iter_get_value_at)
+  _WRAP_METHOD(Value get_value_for_field(const Glib::ustring& field_name) const, gda_data_model_iter_get_value_for_field)
 
   _WRAP_PROPERTY("current-row", int)
   _WRAP_PROPERTY("data-model", Glib::RefPtr<DataModel>)

Modified: libgdamm/trunk/libgda/src/dataselect.hg
==============================================================================
--- libgdamm/trunk/libgda/src/dataselect.hg	(original)
+++ libgdamm/trunk/libgda/src/dataselect.hg	Mon Nov 17 09:44:42 2008
@@ -32,7 +32,7 @@
 namespace Gda
 {
 
-/** Data models returned by the execution of a SELECT statement
+/** Data models returned by the execution of a SELECT statement.
  *
  * This data model implements the Gda::DataModel interface and is the required 
  * base object when database providers implement a data model returned when a 
@@ -63,14 +63,14 @@
   _CLASS_GOBJECT(DataSelect, GdaDataSelect, GDA_DATA_SELECT, Glib::Object, GObject)
   _IMPLEMENTS_INTERFACE(DataModel)
 public:
-  _WRAP_METHOD (bool set_row_selection_condition_sql (const Glib::ustring& sql_where), gda_data_select_set_row_selection_condition_sql, errthrow)
+  _WRAP_METHOD(bool set_row_selection_condition_sql(const Glib::ustring& sql_where), gda_data_select_set_row_selection_condition_sql, errthrow)
   // This is internal only
   _IGNORE (gda_data_select_set_row_selection_condition)
-  _WRAP_METHOD (void compute_row_selection_condition (), gda_data_select_compute_row_selection_condition, errthrow)
-  _WRAP_METHOD (void set_modification_statement (const Glib::RefPtr<Statement>& mod_stmt), gda_data_select_set_modification_statement, errthrow)
-  _WRAP_METHOD (void set_modification_statement_sql (const Glib::ustring& sql), gda_data_select_set_modification_statement_sql, errthrow)
-  _WRAP_METHOD (void compute_modification_statements (), gda_data_select_compute_modification_statements, errthrow)
-  _WRAP_METHOD (void compute_columns_attributes (), gda_data_select_compute_columns_attributes, errthrow)
+  _WRAP_METHOD(void compute_row_selection_condition(), gda_data_select_compute_row_selection_condition, errthrow)
+  _WRAP_METHOD(void set_modification_statement(const Glib::RefPtr<Statement>& mod_stmt), gda_data_select_set_modification_statement, errthrow)
+  _WRAP_METHOD(void set_modification_statement_sql(const Glib::ustring& sql), gda_data_select_set_modification_statement_sql, errthrow)
+  _WRAP_METHOD(void compute_modification_statements(), gda_data_select_compute_modification_statements, errthrow)
+  _WRAP_METHOD(void compute_columns_attributes(), gda_data_select_compute_columns_attributes, errthrow)
 
   _WRAP_PROPERTY("auto-reset", bool)
   _WRAP_PROPERTY("store-all-rows", bool)

Modified: libgdamm/trunk/libgda/src/error.hg
==============================================================================
--- libgdamm/trunk/libgda/src/error.hg	(original)
+++ libgdamm/trunk/libgda/src/error.hg	Mon Nov 17 09:44:42 2008
@@ -30,7 +30,7 @@
 namespace Gda
 {
 	
-/** This objects is the boxed type of a Glib::Error
+/** This objects is the boxed type of a Glib::Error.
  *
  * This is used to pass Glib::Error savely through signals. You can use
  * the gerror() method to access the underlying Glib::Error.
@@ -41,8 +41,11 @@
 {
   _CLASS_BOXEDTYPE(Error, GError, NONE, g_error_copy, g_error_free)
   
-  public:
-		inline Glib::Error gerror() {return Glib::Error(gobj(), false);};
+public:
+  inline Glib::Error gerror()
+  {
+    return Glib::Error(gobj(), false);
+  };
 };
 
 } // namespace Gda

Modified: libgdamm/trunk/libgda/src/holder.hg
==============================================================================
--- libgdamm/trunk/libgda/src/holder.hg	(original)
+++ libgdamm/trunk/libgda/src/holder.hg	Mon Nov 17 09:44:42 2008
@@ -34,7 +34,7 @@
 
 class DataModel;
 
-/** Container for a single Gda::Value
+/** Container for a single Gda::Value.
  *
  * The GdaHolder is a container for a single Gda::Value value. It also specifies 
  * various attributes of the contained value (default value, ...)
@@ -52,29 +52,31 @@
   
   _WRAP_METHOD(GType get_g_type() const, gda_holder_get_g_type)
   _WRAP_METHOD(Glib::ustring get_id() const, gda_holder_get_id)
-  _WRAP_METHOD(Value get_value(), gda_holder_get_value)
+  _WRAP_METHOD(Value get_value() const, gda_holder_get_value)
   _WRAP_METHOD(Glib::ustring get_value_str(const Glib::RefPtr<DataHandler>& dh), gda_holder_get_value_str)
   _WRAP_METHOD(bool set_value(const Value& value), gda_holder_set_value, errthrow)
-  _WRAP_METHOD(bool set_value_str (const Glib::RefPtr<DataHandler>& dh, const Glib::ustring& value), gda_holder_set_value_str, errthrow)
-  _WRAP_METHOD(bool take_value (Value value), gda_holder_take_value, errthrow)
+  _WRAP_METHOD(bool set_value_str(const Glib::RefPtr<DataHandler>& dh, const Glib::ustring& value), gda_holder_set_value_str, errthrow)
+  _WRAP_METHOD(bool take_value(const Value& value), gda_holder_take_value, errthrow)
   _WRAP_METHOD(Value take_static_value (const Value& value, bool& value_changed), gda_holder_take_static_value, errthrow)
-  _WRAP_METHOD(void set_attribute (const Glib::ustring& attribute, const Value& value), gda_holder_set_attribute);
+  _WRAP_METHOD(void set_attribute(const Glib::ustring& attribute, const Value& value), gda_holder_set_attribute);
   _WRAP_METHOD(Value get_attribute(const Glib::ustring& attribute) const, gda_holder_get_attribute); 
   
-  _WRAP_METHOD(Value get_default_value(), gda_holder_get_default_value)
+  _WRAP_METHOD(Value get_default_value() const, gda_holder_get_default_value)
   _WRAP_METHOD(void set_default_value(const Value& value), gda_holder_set_default_value)
   _WRAP_METHOD(bool set_value_to_default(), gda_holder_set_value_to_default)
-  _WRAP_METHOD(bool value_is_default(), gda_holder_value_is_default)
+  _WRAP_METHOD(bool value_is_default() const, gda_holder_value_is_default)
 
   _WRAP_METHOD(void force_invalid(), gda_holder_force_invalid)
-  _WRAP_METHOD(bool is_valid(), gda_holder_is_valid)
-  _WRAP_METHOD(void set_not_null(bool not_null), gda_holder_set_not_null)
-  _WRAP_METHOD(bool get_not_null(), gda_holder_get_not_null)
+  _WRAP_METHOD(bool is_valid() const, gda_holder_is_valid)
+  _WRAP_METHOD(void set_not_null(bool not_null = true), gda_holder_set_not_null)
+  _WRAP_METHOD(bool get_not_null() const, gda_holder_get_not_null)
 
-  _WRAP_METHOD(Glib::RefPtr<DataModel> get_source_model (int& col) const, gda_holder_get_source_model)
-  _WRAP_METHOD(bool set_source_model (const Glib::RefPtr<DataModel>& model, int col), gda_holder_set_source_model, errthrow)
+  _WRAP_METHOD(Glib::RefPtr<DataModel> get_source_model(int& col), gda_holder_get_source_model)
+  _WRAP_METHOD(Glib::RefPtr<const DataModel> get_source_model(int& col) const, gda_holder_get_source_model)
 
-  _WRAP_METHOD(void set_bind (const Glib::RefPtr<Holder>& bind_to), gda_holder_set_bind, errthrow)
+  _WRAP_METHOD(bool set_source_model(const Glib::RefPtr<DataModel>& model, int col), gda_holder_set_source_model, errthrow)
+
+  _WRAP_METHOD(void set_bind(const Glib::RefPtr<Holder>& bind_to), gda_holder_set_bind, errthrow)
   _WRAP_METHOD(Glib::RefPtr<Holder> get_bind(), gda_holder_get_bind)
 
   _WRAP_PROPERTY("description", Glib::ustring)

Modified: libgdamm/trunk/libgda/src/metastore.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/metastore.ccg	(original)
+++ libgdamm/trunk/libgda/src/metastore.ccg	Mon Nov 17 09:44:42 2008
@@ -27,9 +27,9 @@
 namespace Gda
 {
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-bool MetaStore::get_atrribute_value(const Glib::ustring& att_name, Glib::ustring& att_value)
+bool MetaStore::get_attribute_value(const Glib::ustring& att_name, Glib::ustring& att_value)
 #else
-bool MetaStore::get_atrribute_value(const Glib::ustring& att_name, Glib::ustring& att_value, std::auto_ptr<Glib::Error>)
+bool MetaStore::get_attribute_value(const Glib::ustring& att_name, Glib::ustring& att_value, std::auto_ptr<Glib::Error>)
 #endif
 {
   GError* gerror = 0;

Modified: libgdamm/trunk/libgda/src/metastore.hg
==============================================================================
--- libgdamm/trunk/libgda/src/metastore.hg	(original)
+++ libgdamm/trunk/libgda/src/metastore.hg	Mon Nov 17 09:44:42 2008
@@ -31,7 +31,7 @@
 namespace Gda
 {
 
-/** Dictionary object
+/** Dictionary object.
  *
  * Previous versions of Libgda relied on an XML based file to store dictionary 
  * information, such as the database's schema (tables, views, etc) and various 
@@ -59,7 +59,7 @@
 public:
   _WRAP_CREATE(const Glib::ustring& cnc_string)
   
-  _WRAP_METHOD(int get_version(), gda_meta_store_get_version)
+  _WRAP_METHOD(int get_version() const, gda_meta_store_get_version)
   //TODO: varargs: extract(), modify()
   
   _IGNORE (gda_meta_store_modify_with_context)
@@ -71,15 +71,17 @@
 
   _WRAP_METHOD_DOCS_ONLY(gda_meta_store_get_attribute_value)
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-   bool get_atrribute_value(const Glib::ustring& att_name, Glib::ustring& att_value);
+   bool get_attribute_value(const Glib::ustring& att_name, Glib::ustring& att_value);
 #else
-   bool get_atrribute_value(const Glib::ustring& att_name, Glib::ustring& att_value, std::auto_ptr<Glib::Error>);
+   bool get_attribute_value(const Glib::ustring& att_name, Glib::ustring& att_value, std::auto_ptr<Glib::Error>);
 #endif
 
   _WRAP_METHOD(bool set_attribute_value(const Glib::ustring& att_name, const Glib::ustring& att_value), gda_meta_store_set_attribute_value, errthrow)
   _WRAP_METHOD(bool schema_add_custom_object(const Glib::ustring& xml_description), gda_meta_store_schema_add_custom_object, errthrow)
   _WRAP_METHOD(bool schema_remove_custom_object(const Glib::ustring& obj_name), gda_meta_store_schema_remove_custom_object, errthrow)
+
   _WRAP_METHOD(Glib::RefPtr<Connection> get_internal_connection(), gda_meta_store_get_internal_connection)
+  _WRAP_METHOD(Glib::RefPtr<const Connection> get_internal_connection() const, gda_meta_store_get_internal_connection)
 
   // The rest of the properties is Write / Construct Only
   _WRAP_PROPERTY("cnc", Glib::RefPtr<Connection>)  

Modified: libgdamm/trunk/libgda/src/metastruct.hg
==============================================================================
--- libgdamm/trunk/libgda/src/metastruct.hg	(original)
+++ libgdamm/trunk/libgda/src/metastruct.hg	Mon Nov 17 09:44:42 2008
@@ -37,12 +37,13 @@
 
 class MetaStore;
 
-/** In memory representation of some database objects
+/** In memory representation of some database objects.
  *
  * The Gda::MetaStruct object reads data from a Gda::MetaStore object and creates 
  * an easy to use in memory representation for some database objects. For example
  * one can easily analyse the columns of a table (or its foreign keys) using a 
  * Gda::MetaStruct.
+ *
  * When created, the new Gda::MetaStruct object is empty (it does not have any 
  * information about any database object). Information about database objects is 
  * computed upon request using the gda_meta_struct_complement() method. Information 
@@ -65,13 +66,16 @@
 public:
   _WRAP_CREATE(const Glib::RefPtr<MetaStore>& store, MetaStructFeature features)
   
-  _WRAP_METHOD(GdaMetaDbObject* complement (MetaDbObjectType type, const Glib::ValueBase& catalog, const Glib::ValueBase& schema, const Glib::ValueBase& name), gda_meta_struct_complement, errthrow)
-  _WRAP_METHOD(bool complement_schema (const Glib::ValueBase& catalog, const Glib::ValueBase& schema), gda_meta_struct_complement_schema, errthrow)
-  _WRAP_METHOD(bool complement_default (), gda_meta_struct_complement_default, errthrow)
+  //TODO: Wrap GdaMetaDbObject?
+  _WRAP_METHOD(GdaMetaDbObject* complement(MetaDbObjectType type, const Glib::ValueBase& catalog, const Glib::ValueBase& schema, const Glib::ValueBase& name), gda_meta_struct_complement, errthrow)
+  _WRAP_METHOD(bool complement_schema(const Glib::ValueBase& catalog, const Glib::ValueBase& schema), gda_meta_struct_complement_schema, errthrow)
+  _WRAP_METHOD(bool complement_default(), gda_meta_struct_complement_default, errthrow)
   _IGNORE(gda_meta_struct_complement_depend) // private API   
 
-  _WRAP_METHOD(bool sort_db_object (MetaSortType sort_type), gda_meta_struct_sort_db_objects, errthrow)
+  _WRAP_METHOD(bool sort_db_object(MetaSortType sort_type), gda_meta_struct_sort_db_objects, errthrow)
     _WRAP_METHOD(GdaMetaDbObject* get_db_object(const Glib::ValueBase& catalog, const Glib::ValueBase& schema, const Glib::ValueBase& name), gda_meta_struct_get_db_object)
+
+  //TODO: Wrap GdaMetaDbObject??
   _WRAP_METHOD(GdaMetaTableColumn* get_table_column(GdaMetaTable* table, const Glib::ValueBase& col_name), gda_meta_struct_get_table_column)
   _WRAP_METHOD(Glib::ustring dump_as_graph(MetaGraphInfo info), gda_meta_struct_dump_as_graph, errthrow)
   

Modified: libgdamm/trunk/libgda/src/quarklist.hg
==============================================================================
--- libgdamm/trunk/libgda/src/quarklist.hg	(original)
+++ libgdamm/trunk/libgda/src/quarklist.hg	Mon Nov 17 09:44:42 2008
@@ -30,12 +30,13 @@
 namespace Gda
 {
 
-/** Quark lists (lists of KEY=VALUE's)
-  *
-  * Parameter lists are used primary in the parsing and creation of connection strings.
-  *
-  * @ingroup DataHandlers
-  */
+//TODO: Documentation: See http://bugzilla.gnome.org/show_bug.cgi?id=561173
+/** Quark lists (lists of KEY=VALUE's).
+ *
+ * Parameter lists are used primarily in the parsing and creation of connection strings.
+ *
+ * @ingroup DataHandlers
+ */
 class QuarkList
 {
   _CLASS_BOXEDTYPE(QuarkList, GdaQuarkList, gda_quark_list_new, gda_quark_list_copy, gda_quark_list_free)
@@ -44,9 +45,9 @@
   public:
     
   _WRAP_METHOD(void clear(), gda_quark_list_clear)
-  _WRAP_METHOD(void add_from_string (const Glib::ustring& name, bool cleanup), gda_quark_list_add_from_string)
-  _WRAP_METHOD(Glib::ustring find(const Glib::ustring& name), gda_quark_list_find)
-  _WRAP_METHOD(void remove (const Glib::ustring& name), gda_quark_list_remove)
+  _WRAP_METHOD(void add_from_string(const Glib::ustring& name, bool cleanup), gda_quark_list_add_from_string)
+  _WRAP_METHOD(Glib::ustring find(const Glib::ustring& name) const, gda_quark_list_find)
+  _WRAP_METHOD(void remove(const Glib::ustring& name), gda_quark_list_remove)
    
   /** For instance, 
    * void on_foreach(Gtk::Widget* widget);

Modified: libgdamm/trunk/libgda/src/row.hg
==============================================================================
--- libgdamm/trunk/libgda/src/row.hg	(original)
+++ libgdamm/trunk/libgda/src/row.hg	Mon Nov 17 09:44:42 2008
@@ -31,7 +31,7 @@
 namespace Gda
 {
 
-/** Row for a Gda::DataModelArray object
+/** Row for a Gda::DataModelArray object.
  *
  * The GdaDataModelArray object uses GdaRow to store each row of data. 
  * Each GdaRow has the same number of GValue values (equal to the number of 

Modified: libgdamm/trunk/libgda/src/serveroperation.hg
==============================================================================
--- libgdamm/trunk/libgda/src/serveroperation.hg	(original)
+++ libgdamm/trunk/libgda/src/serveroperation.hg	Mon Nov 17 09:44:42 2008
@@ -69,23 +69,25 @@
 #endif // GLIBMM_EXCEPTIONS_ENABLED
 
   _WRAP_METHOD(ServerOperationNodeType get_node_type(const Glib::ustring& path, ServerOperationNodeStatus& status) const, gda_server_operation_get_node_type)
-  _WRAP_METHOD(guint get_sequence_size(const Glib::ustring& path), gda_server_operation_get_sequence_size);
-  _WRAP_METHOD(guint get_sequence_max_size(const Glib::ustring& path), gda_server_operation_get_sequence_max_size);
-  _WRAP_METHOD(guint get_sequence_min_size(const Glib::ustring& path), gda_server_operation_get_sequence_min_size);
-  _WRAP_METHOD(Glib::StringArrayHandle get_sequence_item_names(const Glib::ustring& path), gda_server_operation_get_sequence_item_names);
-  _WRAP_METHOD(Glib::ustring get_sequence_name(const std::string& path), gda_server_operation_get_sequence_name);
+  _WRAP_METHOD(guint get_sequence_size(const Glib::ustring& path) const, gda_server_operation_get_sequence_size);
+  _WRAP_METHOD(guint get_sequence_max_size(const Glib::ustring& path) const, gda_server_operation_get_sequence_max_size);
+  _WRAP_METHOD(guint get_sequence_min_size(const Glib::ustring& path) const, gda_server_operation_get_sequence_min_size);
+  _WRAP_METHOD(Glib::StringArrayHandle get_sequence_item_names(const Glib::ustring& path) const, gda_server_operation_get_sequence_item_names);
+  _WRAP_METHOD(Glib::ustring get_sequence_name(const std::string& path) const, gda_server_operation_get_sequence_name);
+
+  //TODO: Is this XML stuff really public API? murrayc.
 
   //TODO: get_node_info => varargs
-  _WRAP_METHOD(bool is_valid(const std::string& xml_file), gda_server_operation_is_valid, errthrow)
-  _WRAP_METHOD(bool load_data_from_xml (xmlNodePtr node), gda_server_operation_load_data_from_xml, errthrow)
+  _WRAP_METHOD(bool is_valid(const std::string& xml_file) const, gda_server_operation_is_valid, errthrow)
+  _WRAP_METHOD(bool load_data_from_xml(xmlNodePtr node), gda_server_operation_load_data_from_xml, errthrow)
   _WRAP_METHOD(xmlNodePtr save_data_to_xml(), gda_server_operation_save_data_to_xml, errthrow)  
-  _WRAP_METHOD(Glib::ustring get_node_path_portion(const Glib::ustring& path), gda_server_operation_get_node_path_portion)
-  _WRAP_METHOD(Glib::ustring get_node_parent(const Glib::ustring& path), gda_server_operation_get_node_parent)
-  _WRAP_METHOD(ServerOperationType get_op_type(), gda_server_operation_get_op_type)
+  _WRAP_METHOD(Glib::ustring get_node_path_portion(const Glib::ustring& path) const, gda_server_operation_get_node_path_portion)
+  _WRAP_METHOD(Glib::ustring get_node_parent(const Glib::ustring& path) const, gda_server_operation_get_node_parent)
+  _WRAP_METHOD(ServerOperationType get_op_type() const, gda_server_operation_get_op_type)
   
   _WRAP_METHOD(bool del_item_from_sequence(const std::string& item_path), gda_server_operation_del_item_from_sequence)
   _WRAP_METHOD(guint add_item_to_sequence(const std::string& item_path), gda_server_operation_add_item_to_sequence)
-  _WRAP_METHOD(Glib::StringArrayHandle get_root_nodes(), gda_server_operation_get_root_nodes);
+  _WRAP_METHOD(Glib::StringArrayHandle get_root_nodes() const, gda_server_operation_get_root_nodes);
 
   _WRAP_SIGNAL(void signal_sequence_item_added(Glib::ustring arg1, int arg2), "sequence-item-added", no_default_handler)
   _WRAP_SIGNAL(void signal_sequence_item_remove(Glib::ustring arg1, int arg2), "sequence-item-remove", no_default_handler)

Modified: libgdamm/trunk/libgda/src/serverprovider.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/serverprovider.ccg	(original)
+++ libgdamm/trunk/libgda/src/serverprovider.ccg	Mon Nov 17 09:44:42 2008
@@ -34,22 +34,25 @@
 Glib::ValueBase ServerProvider::string_to_value(const Glib::RefPtr<Connection>& cnc, 
                                                 const Glib::ustring& string, 
                                                 GType prefered_type, 
-                                                Glib::ustring& dbms_type)
+                                                Glib::ustring& dbms_type) const
 {
   Glib::ValueBase retval;
   gchar* dmbs_type_c = NULL;
-  GValue* value = gda_server_provider_string_to_value(gobj(),
+  GValue* value = gda_server_provider_string_to_value(const_cast<GdaServerProvider*>(gobj()),
                                                       cnc->gobj(),
                                                       string.c_str(),
                                                       prefered_type,
                                                       &dmbs_type_c);
   retval.init(value);
   g_free(value);
-  if (dmbs_type_c)
+  value = NULL;
+
+  if(dmbs_type_c)
   {
     dbms_type = dmbs_type_c;
     g_free(dmbs_type_c);
   }
+
   return retval;
 }
 

Modified: libgdamm/trunk/libgda/src/serverprovider.hg
==============================================================================
--- libgdamm/trunk/libgda/src/serverprovider.hg	(original)
+++ libgdamm/trunk/libgda/src/serverprovider.hg	Mon Nov 17 09:44:42 2008
@@ -40,9 +40,9 @@
 /* TODO: Is this appropriate. Investigate how it is used. */
 typedef GdaServerProviderInfo ServerProviderInfo;
 
-/** Base class for all the DBMS providers
+/** Base class for all the DBMS providers.
   *
-  * The GdaServerProvider class is a virtual class which all the DBMS providers
+  * The ServerProvider class is an abstract class which all the DBMS providers
   * must inherit, and implement its virtual mathods.
   *
   * @ingroup Connections
@@ -59,7 +59,7 @@
   //TODO: options may be NULL: Add a method overload.
   _WRAP_METHOD(bool supports_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type, const Glib::RefPtr<Set>& options) const, gda_server_provider_supports_operation)
 
-  _WRAP_METHOD(Glib::RefPtr<ServerOperation> create_operation (const Glib::RefPtr<Connection>& cnc,ServerOperationType type, const Glib::RefPtr<Set>& options), gda_server_provider_create_operation, errthrow)
+  _WRAP_METHOD(Glib::RefPtr<ServerOperation> create_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type, const Glib::RefPtr<Set>& options), gda_server_provider_create_operation, errthrow)
   _WRAP_METHOD(Glib::ustring render_operation(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<ServerOperation>& op), gda_server_provider_render_operation, errthrow)
   _WRAP_METHOD(bool perform_operation(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<ServerOperation>& op), gda_server_provider_perform_operation, errthrow)
 
@@ -68,8 +68,8 @@
 
   _WRAP_METHOD(Glib::ustring value_to_sql_string(const Glib::RefPtr<Connection>& cnc, const Glib::ValueBase& from) const, gda_server_provider_value_to_sql_string)
 
-  _WRAP_METHOD(Glib::ustring escape_string(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& str), gda_server_provider_escape_string)
-  _WRAP_METHOD(Glib::ustring unescape_string(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& str), gda_server_provider_unescape_string)
+  _WRAP_METHOD(Glib::ustring escape_string(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& str) const, gda_server_provider_escape_string)
+  _WRAP_METHOD(Glib::ustring unescape_string(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& str) const, gda_server_provider_unescape_string)
 
   _WRAP_METHOD(Glib::RefPtr<DataHandler> get_data_handler_dbms(const Glib::RefPtr<Connection>& cnc,  const Glib::ustring& for_type), gda_server_provider_get_data_handler_dbms, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const DataHandler> get_data_handler_dbms(const Glib::RefPtr<Connection>& cnc,  const Glib::ustring& for_type) const, gda_server_provider_get_data_handler_dbms, constversion)
@@ -77,17 +77,22 @@
   _WRAP_METHOD(Glib::RefPtr<DataHandler> get_data_handler_g_type(const Glib::RefPtr<Connection>& cnc, GType for_type), gda_server_provider_get_data_handler_g_type, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const DataHandler> get_data_handler_gtype(const Glib::RefPtr<Connection>& cnc, GType for_type) const, gda_server_provider_get_data_handler_gtype, refreturn, constversion)
 
-  _WRAP_METHOD(Glib::ustring get_default_dbms_type(const Glib::RefPtr<Connection>& cnc, GType type), gda_server_provider_get_default_dbms_type)
+  _WRAP_METHOD(Glib::ustring get_default_dbms_type(const Glib::RefPtr<Connection>& cnc, GType type) const, gda_server_provider_get_default_dbms_type)
 
-  _WRAP_METHOD(Glib::ustring get_name(), gda_server_provider_get_name)
+  _WRAP_METHOD(Glib::ustring get_name() const, gda_server_provider_get_name)
   _WRAP_METHOD(Glib::RefPtr<SqlParser> create_parser(const Glib::RefPtr<Connection>& cnc), gda_server_provider_create_parser)
   
   _WRAP_METHOD_DOCS_ONLY(gda_server_provider_string_to_value)
-  Glib::ValueBase string_to_value(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& string, GType prefered_type, Glib::ustring& dbms_type);
+
+  //TODO: ValueBase can't be used as a return type.
+  Glib::ValueBase string_to_value(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& string, GType prefered_type, Glib::ustring& dbms_type) const;
 
   _WRAP_METHOD(Glib::RefPtr<DataHandler> get_data_handler_default(const Glib::RefPtr<Connection>& cnc, GType type, const Glib::ustring& dbms_type), gda_server_provider_get_data_handler_default)
-  _WRAP_METHOD(std::string find_file (const std::string& inst_dir, const std::string& filename), gda_server_provider_find_file)
-  _WRAP_METHOD(bool provide_operation_default (const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<ServerOperation>& op), gda_server_provider_perform_operation_default, errthrow)
+
+  //TODO: Should this be const?
+  _WRAP_METHOD(std::string find_file(const std::string& inst_dir, const std::string& filename), gda_server_provider_find_file)
+
+  _WRAP_METHOD(bool perform_operation_default(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<ServerOperation>& op), gda_server_provider_perform_operation_default, errthrow)
     
   // These are in a private header, so ignore them
   _IGNORE(gda_server_provider_handler_declare, gda_server_provider_handler_find, 

Modified: libgdamm/trunk/libgda/src/set.hg
==============================================================================
--- libgdamm/trunk/libgda/src/set.hg	(original)
+++ libgdamm/trunk/libgda/src/set.hg	Mon Nov 17 09:44:42 2008
@@ -33,13 +33,13 @@
 namespace Gda
 {
 
-typedef Glib::SListHandle<Holder> HolderSList;
 
-/** Container for several values
+/** Container for several values.
  *
  * The Gda::Set object is a container for several values (as Gda::Holder objects), 
  * which also offers different classifications of the group of GdaHolder values 
  * (see get_node(), get_source() or get_group()).
+ *
  * It is possible to control the values a Gda::Holder can have in the Gda::Set by 
  * connecting to the signal_before_holder_change() signal.
  * 
@@ -49,6 +49,8 @@
 {
   _CLASS_GOBJECT(Set, GdaSet, GDA_SET, Glib::Object, GObject)
 protected:
+  typedef Glib::SListHandle<Holder> HolderSList;
+
   #m4 _CONVERSION(`const HolderSList&', `GSList*', `$3.data()')
   _WRAP_CTOR(Set(const HolderSList& holders), gda_set_new)
 
@@ -57,15 +59,18 @@
   
   _WRAP_METHOD(Glib::RefPtr<Set> copy(), gda_set_copy)
 
-  _WRAP_METHOD (Value get_holder_value(const Glib::ustring& holder_id), gda_set_get_holder_value);
+  _WRAP_METHOD(Value get_holder_value(const Glib::ustring& holder_id) const, gda_set_get_holder_value);
+
   _WRAP_METHOD_DOCS_ONLY(gda_set_set_holder_value)
   template<class T> bool set_holder_value(const Glib::ustring& holder_id, T value);
   
-  _WRAP_METHOD(Glib::RefPtr<Holder> get_holder (const Glib::ustring& holder_id), gda_set_get_holder)
-  _WRAP_METHOD(void add_holder (const Glib::RefPtr<Holder>& holder), gda_set_add_holder)
-  _WRAP_METHOD(void remove_holder (const Glib::RefPtr<Holder>& holder), gda_set_remove_holder)
+  _WRAP_METHOD(Glib::RefPtr<Holder> get_holder(const Glib::ustring& holder_id), gda_set_get_holder)
+  _WRAP_METHOD(Glib::RefPtr<const Holder> get_holder(const Glib::ustring& holder_id) const, gda_set_get_holder)
 
-  _WRAP_METHOD(void merge_with_set (const Glib::RefPtr<Set>& set_to_merge), gda_set_merge_with_set)
+  _WRAP_METHOD(void add_holder(const Glib::RefPtr<Holder>& holder), gda_set_add_holder)
+  _WRAP_METHOD(void remove_holder(const Glib::RefPtr<Holder>& holder), gda_set_remove_holder)
+
+  _WRAP_METHOD(void merge_with_set(const Glib::RefPtr<Set>& set_to_merge), gda_set_merge_with_set)
   
   _WRAP_METHOD(bool is_valid() const, gda_set_is_valid, errthrow)
   
@@ -77,11 +82,15 @@
   _WRAP_METHOD(SetGroup* get_group (const Glib::RefPtr<Holder>& holder), gda_set_get_group)
   _WRAP_METHOD(SetNode* get_node (const Glib::RefPtr<Holder>& holder), gda_set_get_node)
 */		
-  _WRAP_SIGNAL(void holder_changed (const Glib::RefPtr<Holder>& holder), "holder-changed")
-  _WRAP_SIGNAL(void public_data_changed (), "public-data-changed")
+
+//The m4 conversion is here because it is only for signals:
+#m4 _CONVERSION(`GdaHolder*',`const Glib::RefPtr<Holder>&',`Glib::wrap($3, true /* take_copy */)')
+
+  _WRAP_SIGNAL(void holder_changed(const Glib::RefPtr<Holder>& holder), "holder-changed")
+  _WRAP_SIGNAL(void public_data_changed(), "public-data-changed")
   _WRAP_SIGNAL(Error validate_set(), "validate-set", no_default_handler)
   _WRAP_SIGNAL(Error validate_holder_change(const Glib::RefPtr<Holder>& holder, Value value), "validate-holder-change", no_default_handler)
-  _WRAP_SIGNAL(void holder_attr_changed (const Glib::RefPtr<Holder>& holder, Glib::ustring attr_name, Value value), "holder-attr-changed", no_default_handler)
+  _WRAP_SIGNAL(void holder_attr_changed(const Glib::RefPtr<Holder>& holder, Glib::ustring attr_name, Value value), "holder-attr-changed", no_default_handler)
      
   _WRAP_PROPERTY("description", Glib::ustring)
   _WRAP_PROPERTY("id", Glib::ustring)

Modified: libgdamm/trunk/libgda/src/sqlparser.hg
==============================================================================
--- libgdamm/trunk/libgda/src/sqlparser.hg	(original)
+++ libgdamm/trunk/libgda/src/sqlparser.hg	Mon Nov 17 09:44:42 2008
@@ -33,11 +33,12 @@
 
 _WRAP_ENUM(SqlParserMode, GdaSqlParserMode)
 
-// This is a hack to avoid a stupid gcc warning for a correctly escaped comment
+// This is a hack to avoid a stupid gcc warning for a correctly escaped comment.
 #if defined __GNUC__
 #pragma GCC system_header
 #endif
-/** SQL parser
+
+/** SQL parser.
  *
  * The Gda::SqlParser is an object dedicated to creating Gda::Statement and 
  * Gda::Batch objects from SQL strings. The actual contents of the parsed 
@@ -98,22 +99,21 @@
 public:
   _WRAP_CREATE()
   
+  //TODO: Should these be const?
   _WRAP_METHOD_DOCS_ONLY(gda_sql_parser_parse_string)
   Glib::RefPtr<Statement> parse_string(const Glib::ustring& sql, Glib::ustring& remain);
+
   _WRAP_METHOD_DOCS_ONLY(gda_sql_parser_parse_string_as_batch)
   Glib::RefPtr<Batch> parse_string_as_batch(const Glib::ustring& sql, Glib::ustring& remain);
 
   _WRAP_METHOD(Glib::RefPtr<Batch> parse_file_as_batch(const std::string& filename), gda_sql_parser_parse_file_as_batch, errthrow)
 
   _IGNORE(gda_sql_parser_set_overflow_error, gda_sql_parser_set_syntax_error)
-
-  //TODO:
-#if 0  
-  _WPAP_PROPERTY("column-error", int)
-  _WPAP_PROPERTY("line-error", int)
-  _WPAP_PROPERTY("mode", int)
-  _WPAP_PROPERTY("tokenizer-flavour", int)
-#endif
+ 
+  _WRAP_PROPERTY("column-error", int)
+  _WRAP_PROPERTY("line-error", int)
+  _WRAP_PROPERTY("mode", int)
+  _WRAP_PROPERTY("tokenizer-flavour", int)
 
 };
 

Modified: libgdamm/trunk/libgda/src/statement.hg
==============================================================================
--- libgdamm/trunk/libgda/src/statement.hg	(original)
+++ libgdamm/trunk/libgda/src/statement.hg	Mon Nov 17 09:44:42 2008
@@ -38,10 +38,10 @@
 _WRAP_ENUM (StatementModelUsage, GdaStatementModelUsage)
 _WRAP_ENUM (StatementSqlFlag, GdaStatementSqlFlag)
 
-/** Single SQL statement
+/** Single SQL statement.
  *
- *  The Gda::Statement represents a single SQL statement (multiple statements 
- * can be groupped in a GdaBatch object).
+ * The Gda::Statement represents a single SQL statement (multiple statements 
+ * can be grouped in a Batch object).
  *
  * A Gda::Statement can either be built "manually" by building a Gda::SqlStatement
  * structure, or from an SQL statement using a Gda::SqlParser object.
@@ -67,10 +67,11 @@
 
 public:
   _WRAP_CREATE()
-  _WRAP_METHOD(Glib::RefPtr<Statement> copy(), gda_statement_copy)
+  _WRAP_METHOD(Glib::RefPtr<Statement> copy() const, gda_statement_copy)
   
-  _WRAP_METHOD(Glib::ustring serialize(), gda_statement_serialize)
+  _WRAP_METHOD(Glib::ustring serialize() const, gda_statement_serialize)
   
+  //TODO: Should this be const?
   _WRAP_METHOD_DOCS_ONLY(gda_statement_get_parameters)
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   bool get_parameters(Glib::RefPtr<Set>& out_params);
@@ -79,14 +80,16 @@
   #endif //GLIBMM_EXCEPTIONS_ENABLED
   
 
-  _IGNORE(gda_statement_to_sql_real)
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   Glib::ustring to_sql(const Glib::RefPtr<Set>& params);
   #else
   Glib::ustring to_sql(const Glib::RefPtr<Set>& params, std::auto_ptr<Glib::Error>& error);
   #endif //GLIBMM_EXCEPTIONS_ENABLED
+  _IGNORE(gda_statement_to_sql_real)
 
   typedef Glib::ListHandle< const Glib::RefPtr<Holder> > HolderSList;
+
+  //TODO: Should this be const?
   _WRAP_METHOD_DOCS_ONLY(gda_statement_to_sql_extended)  
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   Glib::ustring to_sql_extended(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<Set>& params, 
@@ -97,14 +100,18 @@
                                 std::auto_ptr<Glib::Error>& error);
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-	_WRAP_METHOD(SqlStatementType get_statement_type(), gda_statement_get_statement_type)
+  _WRAP_METHOD(SqlStatementType get_statement_type() const, gda_statement_get_statement_type)
   _WRAP_METHOD(bool is_useless() const, gda_statement_is_useless)
   _WRAP_METHOD(bool check_structure() const, gda_statement_check_structure, errthrow)
   _WRAP_METHOD(bool check_validity(const Glib::RefPtr<Connection>& cnc) const, gda_statement_check_validity, errthrow)
   _WRAP_METHOD(bool normalize(const Glib::RefPtr<Connection>& cnc), gda_statement_normalize, errthrow)
   
+  //TODO: Use a real GType in libgda?
   _WRAP_PROPERTY("structure", gpointer)
 
+  //The m4 conversion is here because it is only for signals:
+#m4 _CONVERSION(`GdaConnection*',`const Glib::RefPtr<Connection>&',`Glib::wrap($3, true)')
+
   _WRAP_SIGNAL(void checked(const Glib::RefPtr<Connection>& cnc, bool valid), "checked")
   _WRAP_SIGNAL(void reset(), "reset")
 };

Modified: libgdamm/trunk/libgda/src/threader.hg
==============================================================================
--- libgdamm/trunk/libgda/src/threader.hg	(original)
+++ libgdamm/trunk/libgda/src/threader.hg	Mon Nov 17 09:44:42 2008
@@ -32,7 +32,7 @@
 
 typedef GdaThreaderFunc ThreaderFunc;
 
-/** FIXME
+/** TODO. See http://bugzilla.gnome.org/show_bug.cgi?id=561175
  *
  * @ingroup Connection
  */
@@ -46,10 +46,10 @@
   _WRAP_CREATE()
   
   _WRAP_METHOD(guint start_thread(GThreadFunc func, gpointer func_arg, ThreaderFunc ok_callback, ThreaderFunc cancel_callback), gda_threader_start_thread, errthrow)
-  _WRAP_METHOD(void cancel (guint job_id), gda_threader_cancel)
+  _WRAP_METHOD(void cancel(guint job_id), gda_threader_cancel)
   
-  _WRAP_SIGNAL(void cancelled (guint arg1, gpointer arg2), "cancelled")
-  _WRAP_SIGNAL(void finished (guint arg1, gpointer arg2), "finished")
+  _WRAP_SIGNAL(void cancelled(guint arg1, gpointer arg2), "cancelled")
+  _WRAP_SIGNAL(void finished(guint arg1, gpointer arg2), "finished")
 
 };
 

Modified: libgdamm/trunk/libgda/src/xatransaction.hg
==============================================================================
--- libgdamm/trunk/libgda/src/xatransaction.hg	(original)
+++ libgdamm/trunk/libgda/src/xatransaction.hg	Mon Nov 17 09:44:42 2008
@@ -30,11 +30,11 @@
 namespace Gda
 {
 
-/** Distributed transaction manager
+//TODO: Convert the full C documentation to here.
+/** Distributed transaction manager.
   *
   * @ingroup Connections
   */
-  
 class XaTransaction : public Glib::Object
 {
   _CLASS_GOBJECT(XaTransaction, GdaXaTransaction, GDA_XA_TRANSACTION, Glib::Object, GObject)
@@ -43,13 +43,15 @@
 public:
   _WRAP_CREATE(guint32 format_id, const Glib::ustring& transaction_id)
   
-  _WRAP_METHOD(bool register_connection (const Glib::RefPtr<Connection>& cnc, const Glib::ustring& branch), gda_xa_transaction_register_connection, errthrow)
-  _WRAP_METHOD(void unregister_connection (const Glib::RefPtr<Connection>& cnc), gda_xa_transaction_unregister_connection)
+  _WRAP_METHOD(bool register_connection(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& branch), gda_xa_transaction_register_connection, errthrow)
+  _WRAP_METHOD(void unregister_connection(const Glib::RefPtr<Connection>& cnc), gda_xa_transaction_unregister_connection)
 
   _WRAP_METHOD(bool begin(), gda_xa_transaction_begin, errthrow)
   _WRAP_METHOD(bool rollback(), gda_xa_transaction_rollback, errthrow)
+
   typedef std::list<Glib::RefPtr<const Connection> > ConnectionList;
-  _WRAP_METHOD_DOCS_ONLY (gda_xa_transaction_commit)  
+
+  _WRAP_METHOD_DOCS_ONLY(gda_xa_transaction_commit)  
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   bool commit(ConnectionList& cnc_to_recover);
   #else

Modified: libgdamm/trunk/tools/m4/convert_libgdamm.m4
==============================================================================
--- libgdamm/trunk/tools/m4/convert_libgdamm.m4	(original)
+++ libgdamm/trunk/tools/m4/convert_libgdamm.m4	Mon Nov 17 09:44:42 2008
@@ -28,9 +28,11 @@
 _CONVERSION(`GdaSet*',`Glib::RefPtr<Set>',`Glib::wrap($3)')
 _CONVERSION(`GdaSet*',`Glib::RefPtr<const Set>',`Glib::wrap($3)')
 _CONVERSION(`GdaHolder*',`Glib::RefPtr<Holder>',`Glib::wrap($3)')
-_CONVERSION(`GdaHolder*',`const Glib::RefPtr<Holder>&',`Glib::wrap($3)')
+_CONVERSION(`GdaHolder*',`Glib::RefPtr<const Holder>',`Glib::wrap($3)')
 _CONVERSION(`GdaServerProvider*',`Glib::RefPtr<ServerProvider>',`Glib::wrap($3)')
+_CONVERSION(`GdaServerProvider*',`Glib::RefPtr<const ServerProvider>',`Glib::wrap($3)')
 _CONVERSION(`GdaServerOperation*',`Glib::RefPtr<ServerOperation>',`Glib::wrap($3)')
+_CONVERSION(`GdaServerOperation*',`Glib::RefPtr<const ServerOperation>',`Glib::wrap($3)')
 _CONVERSION(`GdaDataHandler*',`Glib::RefPtr<DataHandler>',`Glib::wrap($3)')
 _CONVERSION(`GdaSqlParser*',`Glib::RefPtr<SqlParser>',`Glib::wrap($3)')
 _CONVERSION(`GdaBatch*',`Glib::RefPtr<Batch>',`Glib::wrap($3)')
@@ -60,6 +62,10 @@
 _CONVERSION(`GdaRow*',`Glib::RefPtr<Row>',`Glib::wrap($3)')
 _CONVERSION(`GdaRow*',`Glib::RefPtr<const Row>',`Glib::wrap($3)')
 
+
+_CONVERSION(`GdaConnection*',`Glib::RefPtr<Connection>',`Glib::wrap($3)')
+_CONVERSION(`GdaConnection*',`Glib::RefPtr<const Connection>',`Glib::wrap($3)')
+
 _CONVERSION(`GdaColumn*',`Glib::RefPtr<Column>',`Glib::wrap($3)')
 _CONVERSION(`GdaColumn*',`Glib::RefPtr<const Column>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Column>&', `GdaColumn*', __CONVERT_REFPTR_TO_P)
@@ -145,5 +151,3 @@
 _CONVERSION(`const GValue*', `Value', `$2($3)')
 
 
-# For signals:
-_CONVERSION(`GdaConnection*',`const Glib::RefPtr<Connection>&',`Glib::wrap($3)')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]