gnomemm r1795 - in libgdamm/trunk: . libgda/src



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

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

* libgda/src/column.ccg:
* libgda/src/column.hg:
* libgda/src/metastruct.hg:
* libgda/src/row.ccg:
* libgda/src/row.hg:
* libgda/src/serveroperation.ccg:
* libgda/src/serveroperation.hg:
* libgda/src/serverprovider.ccg:
* libgda/src/serverprovider.hg: Use Gnome::Gda::Value instead of 
Glib::ValueBase, as it was in libgdamm-3.0. ValueBase particularly 
cannot be used as a return type.

Modified:
   libgdamm/trunk/ChangeLog
   libgdamm/trunk/libgda/src/column.ccg
   libgdamm/trunk/libgda/src/column.hg
   libgdamm/trunk/libgda/src/metastruct.hg
   libgdamm/trunk/libgda/src/row.ccg
   libgdamm/trunk/libgda/src/row.hg
   libgdamm/trunk/libgda/src/serveroperation.ccg
   libgdamm/trunk/libgda/src/serveroperation.hg
   libgdamm/trunk/libgda/src/serverprovider.ccg
   libgdamm/trunk/libgda/src/serverprovider.hg

Modified: libgdamm/trunk/libgda/src/column.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/column.ccg	(original)
+++ libgdamm/trunk/libgda/src/column.ccg	Mon Nov 17 09:52:47 2008
@@ -29,18 +29,18 @@
 namespace Gda
 {
 
-Glib::ValueBase Column::get_attribute(Glib::ustring& attribute) const
+Value Column::get_attribute(Glib::ustring& attribute) const
 {
   const GValue* value = gda_column_get_attribute(const_cast<GdaColumn*>(gobj()), attribute.c_str());
-  Glib::ValueBase retval;
+  Value retval;
   retval.init(value);
   return retval;
 }
   
-Glib::ValueBase Column::get_default_value() const
+Value Column::get_default_value() const
 {
   const GValue* value = gda_column_get_default_value(const_cast<GdaColumn*>(gobj()));
-  Glib::ValueBase retval;
+  Value retval;
   retval.init(value);
   return retval;
 }

Modified: libgdamm/trunk/libgda/src/column.hg
==============================================================================
--- libgdamm/trunk/libgda/src/column.hg	(original)
+++ libgdamm/trunk/libgda/src/column.hg	Mon Nov 17 09:52:47 2008
@@ -20,6 +20,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <libgdamm/value.h>
 #include <libgdamm/transactionstatus.h>
 #include <glibmm/object.h>
 
@@ -52,9 +53,9 @@
   _WRAP_METHOD(Glib::ustring get_description() const, gda_column_get_description)
   _WRAP_METHOD(void set_description(const Glib::ustring& title), gda_column_set_description)
 
-  _WRAP_METHOD(void set_attribute (const Glib::ustring& attribute, const Glib::ValueBase& value), gda_column_set_attribute);
+  _WRAP_METHOD(void set_attribute (const Glib::ustring& attribute, const Value& value), gda_column_set_attribute);
   _WRAP_METHOD_DOCS_ONLY(gda_column_get_attribute);
-  Glib::ValueBase get_attribute(Glib::ustring& attribute) const;
+  Value get_attribute(Glib::ustring& attribute) const;
     
   _WRAP_METHOD(Glib::ustring get_name() const, gda_column_get_name)
   _WRAP_METHOD(void set_name(const Glib::ustring& name), gda_column_set_name)
@@ -71,10 +72,10 @@
   _WRAP_METHOD(void set_position(gint position), gda_column_set_position)
 
    //TODO: Documentation.
-   Glib::ValueBase get_default_value() const;
+   Value get_default_value() const;
   _IGNORE(gda_column_get_default_value)
   
-  _WRAP_METHOD(void set_default_value(const Glib::ValueBase& default_value), gda_column_set_default_value)
+  _WRAP_METHOD(void set_default_value(const Value& default_value), gda_column_set_default_value)
 
 #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(void name_changed(const Glib::ustring& old_name), "name-changed")

Modified: libgdamm/trunk/libgda/src/metastruct.hg
==============================================================================
--- libgdamm/trunk/libgda/src/metastruct.hg	(original)
+++ libgdamm/trunk/libgda/src/metastruct.hg	Mon Nov 17 09:52:47 2008
@@ -19,6 +19,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <libgdamm/value.h>
 #include <libgda/gda-meta-struct.h>
 
 _DEFS(libgdamm,libgda)
@@ -37,7 +38,7 @@
 
 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
@@ -67,16 +68,16 @@
   _WRAP_CREATE(const Glib::RefPtr<MetaStore>& store, MetaStructFeature features)
   
   //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(GdaMetaDbObject* complement(MetaDbObjectType type, const Value& catalog, const Value& schema, const Value& name), gda_meta_struct_complement, errthrow)
+  _WRAP_METHOD(bool complement_schema(const Value& catalog, const Value& 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(GdaMetaDbObject* get_db_object(const Glib::ValueBase& catalog, const Glib::ValueBase& schema, const Glib::ValueBase& name), gda_meta_struct_get_db_object)
+    _WRAP_METHOD(GdaMetaDbObject* get_db_object(const Value& catalog, const Value& schema, const Value& 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(GdaMetaTableColumn* get_table_column(GdaMetaTable* table, const Value& col_name), gda_meta_struct_get_table_column)
   _WRAP_METHOD(Glib::ustring dump_as_graph(MetaGraphInfo info), gda_meta_struct_dump_as_graph, errthrow)
   
   // FIXME: Use C++ type

Modified: libgdamm/trunk/libgda/src/row.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/row.ccg	(original)
+++ libgdamm/trunk/libgda/src/row.ccg	Mon Nov 17 09:52:47 2008
@@ -33,9 +33,9 @@
 namespace Gda
 {
 
-Glib::ValueBase Row::get_value(int num) const
+Value Row::get_value(int num) const
 {
-  Glib::ValueBase retval;
+  Value retval;
   const GValue* value = gda_row_get_value(const_cast<GdaRow*>(gobj()), num);
   retval.init(value);
   return retval;

Modified: libgdamm/trunk/libgda/src/row.hg
==============================================================================
--- libgdamm/trunk/libgda/src/row.hg	(original)
+++ libgdamm/trunk/libgda/src/row.hg	Mon Nov 17 09:52:47 2008
@@ -20,6 +20,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <libgdamm/value.h>
 #include <glibmm/object.h>
 
 _DEFS(libgdamm,libgda)
@@ -52,7 +53,7 @@
 public:
   _WRAP_CREATE(int count)
 
-  Glib::ValueBase get_value(int num) const;
+  Value get_value(int num) const;
 };
 
 } // namespace Gda

Modified: libgdamm/trunk/libgda/src/serveroperation.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/serveroperation.ccg	(original)
+++ libgdamm/trunk/libgda/src/serveroperation.ccg	Mon Nov 17 09:52:47 2008
@@ -30,9 +30,9 @@
 namespace Gda
 {
 
-Glib::ValueBase ServerOperation::get_value_at(const Glib::ustring& path) const
+Value ServerOperation::get_value_at(const Glib::ustring& path) const
 {
-  Glib::ValueBase retval;
+  Value retval;
   const GValue* value = gda_server_operation_get_value_at(const_cast<GdaServerOperation*>(gobj()), "%s", path.c_str());
   retval.init(value);
   return retval;

Modified: libgdamm/trunk/libgda/src/serveroperation.hg
==============================================================================
--- libgdamm/trunk/libgda/src/serveroperation.hg	(original)
+++ libgdamm/trunk/libgda/src/serveroperation.hg	Mon Nov 17 09:52:47 2008
@@ -20,6 +20,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <libgdamm/value.h>
 #include <libgda/gda-server-provider.h>
 
 _DEFS(libgdamm,libgda)
@@ -59,7 +60,7 @@
 public:
   // The C version of these take varargs for some reason.
   _WRAP_METHOD_DOCS_ONLY(gda_server_operation_get_value_at)
-  Glib::ValueBase get_value_at(const Glib::ustring& path_format) const;
+  Value get_value_at(const Glib::ustring& path_format) const;
 
   _WRAP_METHOD_DOCS_ONLY(gda_server_operation_set_value_at)
 #ifdef GLIBMM_EXCEPTIONS_ENABLED

Modified: libgdamm/trunk/libgda/src/serverprovider.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/serverprovider.ccg	(original)
+++ libgdamm/trunk/libgda/src/serverprovider.ccg	Mon Nov 17 09:52:47 2008
@@ -31,12 +31,12 @@
 namespace Gda
 {
 
-Glib::ValueBase ServerProvider::string_to_value(const Glib::RefPtr<Connection>& cnc, 
+Value ServerProvider::string_to_value(const Glib::RefPtr<Connection>& cnc, 
                                                 const Glib::ustring& string, 
                                                 GType prefered_type, 
                                                 Glib::ustring& dbms_type) const
 {
-  Glib::ValueBase retval;
+  Value retval;
   gchar* dmbs_type_c = NULL;
   GValue* value = gda_server_provider_string_to_value(const_cast<GdaServerProvider*>(gobj()),
                                                       cnc->gobj(),

Modified: libgdamm/trunk/libgda/src/serverprovider.hg
==============================================================================
--- libgdamm/trunk/libgda/src/serverprovider.hg	(original)
+++ libgdamm/trunk/libgda/src/serverprovider.hg	Mon Nov 17 09:52:47 2008
@@ -66,7 +66,7 @@
   _WRAP_METHOD(bool supports_feature(const Glib::RefPtr<Connection>& cnc, ConnectionFeature feature) const, gda_server_provider_supports_feature)
 
 
-  _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 value_to_sql_string(const Glib::RefPtr<Connection>& cnc, const Value& from) const, gda_server_provider_value_to_sql_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)
@@ -85,7 +85,7 @@
   _WRAP_METHOD_DOCS_ONLY(gda_server_provider_string_to_value)
 
   //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;
+  Value 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)
 



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