glibmm 2.86.0

Public Member Functions | Related Symbols | List of all members
Glib::QueryQuark Class Reference

Quarks are unique IDs in Glib for strings for use in hash table lookups. More...

`#include <glibmm/quark.h>`

Inheritance diagram for Glib::QueryQuark:
[legend]

## Public Member Functions
| QueryQuark (const GQuark & q)
| QueryQuark (const ustring & s)
| QueryQuark (const char * s)
| ~QueryQuark () noexcept
QueryQuark & | operator= (const QueryQuark & q)
| operator ustring () const
| operator GQuark () const
GQuark | id () const

## Related Symbols
(Note that these are not member symbols.)
bool | operator== (const QueryQuark & a, const QueryQuark & b)
bool | operator!= (const QueryQuark & a, const QueryQuark & b)

## Detailed Description

Quarks are unique IDs in Glib for strings for use in hash table lookups.

Each Quark is unique but may change between runs.

QueryQuark is a converter class for looking up but not allocating an ID. An id means the quark lookup failed.

Quark is used for actions for which the id should live on While QueryQuark should be used for queries. ie. void set_data (const Quark&, void * data); void* get_data (const QueryQuark&);

## Constructor & Destructor Documentation

## ◆ QueryQuark() [1/3]

Glib::QueryQuark::QueryQuark | ( | const GQuark & | q | ) |

## ◆ QueryQuark() [2/3]

Glib::QueryQuark::QueryQuark | ( | const ustring & | s | ) |

## ◆ QueryQuark() [3/3]

Glib::QueryQuark::QueryQuark | ( | const char * | s | ) |

## ◆ ~QueryQuark()

Glib::QueryQuark::~QueryQuark | ( |  | ) |
| inline noexcept

## Member Function Documentation

## ◆ id()

GQuark Glib::QueryQuark::id | ( |  | ) | const
| inline

## ◆ operator GQuark()

Glib::QueryQuark::operator GQuark | ( |  | ) | const
| inline

## ◆ operator ustring()

Glib::QueryQuark::operator ustring | ( |  | ) | const

## ◆ operator=()

QueryQuark & Glib::QueryQuark::operator= | ( | const QueryQuark & | q | ) |

## Friends And Related Symbol Documentation

## ◆ operator!=()

bool operator!= | ( | const QueryQuark & | a,
|  | const QueryQuark & | b )
| related

## ◆ operator==()

bool operator== | ( | const QueryQuark & | a,
|  | const QueryQuark & | b )
| related