Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PreloadAggregator Class Reference

Public Member Functions

void expectLoaders (int count)
 
void loaderReady (QPluginLoader *loader)
 
QPluginLoader * waitForNextLoader ()
 

Protected Attributes

std::deque< QPluginLoader * > loaders_
 
QWaitCondition pluginAvailable_
 
QMutex loadersMutex_
 
int expectedLoaders_
 

Detailed Description

Definition at line 99 of file PluginLoader.cc.

Member Function Documentation

void PreloadAggregator::expectLoaders ( int  count)
inline

Intended to be called by a PreloadThread before count subsequent calls to loaderReady(). May be called multiple times in which case the counts accumulate.

Parameters
countThe number of times the calling PreloadThread intents to call loaderReady().

Definition at line 112 of file PluginLoader.cc.

void PreloadAggregator::loaderReady ( QPluginLoader *  loader)
inline

Intended to be called by a PreloadThread.

Transfers ownership of the supplied loader to the PreloadAggregator.

Definition at line 123 of file PluginLoader.cc.

QPluginLoader* PreloadAggregator::waitForNextLoader ( )
inline

If there are still loaders expected, block until the next loader becomes available and return it.

Ownership of the returned object is transferred to the caller. (I.e. the caller has to delete it.)

Returns
Null if there are no more loaders expected. The next loader, otherwise.

Definition at line 141 of file PluginLoader.cc.


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