XDispatch 0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Defines | Typedefs | Functions
libQtDispatch

QtDispatch is an additional Qt Module building on QtCore and providing a custom Qt adapted interface to use libdispatch. More...

Classes

class  QBlockRunnable
 Provides a QRunnable Implementation for use with blocks on clang or lambda functions in C++0x. More...
class  QDispatch
 Single Instance Interface to control the dispatch behaviour. More...
class  QDispatchApplication
 Provides a QApplication implementation internally executing the dispatch main queue. More...
class  QDispatchCoreApplication
 Provides a QCoreApplication implementation internally executing the dispatch main queue. More...
class  QDispatchGroup
 A DispatchGroup is a group of QRunnables dispatched on queues. More...
class  QDispatchQueue
 Provides an interface for representing a dispatch queue and methods that can be called to modify or use the queue. More...
class  QDispatchSemaphore
 Wraps dispatch semaphores as provided by libDispatch/libXDispatch. More...
class  QDispatchSourceType
 Base class of all source types supported by QDispatchSource. More...
class  QDispatchSourceTypeSignal
 Uses a signal emitted by a QObject as source and will dispatch the sources handler each time the signal is emitted. More...
class  QDispatchSourceTypeIODevice
 Provides a source dispatching the handler each time the QIODevice has new data to be read. More...
class  QDispatchSourceTypeIODeviceRead
class  QDispatchSourceTypeIODeviceWrite
 Provides a source dispatching the handler each time the QIODevice has finished to write data. More...
class  QDispatchSourceTypeNetworkManager
 This type will dispatch the handler each time the given network manager finished a QNetworkReply. More...
class  QDispatchSource
 Provides a dispatch source. More...
class  QDispatchTimer
 Provides a timer executing a block or runnable each time it fires on a given queue. More...
class  QIterationBlockRunnable
 Provides a QIteration Implementation for use with blocks on clang or lambda functions in C++0x. More...
class  QIterationRunnable
 Provides a QRunnable Implementation for passing a single parameter to the actual run() implementation. More...

Defines

#define QT_MODULE(X)
#define QT_LICENSED_MODULE(X)
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE
#define QT_BEGIN_HEADER
#define QT_END_HEADER
#define Q_DISPATCH_EXPORT   Q_DECL_EXPORT

Typedefs

typedef xdispatch::synclock QDispatchSynclock
 Provides an easy locking mechanism used to ensure the threadsafety of a code area.

Functions

Q_DECL_EXPORT QDebug operator<< (QDebug, const QDispatchGroup &)
Q_DECL_EXPORT QDebug operator<< (QDebug dbg, const QDispatchQueue *q)
Q_DECL_EXPORT QDebug operator<< (QDebug dbg, const QDispatchQueue &q)
Q_DECL_EXPORT QDebug operator<< (QDebug, const QDispatchSemaphore &)

Detailed Description

QtDispatch is an additional Qt Module building on QtCore and providing a custom Qt adapted interface to use libdispatch.

This interface is fully compatible with the generic C++ interface provided by libxdispatch.

As integration into Qt, it is possible to dispatch QRunnables onto groups and queues the same way as when executing them on a QThreadPool. Going along with that we added QBlockRunnable, a simple QRunnable created by passing an individual block.

For integrating the main queue into your Qt Application there is a QDispatchApplication which can be used as a drop-in replacement to QApplication. It will call xdispatch::exec() internally and ensure that all work dispatched to the main queue is executed on the main/gui thread. That way it is very easy to send gui updates to the main thread. All other functionality is equal to that of QApplication.

Usage

You can use QtDispach (in case you have Qt > 4.6 available on your system) by including the QtDispatch header or one of the individual modules - this will automatically include all other needed headers as well. Below you find a list of the available classes.

The corresponding headers have the same name and can be included all by once using

#include <QtDispatch/QtDispatch>

Please link your program with qtdispatch and xdispatch.


Define Documentation

#define Q_DISPATCH_EXPORT   Q_DECL_EXPORT

Definition at line 44 of file qdispatchglobal.h.

#define QT_BEGIN_HEADER

Definition at line 39 of file qdispatchglobal.h.

Definition at line 37 of file qdispatchglobal.h.

#define QT_END_HEADER

Definition at line 40 of file qdispatchglobal.h.

Definition at line 38 of file qdispatchglobal.h.

#define QT_LICENSED_MODULE (   X)

Definition at line 36 of file qdispatchglobal.h.

#define QT_MODULE (   X)

Definition at line 35 of file qdispatchglobal.h.


Typedef Documentation

Provides an easy locking mechanism used to ensure the threadsafety of a code area.

Can be used interchangeable with xdispatch::synclock

See also:
synchronized
synchronize
synclock

Definition at line 65 of file qdispatchglobal.h.


Function Documentation

Q_DECL_EXPORT QDebug operator<< ( QDebug  ,
const QDispatchSemaphore  
)
Q_DECL_EXPORT QDebug operator<< ( QDebug  dbg,
const QDispatchQueue q 
)
Q_DECL_EXPORT QDebug operator<< ( QDebug  dbg,
const QDispatchQueue q 
)
Q_DECL_EXPORT QDebug operator<< ( QDebug  ,
const QDispatchGroup  
)

Generated on Tue Jun 12 2012 14:11:48 for XDispatch by Doxygen 1.8.0
© 2010-2012 MLBA (about | privacy) All Rights reserved.