gnomemm r1536 - in libgdamm/branches/libgdamm-4-0: libgda/src tools/m4
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1536 - in libgdamm/branches/libgdamm-4-0: libgda/src tools/m4
- Date: Tue, 27 May 2008 22:32:02 +0000 (UTC)
Author: jhs
Date: Tue May 27 22:32:02 2008
New Revision: 1536
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1536&view=rev
Log:
2008-05-28 Johannes Schmid <johannes schmid openismus com>
* libgda/src/Makefile_list_of_hg.am_fragment:
* libgda/src/column.hg:
* libgda/src/connection.ccg:
* libgda/src/connection.hg:
* libgda/src/datahandler.hg:
* libgda/src/datamodel.hg:
* libgda/src/datamodeliter.hg:
* libgda/src/holder.ccg:
* libgda/src/holder.hg:
* libgda/src/row.hg:
* libgda/src/serveroperation.hg:
* libgda/src/serverprovider.hg:
* libgda/src/set.hg:
* libgda/src/statement.ccg:
* libgda/src/statement.hg:
* tools/m4/convert_libgdamm.m4:
Wrapped statement and holder and update everything to use Glib::Value instead
of Gda::Value
Added:
libgdamm/branches/libgdamm-4-0/libgda/src/holder.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/holder.hg
libgdamm/branches/libgdamm-4-0/libgda/src/statement.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/statement.hg
Modified:
libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment
libgdamm/branches/libgdamm-4-0/libgda/src/column.hg
libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg
libgdamm/branches/libgdamm-4-0/libgda/src/datahandler.hg
libgdamm/branches/libgdamm-4-0/libgda/src/datamodel.hg
libgdamm/branches/libgdamm-4-0/libgda/src/datamodeliter.hg
libgdamm/branches/libgdamm-4-0/libgda/src/row.hg
libgdamm/branches/libgdamm-4-0/libgda/src/serveroperation.hg
libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.hg
libgdamm/branches/libgdamm-4-0/libgda/src/set.hg
libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment Tue May 27 22:32:02 2008
@@ -10,7 +10,7 @@
handlerstring.hg handlerboolean.hg handlertime.hg \
handlernumerical.hg handlerbin.hg handlertype.hg \
serverprovider.hg serveroperation.hg transactionstatus.hg \
- set.hg row.hg column.hg
+ set.hg row.hg column.hg holder.hg statement.hg
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/column.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/column.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/column.hg Tue May 27 22:32:02 2008
@@ -26,8 +26,6 @@
_DEFS(libgdamm,libgda)
_PINCLUDE(glibmm/private/object_p.h)
-#include <libgdamm/value.h>
-
namespace Gnome
{
@@ -82,10 +80,10 @@
_WRAP_METHOD(gint get_position() const, gda_column_get_position)
_WRAP_METHOD(void set_position(gint position), gda_column_set_position)
- Value get_default_value() const;
+ Glib::ValueBase get_default_value() const;
_IGNORE(gda_column_get_default_value)
- _WRAP_METHOD(void set_default_value(const Value& default_value), gda_column_set_default_value)
+ _WRAP_METHOD(void set_default_value(const Glib::ValueBase& 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/branches/libgdamm-4-0/libgda/src/connection.ccg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg Tue May 27 22:32:02 2008
@@ -21,8 +21,6 @@
*/
#include <libgdamm/serverprovider.h>
-#include <libgdamm/client.h>
-#include <libgdamm/command.h>
#include <libgda/gda-enum-types.h>
#include <libgda/gda-connection.h>
#include <libgda/libgda.h> //For GDA_GENERAL_ERROR
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg Tue May 27 22:32:02 2008
@@ -40,8 +40,6 @@
*/
_WRAP_GERROR(ConnectionError, GdaConnectionError, GDA_CONNECTION_ERROR)
-class Client;
-
_WRAP_ENUM(ConnectionFeature, GdaConnectionFeature)
_WRAP_ENUM(ConnectionSchema, GdaConnectionSchema)
_WRAP_ENUM(ConnectionOptions, GdaConnectionOptions)
@@ -136,7 +134,7 @@
_WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<const ConnectionEvent> > get_events() const, gda_connection_get_events)
- _WRAP_METHOD(Glib::ustring value_to_sql_string(const Value& from) const, gda_connection_value_to_sql_string)
+ _WRAP_METHOD(Glib::ustring value_to_sql_string(const Glib::ValueBase& from) const, gda_connection_value_to_sql_string)
_WRAP_METHOD(bool supports_feature(ConnectionFeature feature) const, gda_connection_supports_feature)
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/datahandler.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/datahandler.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/datahandler.hg Tue May 27 22:32:02 2008
@@ -20,7 +20,6 @@
*/
#include <glibmm/interface.h>
-#include <libgdamm/value.h>
#include <libgda/gda-data-handler.h>
_DEFS(libgdamm,libgda)
@@ -58,8 +57,8 @@
_CLASS_INTERFACE(DataHandler, GdaDataHandler, GDA_DATA_HANDLER, GdaDataHandlerClass)
public:
- _WRAP_METHOD(Glib::ustring get_sql_from_value(const Value& value) const, gda_data_handler_get_sql_from_value)
- _WRAP_METHOD(Glib::ustring get_str_from_value(const Value& value) const, gda_data_handler_get_str_from_value)
+ _WRAP_METHOD(Glib::ustring get_sql_from_value(const Glib::ValueBase& value) const, gda_data_handler_get_sql_from_value)
+ _WRAP_METHOD(Glib::ustring get_str_from_value(const Glib::ValueBase& value) const, gda_data_handler_get_str_from_value)
// Hand-coded this to get proper return values
_IGNORE(gda_data_handler_get_value_from_sql, gda_data_handler_get_value_from_str, gda_data_handler_get_sane_init_value)
@@ -75,7 +74,7 @@
* @param type
* @result The new Value.
*/
- Value get_value_from_sql(const Glib::ustring& sql, GType type) const;
+ Glib::ValueBase get_value_from_sql(const Glib::ustring& sql, GType type) const;
/** Creates a new Value which represents the STR value given as argument.
* This is the opposite of the function get_str_from_value(). The type argument is used to determine the real data
@@ -88,7 +87,7 @@
* @param type
* @result The new Value.
*/
- Value get_value_from_str(const Glib::ustring& str, GType type) const;
+ Glib::ValueBase get_value_from_str(const Glib::ustring& str, GType type) const;
/** Creates a new Value which holds a sane initial value to be used if no value is specifically provided.
* For example, for a simple string, this would return a new value containing the "" string.
@@ -96,7 +95,7 @@
* @param type
* @result The new Value.
*/
- Value get_sane_init_value(GType type) const;
+ Glib::ValueBase get_sane_init_value(GType type) const;
_WRAP_METHOD(unsigned int get_nb_g_types() const, gda_data_handler_get_nb_g_types)
_WRAP_METHOD(bool accepts_g_type(GType type) const, gda_data_handler_accepts_g_type)
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/datamodel.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/datamodel.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/datamodel.hg Tue May 27 22:32:02 2008
@@ -22,6 +22,7 @@
#include <glibmm/object.h>
#include <libgdamm/datamodeliter.h>
+#include <libgdamm/column.h>
#include <libgda/gda-data-model.h>
_DEFS(libgdamm,libgda)
@@ -40,6 +41,7 @@
_WRAP_ENUM(DataModelHint, GdaDataModelHint)
_WRAP_ENUM(DataModelIOFormat, GdaDataModelIOFormat)
+typedef GdaValueAttribute ValueAttribute;
/** @defgroup DataModels Data Models
*/
@@ -96,10 +98,10 @@
//#m4 _CONVERSION(`GValue*',`Value',`Glib::wrap($3, true /* take_copy=true */)')
//#m4 _CONVERSION(`const GValue*',`Value',`Glib::wrap(const_cast<GValue*>($3), true /* take_copy */)')
- Value get_value_at(int col, int row) const;
+ Glib::ValueBase get_value_at(int col, int row) const;
_IGNORE(gda_data_model_get_value_at)
- Value get_value_at(const Glib::ustring& column_name, int row) const;
+ Glib::ValueBase get_value_at(const Glib::ustring& column_name, int row) const;
_IGNORE(gda_data_model_get_value_at_col_name)
_WRAP_METHOD(ValueAttribute get_attributes_at(int col, int row), gda_data_model_get_attributes_at)
@@ -109,7 +111,7 @@
//Ignore private functions:
_IGNORE(gda_data_model_move_iter_at_row, gda_data_model_move_iter_next, gda_data_model_move_iter_prev)
- _WRAP_METHOD(bool set_value_at(int col, int row, const Value& value), gda_data_model_set_value_at, errthrow)
+ _WRAP_METHOD(bool set_value_at(int col, int row, const Glib::ValueBase& value), gda_data_model_set_value_at, errthrow)
#m4 _CONVERSION(`const ValueList&',`const GList*',`$3.data()')
#m4 _CONVERSION(`const ValueList&',`GList*',`$3.data()')
@@ -129,7 +131,7 @@
#m4 _CONVERSION(`const ValueSList&', `GSList*', `$3.data()')
_WRAP_METHOD(int get_row_from_values(const ValueSList& values, const Glib::ArrayHandle<int>& cols_index), gda_data_model_get_row_from_values)
- _WRAP_METHOD(void send_hint(DataModelHint hint, const Value& hint_value), gda_data_model_send_hint)
+ _WRAP_METHOD(void send_hint(DataModelHint hint, const Glib::ValueBase& hint_value), gda_data_model_send_hint)
/** Exports data contained in @a model to the a string; the format is specified using the @a format argument.
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/datamodeliter.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/datamodeliter.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/datamodeliter.hg Tue May 27 22:32:02 2008
@@ -20,7 +20,7 @@
*/
#include <glibmm/object.h>
-#include <glibmm/set.h>
+#include <libgdamm/set.h>
_DEFS(libgdamm,libgda)
_PINCLUDE(libgdamm/private/parameterlist_p.h)
@@ -35,9 +35,9 @@
// TODO
class DataModelIter
- : public ParameterList
+ : public Set
{
- _CLASS_GOBJECT(DataModelIter, GdaDataModelIter, GDA_DATA_MODEL_ITER, ParameterList, GdaParameterList)
+ _CLASS_GOBJECT(DataModelIter, GdaDataModelIter, GDA_DATA_MODEL_ITER, Set, GdaSet)
protected:
_WRAP_CTOR(DataModelIter(const Glib::RefPtr<DataModel>& data_model), gda_data_model_create_iter)
@@ -51,8 +51,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(Glib::Value get_value_at (int col), gda_data_model_iter_get_value_at)
- _WRAP_METHOD(Glib::Value get_value_for_field (const Glib::ustring& field_name), gda_data_model_iter_get_value_for_field)
+ _WRAP_METHOD(Glib::ValueBase get_value_at (int col), gda_data_model_iter_get_value_at)
+ _WRAP_METHOD(Glib::ValueBase get_value_for_field (const Glib::ustring& field_name), gda_data_model_iter_get_value_for_field)
_WRAP_PROPERTY("current-row", int)
_WRAP_PROPERTY("data-model", Glib::RefPtr<DataModel>)
Added: libgdamm/branches/libgdamm-4-0/libgda/src/holder.ccg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/holder.ccg Tue May 27 22:32:02 2008
@@ -0,0 +1,29 @@
+// -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
+
+/* holder.cc
+ *
+ * Copyright 2003 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/holder.h>
+
+namespace Gnome
+{
+
+
+} /* namespace Gnome */
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/holder.hg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/holder.hg Tue May 27 22:32:02 2008
@@ -0,0 +1,88 @@
+// -*- C++ -*- // this is for the .hg, I realize gensig puts one in
+
+/* set.h
+ *
+ * Copyright 2006 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/datahandler.h>
+
+_DEFS(libgdamm,libgda)
+_PINCLUDE(libgdamm/private/object_p.h)
+
+namespace Gnome
+{
+
+namespace Gda
+{
+
+class DataModel;
+
+/** Container for several values
+ *
+ * @ingroup Connection
+ */
+class Holder : public Glib::Object
+{
+ _CLASS_GOBJECT(Holder, GdaHolder, GDA_HOLDER, Glib::Object, GObject)
+public:
+ _WRAP_CREATE(GType g_type)
+
+ _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(Glib::ValueBase get_value() const, gda_holder_get_value)
+ _WRAP_METHOD(Glib::ustring get_value_str(const Glib::RefPtr<DataHandler>& dh) const, gda_holder_get_value_str)
+ _WRAP_METHOD(bool set_value(const Glib::ValueBase& value), gda_holder_set_value)
+ _WRAP_METHOD(bool set_value_str (const Glib::RefPtr<DataHandler>& dh, const Glib::ustring& value), gda_holder_set_value_str)
+ _WRAP_METHOD(bool take_value (Glib::ValueBase& value), gda_holder_take_value)
+
+ _WRAP_METHOD(Glib::ValueBase get_default_value() const, gda_holder_get_default_value)
+ _WRAP_METHOD(void set_default_value(const Glib::ValueBase& 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(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(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(void set_bind (const Glib::RefPtr<Holder>& bind_to), gda_holder_set_bind)
+ _WRAP_METHOD(Glib::RefPtr<Holder> get_bind(), gda_holder_get_bind)
+
+ // TODO:
+ /*_WRAP_PROPERTY("description", Glib::ustring)
+ _WRAP_PROPERTY("full-bind", Glib::RefPtr<Holder>)
+ _WRAP_PROPERTY("g-type", gulong)
+ _WRAP_PROPERTY("id", Glib::ustring)
+ _WRAP_PROPERTY("name", Glib::ustring)
+ _WRAP_PROPERTY("not-null", bool)
+ _WRAP_PROPERTY("simple-bind", Glib::RefPtr<Holder>)
+ _WRAP_PROPERTY("plugin", Glib::ustring)
+ _WRAP_PROPERTY("simple-bind", Glib::RefPtr<Holder>)
+ _WRAP_PROPERTY("source-column", int)
+ _WRAP_PROPERTY("source-model", Glib::RefPtr<DataModel)*/
+
+ _WRAP_SIGNAL(void changed(), "changed")
+ _WRAP_SIGNAL(void source_changed(), "source-changed")
+
+};
+
+} // namespace Gda
+} // namespace Gnome
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/row.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/row.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/row.hg Tue May 27 22:32:02 2008
@@ -20,8 +20,6 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
-#include <libgdamm/value.h>
#include <glibmm/object.h>
_DEFS(libgdamm,libgda)
@@ -34,7 +32,6 @@
{
class DataModel;
-class Value;
//TODO:
class Row : public Glib::Object
@@ -58,10 +55,10 @@
_WRAP_METHOD(Glib::ustring get_id() const, gda_row_get_id)
_WRAP_METHOD(void set_id(const Glib::ustring& id), gda_row_set_id)
- Value get_value(int num) const;
+ Glib::ValueBase get_value(int num) const;
_IGNORE(gda_row_get_value)
- _WRAP_METHOD(bool set_value(int num, const Value& value), gda_row_set_value)
+ _WRAP_METHOD(bool set_value(int num, const Glib::ValueBase& value), gda_row_set_value)
_WRAP_METHOD(Glib::RefPtr<DataModel> get_model(), gda_row_get_model, refreturn)
_WRAP_METHOD(Glib::RefPtr<const DataModel> get_model() const, gda_row_get_model, constversion)
@@ -80,8 +77,8 @@
//_WRAP_PROPERTY("values", GList*)
//_WRAP_PROPERTY("nb_values", int)
- _WRAP_SIGNAL (bool value_to_change (int num, Glib::Value& current, Glib::Value& proposed), "value-to-change")
- _WRAP_SIGNAL (void value_changed (int num, Glib::Value& current, Glib::Value& proposed), "value-changed")
+ _WRAP_SIGNAL (bool value_to_change (int num, Glib::ValueBase& current, Glib::ValueBase& proposed), "value-to-change")
+ _WRAP_SIGNAL (void value_changed (int num, Glib::ValueBase& current, Glib::ValueBase& proposed), "value-changed")
};
} // namespace Gda
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/serveroperation.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/serveroperation.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/serveroperation.hg Tue May 27 22:32:02 2008
@@ -20,10 +20,6 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-//#include <libgdamm/connection.h>
-#include <libgdamm/command.h>
-#include <libgdamm/datamodelindex.h>
-#include <libgdamm/client.h>
#include <libgda/gda-server-provider.h>
_DEFS(libgdamm,libgda)
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/serverprovider.hg Tue May 27 22:32:02 2008
@@ -22,15 +22,12 @@
#include <libgdamm/statement.h>
#include <libgdamm/connection.h>
-#include <libgdamm/datamodelindex.h>
#include <libgdamm/serveroperation.h>
#include <libgdamm/datahandler.h>
_DEFS(libgdamm,libgda)
_PINCLUDE(glibmm/private/object_p.h)
-#include <libgdamm/blob.h>
-
namespace Gnome
{
@@ -65,7 +62,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 Value& from) const, gda_server_provider_value_to_sql_string)
+ _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)
@@ -81,7 +78,7 @@
_WRAP_METHOD(Glib::ustring get_name(), gda_server_provider_get_name)
_WRAP_METHOD(Glib::RefPtr<SqlParser> create_parser(const Glib::RefPtr<Connection>& cnc), gda_server_provider_create_parser)
// TODO:
- _WRAP_METHOD(Glib::Value string_to_value(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& string, GType prefered_type, gchar** dbms_type), gda_server_provider_string_to_value)
+ _WRAP_METHOD(Glib::ValueBase string_to_value(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& string, GType prefered_type, gchar** dbms_type), gda_server_provider_string_to_value)
// These are in a private header, so ignore them
_IGNORE(gda_server_provider_handler_declare, gda_server_provider_handler_find,
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/set.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/set.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/set.hg Tue May 27 22:32:02 2008
@@ -19,6 +19,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <libgdamm/holder.h>
+
_DEFS(libgdamm,libgda)
_PINCLUDE(libgdamm/private/object_p.h)
@@ -32,14 +34,14 @@
*
* @ingroup Connection
*/
-class GdaSet : public Glib::Object
+class Set : public Glib::Object
{
_CLASS_GOBJECT(Set, GdaSet, GDA_SET, Glib::Object, GObject)
public:
_WRAP_CREATE()
_WRAP_METHOD (Glib::ustring get_spec(), gda_set_get_spec)
- _WRAP_METHOD (Glib::Value get_holder_value(const Glib::ustring& holder_id), gda_set_get_holder_value)
+ _WRAP_METHOD (Glib::ValueBase get_holder_value(const Glib::ustring& holder_id), gda_set_get_holder_value)
// TODO:
//_WRAP_METHOD (bool set_holder_value())
Added: libgdamm/branches/libgdamm-4-0/libgda/src/statement.ccg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/statement.ccg Tue May 27 22:32:02 2008
@@ -0,0 +1,29 @@
+// -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
+
+/* statement.cc
+ *
+ * Copyright 2003 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/statement.h>
+
+namespace Gnome
+{
+
+
+} /* namespace Gnome */
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/statement.hg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/statement.hg Tue May 27 22:32:02 2008
@@ -0,0 +1,65 @@
+// -*- C++ -*- // this is for the .hg, I realize gensig puts one in
+
+/* statement.h
+ *
+ * Copyright 2006 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+_DEFS(libgdamm,libgda)
+_PINCLUDE(libgdamm/private/object_p.h)
+
+namespace Gnome
+{
+
+namespace Gda
+{
+
+_WRAP_ENUM (GdaSqlStatementType, SqlStatementType)
+
+/** Container for several values
+ *
+ * @ingroup Connection
+ */
+class Statement : public Glib::Object
+{
+ _CLASS_GOBJECT(Statement, GdaStatement, GDA_STATEMENT, Glib::Object, GObject)
+public:
+ _WRAP_CREATE()
+
+ _WRAP_METHOD(Glib::ustring serialize(), gda_statement_serialize)
+ _WRAP_METHOD(static Glib::RefPtr<Statement> deserialize(const Glib::ustring& str), gda_statement_deserialize, errthrow)
+ // TODO:
+ //_WRAP_METHOD(bool get_parameters ())
+
+ //to_sql(const Glib::RefPtr<Set>& params); //This is a #define
+ //_WRAP_METHOD(to_sql_extended(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<Set>& params), gda_statement_to_sql, errthrow)
+
+ _WRAP_METHOD(SqlStatementType get_statement_type(), 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)
+
+ _WRAP_PROPERTY("structure", gpointer)
+
+ _WRAP_SIGNAL(void checked(const Glib::RefPtr<Connection>& cnc, bool valid), "checked")
+ _WRAP_SIGNAL(void reset(), "reset")
+};
+
+} // namespace Gda
+} // namespace Gnome
+
Modified: libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4
==============================================================================
--- libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4 (original)
+++ libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4 Tue May 27 22:32:02 2008
@@ -10,24 +10,7 @@
_CONVERSION(`GdaStatement*',`Glib::RefPtr<Statement>',`Glib::wrap($3)')
_CONVERSION(`GdaTransactionStatus*',`Glib::RefPtr<TransactionStatus>',`Glib::wrap($3)')
_CONVERSION(`GdaTransactionStatus*',`Glib::RefPtr<const TransactionStatus>',`Glib::wrap($3)')
-_CONVERSION(`GdaClient*',`Glib::RefPtr<Client>',`Glib::wrap($3)')
-_CONVERSION(`GdaClient*',`Glib::RefPtr<const Client>',`Glib::wrap($3)')
-_CONVERSION(`GdaDict*',`Glib::RefPtr<Dict>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictAggregate*',`Glib::RefPtr<DictAggregate>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictDatabase*',`Glib::RefPtr<DictDatabase>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictDatabase*',`Glib::RefPtr<const DictDatabase>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictTable*',`Glib::RefPtr<DictTable>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictTable*',`const Glib::RefPtr<DictTable>&',`Glib::wrap($3)')
-_CONVERSION(`GdaDictField*',`Glib::RefPtr<DictField>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictField*',`Glib::RefPtr<const DictField>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictField*',`const Glib::RefPtr<DictField>&',`Glib::wrap($3)')
-_CONVERSION(`GdaDictConstraint*',`Glib::RefPtr<DictConstraint>',`Glib::wrap($3)')
-_CONVERSION(`GdaDictConstraint*',`const Glib::RefPtr<DictConstraint>&',`Glib::wrap($3)')
-_CONVERSION(`GdaDictFunction*', `Glib::RefPtr<DictFunction>', `Glib::wrap($3)')
-_CONVERSION(`GdaObject*',`Glib::RefPtr<Gda::Object>',`Glib::wrap($3)')
-_CONVERSION(`GdaObject*',`Glib::RefPtr<Object>',`Glib::wrap($3)')
-_CONVERSION(`GdaObject*',`const Glib::RefPtr<Object>',`Glib::wrap($3)')
-_CONVERSION(`GObject*',`Glib::RefPtr<Parameter>',`Glib::wrap($3)')
+
_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)')
@@ -38,13 +21,12 @@
_CONVERSION(`GdaSqlParser*',`Glib::RefPtr<SqlParser>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<DataModel>&', `GdaDataModel*', __CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<DataHandler>&', `GdaDataHandler*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<DataModelIter>&', `GdaDataModelIter*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<ServerProvider>&', `GdaServerProvider*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<ServerOperation>&', `GdaServerOperation*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<TransactionStatus>&', `GdaTransactionStatus*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Connection>&', `GdaConnection*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<Object>&', `GdaObject*', __CONVERT_REFPTR_TO_P)
-_CONVERSION(`const Glib::RefPtr<Gda::Object>&', `GdaObject*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Statement>&', `GdaStatement*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Set>&', `GdaSet*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Holder>&', `GdaHolder*', __CONVERT_REFPTR_TO_P)
@@ -71,41 +53,20 @@
_CONVERSION(`const Glib::RefPtr<Glib::Object>&', `const GObject*', `($3)->gobj()')
-_CONVERSION(`const Glib::RefPtr<Client>&', `GdaClient*', __CONVERT_REFPTR_TO_P)
-
-_CONVERSION(`const Value&', `GValue*', `const_cast<GValue*>(($3).gobj())')
-_CONVERSION(`const Value&', `const GValue*', `($3).gobj()')
-_CONVERSION(`GValue*', `Value', `$2($3)')
-_CONVERSION(`const GValue*', `Value', `$2($3)')
-_CONVERSION(`GValue*', `Glib::Value', `$2($3)')
-_CONVERSION(`const GValue*', `Glib::Value', `$2($3)')
-_CONVERSION(`Glib::Value&', `GValue*', `($3).gobj()')
-_CONVERSION(`const Glib::Value&', `const GValue*', `($3).gobj()')
-_CONVERSION(`GValue*', `Glib::Value&', `$2($3)')
+_CONVERSION(`GValue*', `Glib::ValueBase', `Glib::wrap($3)')
+_CONVERSION(`const GValue*', `Glib::ValueBase', `Glib::wrap($3)')
+_CONVERSION(`Glib::ValueBase&', `GValue*', `($3).gobj()')
+_CONVERSION(`const Glib::ValueBase&', `const GValue*', `($3).gobj()')
_CONVERSION(`GdaRow*', `const Glib::RefPtr<Row>', `Glib::wrap($3)')
_CONVERSION(`GdaRow*', `const Glib::RefPtr<const Row>', `Glib::wrap($3)')
-_CONVERSION(`const Time&', `const GdaTime*', `&($3)')
-_CONVERSION(`const GdaTime*', `Time', `*($3)')
-
-_CONVERSION(`const Timestamp&', `const GdaTimestamp*', `&($3)')
-_CONVERSION(`const GdaTimestamp*', `Timestamp', `*($3)')
-
-_CONVERSION(`const GeometricPoint&', `const GdaGeometricPoint*', `&($3)')
-_CONVERSION(`const GdaGeometricPoint*', `GeometricPoint', `*($3)')
-
-_CONVERSION(`const GdaBinary&', `const GdaBinary*', `&($3)')
-_CONVERSION(`Blob&',`GdaBlob*',__FR2P)
-_CONVERSION(`GdaBlob*',`Blob', Glib::wrap($3))
-
_CONVERSION(`const int*','const-gint*',`$3')
_CONVERSION(`long&',`glong*',`&($3)')
_CONVERSION(`Glib::ustring', `const gchar*', `($3).c_str()')
-_CONVERSION(`DictConstraintFkAction&',`GdaDictConstraintFkAction*',`(($2) &($3))')
_CONVERSION(`ServerOperationNodeStatus&',`GdaServerOperationNodeStatus*',`(($2) &($3))')
#_CONVERSION(`GdaServerOperationNodeType' `ServerOperationNodeType',`(($2)($3))')
@@ -130,6 +91,7 @@
_CONV_ENUM(Gda,ServerOperationNodeStatus)
_CONV_ENUM(Gda,ValueAttribute)
_CONV_ENUM(Gda,StatementModelUsage)
+_CONV_ENUM(Gda,SqlStatementType)
# Lists
_CONVERSION(`const Glib::ListHandle<Value>&',`GList*',`$3.data()')
@@ -144,5 +106,4 @@
# For signals:
-_CONVERSION(`GdaParameterList*',`const ParameterList&',`Glib::wrap($3)')
_CONVERSION(`GdaConnection*',`const Glib::RefPtr<Connection>&',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]