libgdamm Reference Documentation

Main Page Namespaces Book

# Gnome::Gda::Parameter Class Reference
[Data Models]

Represents a Value with various attributes. More...

Inheritance diagram for Gnome::Gda::Parameter:

[legend]
List of all members.

## Public Types

typedef Glib::SListHandle< Glib::RefPtr<EntityField >> | ListHandleEntityField

## Public Member Functions

void | bind_to_param (const Glib::RefPtr<Parameter>& bind_to)
| Sets param to change when bind_to changes (and does not make bind_to change when param changes).
Glib::RefPtr<Parameter> | copy () const
| Copy constructor.
void | declare_invalid ()
| Forces a parameter to be invalid; to set it valid again, a new value must be assigned to it using set_value().
void | declare_param_user (const Glib::RefPtr<Object>& user)
| Tells that user is potentially using param.
Glib::ustring | get_alphanum_name () const
| Get a new string containing a "clean" version of param's name: chars which are not among [0-9A-Za-z] are replaced with '_'.
Glib::RefPtr<const Parameter> | get_bind_param () const
| Get the parameter which makes param change its value when the param's value is changed.
Glib::RefPtr<Parameter> | get_bind_param ()
| Get the parameter which makes param change its value when the param's value is changed.
Value | get_default_value () const
bool | get_exists_default_value ()

Returns:
  `true` if param has a default value (which may be unspecified).

GType | get_g_type () const
| Get the requested data type for param.
bool | get_not_null () const
| Get wether the parameter can be `0` or not.
Glib::SListHandle< Glib::RefPtr< const EntityField > > | get_param_users () const
| Get the Gda::EntityField objects which created param (and which will use its value).
Glib::SListHandle< Glib::RefPtr< EntityField > > | get_param_users ()
| Get the Gda::EntityField objects which created param (and which will use its value).
Value | get_value () const
Glib::ustring | get_value_str () const
const GdaParameter* | gobj () const
| Provides access to the underlying C GObject.
GdaParameter* | gobj ()
| Provides access to the underlying C GObject.
GdaParameter* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool | has_restrict_values (Glib::RefPtr<DataModel>& model, int& col) const
bool | has_restrict_values () const
bool | is_valid () const
| Get the validity of param (that is, of the value held by param).
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_entry_plugin () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> | property_entry_plugin ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Parameter >> | property_full_bind () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Glib::RefPtr< Parameter > > | property_full_bind ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< GType > | property_g_type () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< bool > | property_not_null () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> | property_not_null ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > | property_restrict_column () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<int> | property_restrict_column ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DataModel >> | property_restrict_model () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Glib::RefPtr< DataModel > > | property_restrict_model ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Parameter >> | property_simple_bind () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Glib::RefPtr< Parameter > > | property_simple_bind ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< bool > | property_use_default_value () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> | property_use_default_value ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
bool | restrict_values (const Glib::RefPtr<DataModel>& model, int col)
| Sets a limit on the possible values for the param parameter: the value must be among the values contained in the col column of the model data model.
void | set_default_value (const Value& value)
void | set_entry_plugin (const Glib::ustring& plugin)
| This is a convenience method that sets the value of the "entry-plugin" property.
void | set_exists_default_value (bool default_value_exists=true)
| Tells if param has default unspecified value.
void | set_not_null (bool not_null=true)
| Sets if the parameter can have a `0` value.
bool | set_value (const Glib::ustring& value)
| Same function as set_value() except that the value is provided as a string, and may return `false` if the string did not represent a correct value for the data type of the parameter.
void | set_value (const Value& value)
Glib::SignalProxy0<void> | signal_restrict_changed ()

Prototype:
  `void on_my_restrict_changed()`

virtual | ~Parameter ()

## Static Public Member Functions

static Glib::RefPtr<Parameter> | create (const Glib::ustring& name, const gchar* value)
static Glib::RefPtr<Parameter> | create (const Glib::ustring& name, const Glib::ustring& value)
static Glib::RefPtr<Parameter> | create (const Glib::ustring& name, bool value)
static Glib::RefPtr<Parameter> | create ()

## Protected Member Functions

virtual void | on_restrict_changed ()
| Parameter (const Glib::ustring& name, const char* value)
| Parameter (const Glib::ustring& name, const Glib::ustring& value)
| Parameter (const Glib::ustring& name, bool value)
| Parameter (const Glib::ustring& name, const Value& value)
| Parameter ()

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr<Gnome::Gda::Parameter> | wrap (GdaParameter* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Represents a Value with various attributes.

## Member Typedef Documentation

typedef Glib::SListHandle<Glib::RefPtr<EntityField>> Gnome::Gda::Parameter::ListHandleEntityField

## Constructor & Destructor Documentation

virtual Gnome::Gda::Parameter::~Parameter | ( |  | ) | `[virtual]`

Gnome::Gda::Parameter::Parameter | ( |  | ) | `[protected]`

Gnome::Gda::Parameter::Parameter | ( | const Glib::ustring & | name,
|  | const Value& | value |
| ) |  |  | `[protected]`

Gnome::Gda::Parameter::Parameter | ( | const Glib::ustring & | name,
|  | bool | value |
| ) |  |  | `[protected]`

Gnome::Gda::Parameter::Parameter | ( | const Glib::ustring & | name,
|  | const Glib::ustring & | value |
| ) |  |  | `[protected]`

Gnome::Gda::Parameter::Parameter | ( | const Glib::ustring & | name,
|  | const char * | value |
| ) |  |  | `[protected]`

## Member Function Documentation

void Gnome::Gda::Parameter::bind_to_param | ( | const Glib::RefPtr<Parameter>& | bind_to | ) |

Sets param to change when bind_to changes (and does not make bind_to change when param changes).

Parameters:

  | bind_to | A Gda::Parameter or `0`.

Glib::RefPtr<Parameter> Gnome::Gda::Parameter::copy | ( |  | ) | const

Copy constructor.

Returns:
  A new Gda::Parameter object.

static Glib::RefPtr<Parameter> Gnome::Gda::Parameter::create | ( | const Glib::ustring & | name,
|  | const gchar * | value |
| ) |  |  | `[static]`

static Glib::RefPtr<Parameter> Gnome::Gda::Parameter::create | ( | const Glib::ustring & | name,
|  | const Glib::ustring & | value |
| ) |  |  | `[static]`

static Glib::RefPtr<Parameter> Gnome::Gda::Parameter::create | ( | const Glib::ustring & | name,
|  | bool | value |
| ) |  |  | `[static]`

static Glib::RefPtr<Parameter> Gnome::Gda::Parameter::create | ( |  | ) | `[static]`

Reimplemented from Gnome::Gda::Object.

void Gnome::Gda::Parameter::declare_invalid | ( |  | ) |

Forces a parameter to be invalid; to set it valid again, a new value must be assigned to it using set_value().

void Gnome::Gda::Parameter::declare_param_user | ( | const Glib::RefPtr<Object>& | user | ) |

Tells that user is potentially using param.

Parameters:

  | user | The Gda::Object object using that parameter for.

Glib::ustring Gnome::Gda::Parameter::get_alphanum_name | ( |  | ) | const

Get a new string containing a "clean" version of param's name: chars which are not among [0-9A-Za-z] are replaced with '_'.

Returns:
  A new string.

Glib::RefPtr<const Parameter> Gnome::Gda::Parameter::get_bind_param | ( |  | ) | const

Get the parameter which makes param change its value when the param's value is changed.

Returns:
  The Gda::Parameter or `0`.

Glib::RefPtr<Parameter> Gnome::Gda::Parameter::get_bind_param | ( |  | ) |

Get the parameter which makes param change its value when the param's value is changed.

Returns:
  The Gda::Parameter or `0`.

Value Gnome::Gda::Parameter::get_default_value | ( |  | ) | const

bool Gnome::Gda::Parameter::get_exists_default_value | ( |  | ) |

Returns:
  `true` if param has a default value (which may be unspecified).

GType Gnome::Gda::Parameter::get_g_type | ( |  | ) | const

Get the requested data type for param.

Returns:
  The data type.

bool Gnome::Gda::Parameter::get_not_null | ( |  | ) | const

Get wether the parameter can be `0` or not.

Returns:
  `true` if the parameter cannot be `0`.

Glib::SListHandle<Glib::RefPtr<const EntityField> > Gnome::Gda::Parameter::get_param_users | ( |  | ) | const

Get the Gda::EntityField objects which created param (and which will use its value).

Returns:
  The list of Gda::EntityField object; it must not be changed or free'd.

Glib::SListHandle<Glib::RefPtr<EntityField> > Gnome::Gda::Parameter::get_param_users | ( |  | ) |

Get the Gda::EntityField objects which created param (and which will use its value).

Returns:
  The list of Gda::EntityField object; it must not be changed or free'd.

Value Gnome::Gda::Parameter::get_value | ( |  | ) | const

Glib::ustring Gnome::Gda::Parameter::get_value_str | ( |  | ) | const

const GdaParameter* Gnome::Gda::Parameter::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::Object.

GdaParameter* Gnome::Gda::Parameter::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::Object.

GdaParameter* Gnome::Gda::Parameter::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gnome::Gda::Object.

bool Gnome::Gda::Parameter::has_restrict_values | ( | Glib::RefPtr<DataModel>& | model,
|  | int & | col |
| ) |  |  | const

bool Gnome::Gda::Parameter::has_restrict_values | ( |  | ) | const

bool Gnome::Gda::Parameter::is_valid | ( |  | ) | const

Get the validity of param (that is, of the value held by param).

Returns:
  `true` if param's value can safely be used.

virtual void Gnome::Gda::Parameter::on_restrict_changed | ( |  | ) | `[protected, virtual]`

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gnome::Gda::Parameter::property_entry_plugin | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Gnome::Gda::Parameter::property_entry_plugin | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::RefPtr<Parameter>> Gnome::Gda::Parameter::property_full_bind | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::RefPtr<Parameter>> Gnome::Gda::Parameter::property_full_bind | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<GType> Gnome::Gda::Parameter::property_g_type | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gnome::Gda::Parameter::property_not_null | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gnome::Gda::Parameter::property_not_null | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gnome::Gda::Parameter::property_restrict_column | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gnome::Gda::Parameter::property_restrict_column | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::RefPtr<DataModel>> Gnome::Gda::Parameter::property_restrict_model | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::RefPtr<DataModel>> Gnome::Gda::Parameter::property_restrict_model | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::RefPtr<Parameter>> Gnome::Gda::Parameter::property_simple_bind | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::RefPtr<Parameter>> Gnome::Gda::Parameter::property_simple_bind | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gnome::Gda::Parameter::property_use_default_value | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gnome::Gda::Parameter::property_use_default_value | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

bool Gnome::Gda::Parameter::restrict_values | ( | const Glib::RefPtr<DataModel>& | model,
|  | int | col |
| ) |  |  |

Sets a limit on the possible values for the param parameter: the value must be among the values contained in the col column of the model data model.

Parameters:

  | model | A Gda::DataModel object or `0`.
  | col | The reference column in model.

Returns:
  `true` if no error occurred.

void Gnome::Gda::Parameter::set_default_value | ( | const Value& | value | ) |

void Gnome::Gda::Parameter::set_entry_plugin | ( | const Glib::ustring & | plugin | ) |

This is a convenience method that sets the value of the "entry-plugin" property.

void Gnome::Gda::Parameter::set_exists_default_value | ( | bool | default_value_exists = `true` | ) |

Tells if param has default unspecified value.

This function is usefull if one wants to inform that param has a default value but does not know what that default value actually is.

void Gnome::Gda::Parameter::set_not_null | ( | bool | not_null = `true` | ) |

Sets if the parameter can have a `0` value.

If not_null is `true`, then that won't be allowed

bool Gnome::Gda::Parameter::set_value | ( | const Glib::ustring & | value | ) |

Same function as set_value() except that the value is provided as a string, and may return `false` if the string did not represent a correct value for the data type of the parameter.

Parameters:

  | value | A value to set the parameter to, as a string.

Returns:
  `true` if no error occurred.

void Gnome::Gda::Parameter::set_value | ( | const Value& | value | ) |

Glib::SignalProxy0< void > Gnome::Gda::Parameter::signal_restrict_changed | ( |  | ) |

Prototype:
  `void on_my_restrict_changed()`

## Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::Parameter> wrap | ( | GdaParameter * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- parameter.h