libgdamm: Gnome::Gda::Set Class Reference

libgdamm 4.99.8

- 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 | List of all members
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]

## Public Member Functions
virtual | ~Set ()
GdaSet* | gobj ()
| Provides access to the underlying C GObject. More...
const GdaSet* | gobj () const
| Provides access to the underlying C GObject. More...
GdaSet* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Glib::RefPtr< Set > | copy ()
| Creates a new Gda::Set object, copy of set. More...
Value | get_holder_value (const Glib::ustring& holder_id) const
| Get the value of the Gda::Holder which ID is holder_id. More...
template<class T >
bool | 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. More...
Glib::RefPtr< Holder > | get_holder (const Glib::ustring& holder_id)
| Finds a Gda::Holder using its ID. More...
Glib::RefPtr< const Holder > | get_holder (const Glib::ustring& holder_id) const
| Finds a Gda::Holder using its ID. More...
void | add_holder (const Glib::RefPtr< Holder >& holder)
| Adds holder to the list of holders managed within set. More...
void | add_holder_as_value (const Glib::ustring& id, const Gda::Value& value)
| Add a holder. More...
template<class ValueType >
void | add_holder (const Glib::ustring& id, const ValueType& value)
| Add a holder. More...
void | remove_holder (const Glib::RefPtr< Holder >& holder)
| Removes a Gda::Holder from the list of holders managed by set. More...
void | merge_with_set (const Glib::RefPtr< Set >& set_to_merge)
| Add to set all the holders of set_to_merge. More...
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. More...
Glib::SignalProxy1< void, const Glib::RefPtr< Holder >& > | signal_holder_changed ()
Glib::SignalProxy0< void > | signal_public_data_changed ()
Glib::SignalProxy0< Glib::Error > | signal_validate_set ()
Glib::SignalProxy2 < Glib::Error, const Glib::RefPtr< Holder > &, const Value& > | signal_validate_holder_change ()
Glib::SignalProxy3< void, const Glib::RefPtr< Holder > &, const Glib::ustring &, Value > | signal_holder_attr_changed ()
Glib::PropertyProxy < Glib::ustring > | property_description ()
| Description. More...
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_description () const
| Description. More...
Glib::PropertyProxy < Glib::ustring > | property_id ()
| Id. More...
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_id () const
| Id. More...
Glib::PropertyProxy < Glib::ustring > | property_name ()
| Name. More...
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_name () const
| Name. More...

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static Glib::RefPtr< Set > | create (const HolderVector& holders=HolderVector())

## Protected Types
typedef std::vector < Glib::RefPtr< Holder > > | HolderVector

## Protected Member Functions
| Set (const HolderVector& holders)
virtual void | on_holder_changed (const Glib::RefPtr< Holder >& holder)
| This is a default handler for the signal signal_holder_changed(). More...
virtual void | on_public_data_changed ()
| This is a default handler for the signal signal_public_data_changed(). More...

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gnome::Gda::Set > | wrap (GdaSet* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## 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 std::vector< Glib::RefPtr<Holder> > Gnome::Gda::Set::HolderVector
| protected

## Constructor & Destructor Documentation

virtual Gnome::Gda::Set::~Set | ( |  | ) |
| virtual

Gnome::Gda::Set::Set | ( | const HolderVector& | holders | ) |
| explicitprotected

## Member Function Documentation

void Gnome::Gda::Set::add_holder | ( | const Glib::RefPtr< 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

Glib::RefPtr<Set> Gnome::Gda::Set::copy | ( |  | ) |

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

Returns
  A new Gda::Set object.

static Glib::RefPtr<Set> Gnome::Gda::Set::create | ( | const HolderVector& | holders = `HolderVector()` | ) |
| static

Glib::RefPtr<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`.

Glib::RefPtr<const 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()).

static GType Gnome::Gda::Set::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

GdaSet* Gnome::Gda::Set::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

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

Provides access to the underlying C GObject.

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.

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.

void Gnome::Gda::Set::merge_with_set | ( | const Glib::RefPtr< 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 Glib::RefPtr< Holder >& | holder | ) |
| protectedvirtual

This is a default handler for the signal signal_holder_changed().

virtual void Gnome::Gda::Set::on_public_data_changed | ( |  | ) |
| protectedvirtual

This is a default handler for the signal signal_public_data_changed().

Glib::PropertyProxy< 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 value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< 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_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< 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 value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< 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_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< 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 value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< 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_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

void Gnome::Gda::Set::remove_holder | ( | const Glib::RefPtr< 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.

Glib::SignalProxy3< void,const Glib::RefPtr<Holder>&,const Glib::ustring&,Value > Gnome::Gda::Set::signal_holder_attr_changed | ( |  | ) |

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

Glib::SignalProxy1< void,const Glib::RefPtr<Holder>& > Gnome::Gda::Set::signal_holder_changed | ( |  | ) |

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

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

Slot Prototype:
  `void on_my_public_data_changed()`

Glib::SignalProxy2< Glib::Error,const Glib::RefPtr<Holder>&,const Value& > Gnome::Gda::Set::signal_validate_holder_change | ( |  | ) |

Slot Prototype:
  `Glib::Error on_my_validate_holder_change(const Glib::RefPtr<Holder>& holder, const Value& value)`

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

Slot Prototype:
  `Glib::Error on_my_validate_set()`

## Friends And Related Function Documentation

Glib::RefPtr< 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