libgdamm: Gnome::Gda::Set Class Reference

libgdamm 4.99.6

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Related Functions
Gnome::Gda::Set Class Reference
Data Handlers

Container for several values. More...

Inheritance diagram for Gnome::Gda::Set:
[legend]
Collaboration diagram for Gnome::Gda::Set:
[legend]

List of all members.

## Public Member Functions
virtual | ~Set ()
GdaSet* | gobj ()
| Provides access to the underlying C GObject.
const GdaSet* | gobj () const
| Provides access to the underlying C GObject.
GdaSet* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
copy ()
| Creates a new Gda::Set object, copy of set.
Value | get_holder_value (const Glib::ustring& holder_id) const
| Get the value of the Gda::Holder which ID is holder_id.
template<class T >
bool | set_holder_value (const value)
| Set the value of the Gda::Holder which ID is holder_id to a specified value.
Glib::ustring& holder_id)
| Finds a Gda::Holder using its ID.
Glib::ustring& holder_id) const
| Finds a Gda::Holder using its ID.
void | add_holder (const Holder >& holder)
| Adds holder to the list of holders managed within set.
void | add_holder_as_value (const value)
| Add a holder.
template<class ValueType >
void | add_holder (const value)
| Add a holder.
void | remove_holder (const Holder >& holder)
| Removes a Gda::Holder from the list of holders managed by set.
void | merge_with_set (const Set >& set_to_merge)
| Add to set all the holders of set_to_merge.
bool | is_valid () const
| This method tells if all set's Gda::Holder objects are valid, and if they represent a valid combination of values, as defined by rules external to Libgda: the "validate-set" signal is emitted and if none of the signal handlers return an error, then the returned value is `true`, otherwise the return value is `false` as soon as a signal handler returns an error.
const signal_holder_changed ()
signal_public_data_changed ()
signal_validate_set ()
< &, const Value& > | signal_validate_holder_change ()
const &, const &, Value > | signal_holder_attr_changed ()
< property_description ()
| Description.
< property_description () const
| Description.
< property_id ()
| Id.
< property_id () const
| Id.
< property_name ()
| Name.
< property_name () const
| Name.
## Static Public Member Functions
static HolderVector())
## Protected Types
typedef < HolderVector
## Protected Member Functions
| Set (const HolderVector& holders)
virtual void | on_holder_changed (const Holder >& holder)
virtual void | on_public_data_changed ()
## Related Functions
(Note that these are not member functions.)
wrap (GdaSet* object, bool take_copy=false)
| A

## Detailed Description

Container for several values.

The Gda::Set object is a container for several values (as Gda::Holder objects), which also offers different classifications of the group of GdaHolder values (see get_node(), get_source() or get_group()).

It is possible to control the values a Gda::Holder can have in the Gda::Set by connecting to the signal_before_holder_change() signal.

## Member Typedef Documentation

typedef Gnome::Gda::Set::HolderVector`[protected]`

## Constructor & Destructor Documentation

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

Gnome::Gda::Set::Set | ( | const HolderVector& | holders | ) | `[explicit, protected]`

## Member Function Documentation

void Gnome::Gda::Set::add_holder | ( | const Holder >& | holder | ) |

Adds holder to the list of holders managed within set.

NOTE: if set already has a Gda::Holder with the same ID as holder, then holder will not be added to the set (even if holder's type or value is not the same as the one already in set).

Parameters:

  holder | A Gda::Holder object.

Returns:
  `true` if holder has been added to set (and `false` if it has not been added because there is another Gda::Holder with the same ID).

template <class ValueType >

void Gnome::Gda::Set::add_holder | ( | const Glib::ustring & | id,
|  | const ValueType & | value
| ) |  |

Add a holder.

Convenience method to add a holder with value

Parameters:

  id | Name of the holder
  value | Value of the holder

void Gnome::Gda::Set::add_holder_as_value | ( | const Glib::ustring & | id,
|  | const Gda::Value& | value
| ) |  |

Add a holder.

Convenience method to add a holder with value

Parameters:

  id | Name of the holder
  value | Value of the holder

Set> Gnome::Gda::Set::copy | ( |  | ) |

Creates a new Gda::Set object, copy of set.

Returns:
  A new Gda::Set object.

static Set> Gnome::Gda::Set::create | ( | const HolderVector& | holders = `HolderVector()` | ) | `[static]`

Holder> Gnome::Gda::Set::get_holder | ( | const Glib::ustring & | holder_id | ) |

Finds a Gda::Holder using its ID.

Parameters:

  holder_id | The ID of the requested value holder.

Returns:
  The requested Gda::Holder or `0`.

Holder> Gnome::Gda::Set::get_holder | ( | const Glib::ustring & | holder_id | ) | const

Finds a Gda::Holder using its ID.

Parameters:

  holder_id | The ID of the requested value holder.

Returns:
  The requested Gda::Holder or `0`.

Value Gnome::Gda::Set::get_holder_value | ( | const Glib::ustring & | holder_id | ) | const

Get the value of the Gda::Holder which ID is holder_id.

Parameters:

  holder_id | The ID of the holder to set the value.

Returns:
  The requested GValue, or `0` (see Gda::Holder::get_value()).

GdaSet* Gnome::Gda::Set::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

Reimplemented in Gnome::Gda::DataModelIter.

const GdaSet* Gnome::Gda::Set::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

Reimplemented in Gnome::Gda::DataModelIter.

GdaSet* Gnome::Gda::Set::gobj_copy | ( |  | ) |

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

Reimplemented in Gnome::Gda::DataModelIter.

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

This method tells if all set's Gda::Holder objects are valid, and if they represent a valid combination of values, as defined by rules external to Libgda: the "validate-set" signal is emitted and if none of the signal handlers return an error, then the returned value is `true`, otherwise the return value is `false` as soon as a signal handler returns an error.

Returns:
  `true` if the set is valid.

Reimplemented in Gnome::Gda::DataModelIter.

void Gnome::Gda::Set::merge_with_set | ( | const Set >& | set_to_merge | ) |

Add to set all the holders of set_to_merge.

Note:
  only the Gda::Holder of set_to_merge for which no holder in set has the same ID are merged
  all the Gda::Holder merged in set are still used by set_to_merge.

Parameters:

  set_to_merge | A Gda::Set object.

virtual void Gnome::Gda::Set::on_holder_changed | ( | const Holder >& | holder | ) | `[protected, virtual]`

virtual void Gnome::Gda::Set::on_public_data_changed | ( |  | ) | `[protected, virtual]`

Glib::ustring> Gnome::Gda::Set::property_description | ( |  | ) |

Description.

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::ustring> Gnome::Gda::Set::property_description | ( |  | ) | const

Description.

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::ustring> Gnome::Gda::Set::property_id | ( |  | ) |

Id.

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::ustring> Gnome::Gda::Set::property_id | ( |  | ) | const

Id.

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::ustring> Gnome::Gda::Set::property_name | ( |  | ) |

Name.

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::ustring> Gnome::Gda::Set::property_name | ( |  | ) | const

Name.

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.

void Gnome::Gda::Set::remove_holder | ( | const Holder >& | holder | ) |

Removes a Gda::Holder from the list of holders managed by set.

Parameters:

  holder | The Gda::Holder to remove from set.

template <class T >

bool Gnome::Gda::Set::set_holder_value | ( | const Glib::ustring & | holder_id,
|  | T | value
| ) |  |

Set the value of the Gda::Holder which ID is holder_id to a specified value.

Parameters:

  holder_id | The ID of the holder to set the value.
  Varargs | Value, of the correct type, depending on the requested holder's type (not `0`).

Returns:
  `true` if no error occurred and the value was set correctly.

Value > Gnome::Gda::Set::signal_holder_attr_changed | ( |  | ) |

Prototype:
  `void on_my_holder_attr_changed(const Glib::RefPtr<Holder>& holder, const Value value)`

Holder>& > Gnome::Gda::Set::signal_holder_changed | ( |  | ) |

Prototype:
  `void on_my_holder_changed(const Glib::RefPtr<Holder>& holder)`

Glib::SignalProxy0< void > Gnome::Gda::Set::signal_public_data_changed | ( |  | ) |

Prototype:
  `void on_my_public_data_changed()`

Value& > Gnome::Gda::Set::signal_validate_holder_change | ( |  | ) |

Prototype:
  `Value& value)`

Glib::Error > Gnome::Gda::Set::signal_validate_set | ( |  | ) |

Prototype:
  `Glib::Error on_my_validate_set()`

## Friends And Related Function Documentation

Gnome::Gda::Set > wrap | ( | GdaSet * | 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:

- libgdamm/set.h