libgdamm 4.99.11

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

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

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Related Functions | List of all members
Gnome::Gda::QuarkList Class Reference
Data Handlers

Manages lists of KEY=VALUE pairs. More...

Collaboration diagram for Gnome::Gda::QuarkList:
[legend]

## Public Types
typedef sigc::slot< void, Glib::ustring, Glib::ustring > | ForeachSlot

## Public Member Functions
| QuarkList ()
| QuarkList (GdaQuarkList* gobject, bool make_a_copy=true)
| QuarkList (const QuarkList& other)
QuarkList& | operator= (const QuarkList& other)
| QuarkList (QuarkList&& other) noexcept
QuarkList& | operator= (QuarkList&& other) noexcept
| ~QuarkList () noexcept
void | swap (QuarkList& other) noexcept
GdaQuarkList* | gobj ()
| Provides access to the underlying C instance. More...
const GdaQuarkList* | gobj () const
| Provides access to the underlying C instance. More...
GdaQuarkList* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. More...
void | clear ()
| Removes all strings in the given Gda::QuarkList. More...
void | add_from_string (const Glib::ustring& name, bool cleanup)
| name must be a semi-colon separated list of "<key>=<value>" strings (for example "DB_NAME=notes;USERNAME=alfred"). More...
Glib::ustring | find (const Glib::ustring& name) const
| Searches for the value identified by name in the given Gda::QuarkList. More...
void | remove (const Glib::ustring& name)
| Removes an entry from the Gda::QuarkList, given its name. More...
void | foreach (const ForeachSlot& func)
| Calls the given function for each of the key/value pairs in qlist. More...

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...

## Protected Attributes
GdaQuarkList* | gobject_

## Related Functions
(Note that these are not member functions.)
void | swap (QuarkList& lhs, QuarkList& rhs) noexcept
Gnome::Gda::QuarkList | wrap (GdaQuarkList* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Detailed Description

Manages lists of KEY=VALUE pairs.

This is used mainly by database providers' implementations to parse connection strings into lists of KEY=VALUE pairs.

## Member Typedef Documentation

typedef sigc::slot<void, Glib::ustring, Glib::ustring> Gnome::Gda::QuarkList::ForeachSlot

## Constructor & Destructor Documentation

Gnome::Gda::QuarkList::QuarkList | ( |  | ) |

Gnome::Gda::QuarkList::QuarkList | ( | GdaQuarkList * | gobject,
|  | bool | make_a_copy = `true`
| ) |  |
| explicit

Gnome::Gda::QuarkList::QuarkList | ( | const QuarkList& | other | ) |

Gnome::Gda::QuarkList::QuarkList | ( | QuarkList&& | other | ) |
| noexcept

Gnome::Gda::QuarkList::~QuarkList | ( |  | ) |
| noexcept

## Member Function Documentation

void Gnome::Gda::QuarkList::add_from_string | ( | const Glib::ustring & | name,
|  | bool | cleanup
| ) |  |

name must be a semi-colon separated list of "<key>=<value>" strings (for example "DB_NAME=notes;USERNAME=alfred").

Each key and value must respect the RFC 1738 recommendations: the `<>"#%{}|\\^~[]';/?:@=&</tt> and space characters are replaced by <tt>"%ab"` where `ab` is the hexadecimal number corresponding to the character (for example the "DB_NAME=notes;USERNAME=al%%20fred" string will specify a username as "al fred"). If this formalism is not respected, then some unexpected results may occur.

Adds new key->value pairs from the given name. If cleanup is set to `true`, the previous contents will be discarded before adding the new pairs.

Parameters

  name | A string.
  cleanup | Whether to cleanup the previous content or not.

void Gnome::Gda::QuarkList::clear | ( |  | ) |

Removes all strings in the given Gda::QuarkList.

Glib::ustring Gnome::Gda::QuarkList::find | ( | const Glib::ustring & | name | ) | const

Searches for the value identified by name in the given Gda::QuarkList.

Parameters

  name | The name of the value to search for.

Returns
  The value associated with the given key if found, or `0` if not found.

void Gnome::Gda::QuarkList::foreach | ( | const ForeachSlot& | func | ) |

Calls the given function for each of the key/value pairs in qlist.

The function is passed the key and value of each pair, and the given user_data parameter. qlist may not be modified while iterating over it.

Parameters

  func | The function to call for each key/value pair.
  user_data | User data to pass to the function.

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

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

GdaQuarkList* Gnome::Gda::QuarkList::gobj | ( |  | ) |
| inline

Provides access to the underlying C instance.

const GdaQuarkList* Gnome::Gda::QuarkList::gobj | ( |  | ) | const
| inline

Provides access to the underlying C instance.

GdaQuarkList* Gnome::Gda::QuarkList::gobj_copy | ( |  | ) | const

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

QuarkList& Gnome::Gda::QuarkList::operator= | ( | const QuarkList& | other | ) |

QuarkList& Gnome::Gda::QuarkList::operator= | ( | QuarkList&& | other | ) |
| noexcept

void Gnome::Gda::QuarkList::remove | ( | const Glib::ustring & | name | ) |

Removes an entry from the Gda::QuarkList, given its name.

Parameters

  name | An entry name.

void Gnome::Gda::QuarkList::swap | ( | QuarkList& | other | ) |
| noexcept

## Friends And Related Function Documentation

void swap | ( | QuarkList& | lhs,
|  | QuarkList& | rhs
| ) |  |
| related

Parameters

  lhs | The left-hand side
  rhs | The right-hand side

Gnome::Gda::QuarkList wrap | ( | GdaQuarkList * | 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.

## Member Data Documentation

GdaQuarkList* Gnome::Gda::QuarkList::gobject_
| protected

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

- libgdamm/quarklist.h