libgdamm 4.99.10

- 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
| Set (Set&& src) noexcept
Set& | operator= (Set&& src) noexcept
virtual | ~Set () noexcept
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...
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable ()
| trackable (const trackable &src)
| trackable (trackable &&src) noexcept
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src) noexcept
void | remove_destroy_notify_callback (void *data) const

## 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...
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
virtual | ~Object () noexcept
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## 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...

## Additional Inherited Members
Public Types inherited from Glib::Object
typedef void(* | DestroyNotify) (gpointer data)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## 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

Gnome::Gda::Set::Set | ( | Set&& | src | ) |
| noexcept

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

Gnome::Gda::Set::Set | ( | const HolderVector& | holders | ) |
| explicit protected

## 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 | ) |
| protected virtual

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

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

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

Set& Gnome::Gda::Set::operator= | ( | Set&& | src | ) |
| noexcept

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

Description.

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.

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.

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.

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.

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.

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

  error | A place to store errors, or `0`.
  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