XDispatch 0.7.2
Public Types | Static Public Member Functions | Static Public Attributes
QDispatch Class Reference

Single Instance Interface to control the dispatch behaviour. More...

#include <QtDispatch/qdispatch.h>

List of all members.

Public Types

enum  Priority { HIGH, DEFAULT, LOW }
 Three priority classes used for the three standard global queues. More...

Static Public Member Functions

static QDispatchQueue mainQueue ()
 Returns the main queue.
static QDispatchQueue globalQueue (Priority p=DEFAULT)
 Returns the global queue associated to the given Priority p.
static QDispatchQueue currentQueue ()
static xdispatch::time asDispatchTime (const QTime &)
static QTime asQTime (const xdispatch::time &t)

Static Public Attributes

static const xdispatch::time TimeNow = xdispatch::time_now
 A constant representing a time that will be elapsed immediately.
static const xdispatch::time TimeForever = xdispatch::time_forever
 A constant representing infinite time, i.e.
static const uint64_t NSecPerSec = xdispatch::nsec_per_sec
 The number of nanoseconds per second.
static const uint64_t NSecPerMSec = xdispatch::nsec_per_msec
 The number of nanoseconds per millisecond.
static const uint64_t NSecPerUSec = xdispatch::nsec_per_usec
 The number of nanoseconds per microsecond.
static const uint64_t USecPerSec = xdispatch::usec_per_sec
 The number of microseconds per second.

Detailed Description

Single Instance Interface to control the dispatch behaviour.

Use this object to create new queues, get one of the main or global queues.

When using this object from within a QRunnable executed on a queue you can also use it to get the queue you're running in.

For information about the Dispatch mechanism, please also see Apple's documentation on libDispatch.

Definition at line 54 of file qdispatch.h.


Member Enumeration Documentation

Three priority classes used for the three standard global queues.

Enumerator:
HIGH 
DEFAULT 
LOW 

Definition at line 89 of file qdispatch.h.


Member Function Documentation

static xdispatch::time QDispatch::asDispatchTime ( const QTime &  ) [static]
Returns:
The given QTime converted to a dispatch_time_t
static QTime QDispatch::asQTime ( const xdispatch::time t) [static]
Remarks:
Please be careful when using this converter as a QTime is tracking 24 hours max, whereas a dispatch_time_t can hold way more. This additional time will be cropped while converting.
Returns:
The given dispatch_time_t as QTime
Returns:
The queue the currently active runnable (or block) is executed in.

Returns the global queue associated to the given Priority p.

Runnables submitted to these global concurrent queues may be executed concurrently with respect to each other.

static QDispatchQueue QDispatch::mainQueue ( ) [static]

Returns the main queue.

This is the queue running within the Qt Event Loop. Thus only items put on this queue can change the GUI.


Member Data Documentation

The number of nanoseconds per millisecond.

Definition at line 75 of file qdispatch.h.

The number of nanoseconds per second.

Definition at line 71 of file qdispatch.h.

The number of nanoseconds per microsecond.

Definition at line 79 of file qdispatch.h.

A constant representing infinite time, i.e.

a timeout passed this value will never go by

Definition at line 67 of file qdispatch.h.

A constant representing a time that will be elapsed immediately.

Definition at line 62 of file qdispatch.h.

The number of microseconds per second.

Definition at line 83 of file qdispatch.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Sun Jan 27 2013 21:21:52 for XDispatch by Doxygen 1.7.6.1
© 2010-2013 MLBA (about | privacy) All Rights reserved.