QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Member Functions
QGlib::Quark Class Reference

#include <QGlib/Quark>

List of all members.

Public Member Functions

 Quark (quint32 gquark=0)
QString toString () const
 operator quint32 () const

Static Public Member Functions

static Quark fromString (const char *str)
static Quark fromString (const QString &str)
static Quark tryString (const char *str)
static Quark tryString (const QString &str)

Detailed Description

Wrapper class for GQuark.

Quarks are associations between strings and integer identifiers. Given either the string or the Quark identifier it is possible to retrieve the other.

To create a new quark from a string, use fromString().

To find the string corresponding to a given Quark, use toString().

To find the Quark corresponding to a given string, use tryString().

Note:
This class is a thin wrapper around a quint32. There is no overhead in copying it around, since it is just an integer.

Definition at line 42 of file quark.h.


Member Function Documentation

Quark QGlib::Quark::fromString ( const char *  str) [static]

Creates a new Quark given a string str.

Definition at line 25 of file quark.cpp.

Quark QGlib::Quark::fromString ( const QString &  str) [inline, static]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 66 of file quark.h.

Quark QGlib::Quark::tryString ( const char *  str) [static]

Finds an existing Quark that corresponds to the given string str. If the Quark is not found, an invalid quark (equal to 0) is returned.

Definition at line 31 of file quark.cpp.

Quark QGlib::Quark::tryString ( const QString &  str) [inline, static]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 72 of file quark.h.

QString QGlib::Quark::toString ( ) const

Retrieves the string that corresponds to this Quark.

Definition at line 36 of file quark.cpp.


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