What about to register the functions to transform the types used by GDA
in the GLib's GType system, to simplify the code implementation?
I tested the following transformation, with out register any function and it works! using the following code for each type:
integer = g_new0(GValue, 1);
g_value_init(integer, G_TYPE_INT); // Substitude to any type
g_value_set_int(integer, -255); // Use the correct g_value_set_* function
g_value_transform(integer, string); // This is the transformation itself
g_string_printf(txt, "Integer to String: int = %s\n", g_value_get_string(string)); // printing the string
I tested to string the following types using GLib 2.8.3 in Ubuntu 5.10: INT, UINT, INT64, BOOLEAN
and from String: FLOAT, DOUBLE