## GdaParameter GdaParameter — Management of parameters |

## Synopsis

                GdaParameter;
    #define     GDA_TYPE_PARAMETER
    GType       gda_parameter_get_type          (void);
    GdaParameter* gda_parameter_new_from_value  (const gchar *name,
                                                 const GdaValue *value);
    GdaParameter* gda_parameter_new_boolean     (const gchar *name,
                                                 gboolean value);
    GdaParameter* gda_parameter_new_double      (const gchar *name,
                                                 gdouble value);
    GdaParameter* gda_parameter_new_gobject     (const gchar *name,
                                                 const GObject *value);
    GdaParameter* gda_parameter_new_string      (const gchar *name,
                                                 const gchar *value);
    GdaParameter* gda_parameter_copy            (GdaParameter *param);
    void        gda_parameter_free              (GdaParameter *param);
    const gchar* gda_parameter_get_name         (GdaParameter *param);
    void        gda_parameter_set_name          (GdaParameter *param,
                                                 const gchar *name);
    const GdaValue* gda_parameter_get_value     (GdaParameter *param);
    void        gda_parameter_set_value         (GdaParameter *param,
                                                 GdaValue *value);
                GdaParameterList;
    #define     GDA_TYPE_PARAMETER_LIST
    GType       gda_parameter_list_get_type     (void);
    GdaParameterList* gda_parameter_list_new    (void);
    void        gda_parameter_list_free         (GdaParameterList *plist);
    GdaParameterList* gda_parameter_list_copy   (GdaParameterList *plist);
    void        gda_parameter_list_add_parameter
                                                (GdaParameterList *plist,
                                                 GdaParameter *param);
    GList*      gda_parameter_list_get_names    (GdaParameterList *plist);
    GdaParameter* gda_parameter_list_find       (GdaParameterList *plist,
                                                 const gchar *name);
    void        gda_parameter_list_clear        (GdaParameterList *plist);
    guint       gda_parameter_list_get_length   (GdaParameterList *plist);

## Description

Parameters are the way clients have to send an unlimited number of arguments to the providers.

## Details

### GdaParameter

    typedef struct {
    	gchar *name;
    	GdaValue *value;
    } GdaParameter;

### GDA_TYPE_PARAMETER

    #define GDA_TYPE_PARAMETER (gda_parameter_get_type())

### gda_parameter_get_type ()

    GType       gda_parameter_get_type          (void);

Returns : |

### gda_parameter_new_from_value ()

    GdaParameter* gda_parameter_new_from_value  (const gchar *name,
                                                 const GdaValue *value);

Creates a new GdaParameter object, which is usually used with GdaParameterList.

`name` : | name for the parameter being created.
`value` : | a GdaValue for this parameter.
Returns : | the newly created GdaParameter.

### gda_parameter_new_boolean ()

    GdaParameter* gda_parameter_new_boolean     (const gchar *name,
                                                 gboolean value);

Creates a new GdaParameter from a gboolean value.

`name` : | name for the parameter being created.
`value` : | a boolean value.
Returns : | the newly created GdaParameter.

### gda_parameter_new_double ()

    GdaParameter* gda_parameter_new_double      (const gchar *name,
                                                 gdouble value);

Creates a new GdaParameter from a gdouble value.

`name` : | name for the parameter being created.
`value` : | a gdouble value.
Returns : | the newly created GdaParameter.

### gda_parameter_new_gobject ()

    GdaParameter* gda_parameter_new_gobject     (const gchar *name,
                                                 const GObject *value);

Creates a new GdaParameter from a GObject.

`name` : | name for the parameter being created.
`value` : | a GObject value.
Returns : | the newly created GdaParameter.

### gda_parameter_new_string ()

    GdaParameter* gda_parameter_new_string      (const gchar *name,
                                                 const gchar *value);

Creates a new GdaParameter from a string.

`name` : | name for the parameter being created.
`value` : | string value.
Returns : | the newly created GdaParameter.

### gda_parameter_copy ()

    GdaParameter* gda_parameter_copy            (GdaParameter *param);

Creates a new GdaParameter from an existing one.

`param` : | parameter to get a copy from.
Returns : | a newly allocated GdaParameter with a copy of the data in `param`.

### gda_parameter_free ()

    void        gda_parameter_free              (GdaParameter *param);

Releases all memory occupied by the given GdaParameter.

`param` : | the GdaParameter to be freed.

### gda_parameter_get_name ()

    const gchar* gda_parameter_get_name         (GdaParameter *param);

`param` : | a GdaParameter object.
Returns : | the name of the given GdaParameter.

### gda_parameter_set_name ()

    void        gda_parameter_set_name          (GdaParameter *param,
                                                 const gchar *name);

Sets the name of the given GdaParameter.

`param` : | a GdaParameter.
`name` : | new name for the parameter.

### gda_parameter_get_value ()

    const GdaValue* gda_parameter_get_value     (GdaParameter *param);

`param` : | a GdaParameter.
Returns : | the value stored in the given `param`.

### gda_parameter_set_value ()

    void        gda_parameter_set_value         (GdaParameter *param,
                                                 GdaValue *value);

Stores the given `value` in the given `param`.

`param` : | a GdaParameter.
`value` : | a GdaValue.

### GdaParameterList

    typedef struct _GdaParameterList GdaParameterList;

### GDA_TYPE_PARAMETER_LIST

    #define GDA_TYPE_PARAMETER_LIST (gda_parameter_list_get_type())

### gda_parameter_list_get_type ()

    GType       gda_parameter_list_get_type     (void);

Returns : |

### gda_parameter_list_new ()

    GdaParameterList* gda_parameter_list_new    (void);

Creates a new GdaParameterList.

Returns : | the newly created parameter list.

### gda_parameter_list_free ()

    void        gda_parameter_list_free         (GdaParameterList *plist);

Releases all memory occupied by the given GdaParameterList.

`plist` : | a GdaParameterList.

### gda_parameter_list_copy ()

    GdaParameterList* gda_parameter_list_copy   (GdaParameterList *plist);

Creates a new GdaParameterList from an existing one.

`plist` : | parameter list to get a copy from.
Returns : | a newly allocated GdaParameterList with a copy of the data in `plist`.

### gda_parameter_list_add_parameter ()

    void        gda_parameter_list_add_parameter
                                                (GdaParameterList *plist,
                                                 GdaParameter *param);

Adds a new parameter to the given GdaParameterList. Note that `param` is, when calling this function, is owned by the GdaParameterList, so the caller should just forget about it and not try to free the parameter once it's been added to the GdaParameterList.

`plist` : | a GdaParameterList.
`param` : | the GdaParameter to be added to the list.

### gda_parameter_list_get_names ()

    GList*      gda_parameter_list_get_names    (GdaParameterList *plist);

Gets the names of all parameters in the parameter list.

`plist` : | a GdaParameterList.
Returns : | a GList containing the names of the parameters. After using it, you should free this list by calling g_list_free.

### gda_parameter_list_find ()

    GdaParameter* gda_parameter_list_find       (GdaParameterList *plist,
                                                 const gchar *name);

Gets a GdaParameter from the parameter list given its name.

`plist` : | a GdaParameterList.
`name` : | name of the parameter to search for.
Returns : | the GdaParameter identified by `name`, if found, or `NULL` if not found.

### gda_parameter_list_clear ()

    void        gda_parameter_list_clear        (GdaParameterList *plist);

Clears the parameter list. This means removing all GdaParameter's currently being stored in the parameter list. After calling this function, the parameter list is empty.

`plist` : | a GdaParameterList.

### gda_parameter_list_get_length ()

    guint       gda_parameter_list_get_length   (GdaParameterList *plist);

`plist` : | a GdaParameterList.
Returns : | the number of parameters stored in the given parameter list.