|
VizKit
3.3.7
|
VisualThreadingManager holds identifiers for currently running threads. More...
#include <VisualThreadingManager.h>
Classes | |
| struct | ThreadItem |
| Adds a thread to the manager. More... | |
Public Types | |
| enum | VisualCriticalRegion { downloadQueueSingletonMutex = 0, downloadQueueAccessMutex = 1, addRequestDownloadQueueAccess = 2, stopRequestDownloadQueueAccess = 3, notificationQueueSingletonMutex = 4, notificationQueueAccessMutex = 5, inputNotificationQueueAccessMutex = 6, timeStoreSingletonMutex = 7, timeStoreAccessMutex = 8, currentTimeAccessMutex = 9, appProcAccessMutex = 10, appCookieAccessMutex = 11, appVersionAccessMutex = 12, visualizerAPIVersionAccessMutex = 13, trackPlayPositionAccessMutex = 14, audioDataTimestampIDAccessMutex = 15, audioMetaDataAccessMutex = 16, audioMetaDataHistoryIndexAccessMutex = 17, visualItemIdentifierAccessMutex = 18 } |
| Identifiers of critical regions in VizKit. More... | |
Static Public Member Functions | |
| static void | dispose (void) |
| Disposes the VisualThreadingManager. | |
| static bool | createThread (ThreadingFuncPtr aThreadingFuncPtr, void *param=NULL, VisualThreading::ThreadDidDieCallback callbackAfterThreadDidDie=NULL) |
| Creates a new thread by calling task function. | |
| static size_t | getNumberOfCurrentlyRunningThreads (void) |
| Returns the number of currently running threads. | |
| static void | update (void) |
| Updates the current internal statistics by asking for the status of registered threads. | |
| static void | enterCriticalSection (VisualCriticalRegion aCriticalSection) |
| Entering a critical section. | |
| static void | exitCriticalSection (VisualCriticalRegion aCriticalSection) |
| Exiting a critical section. | |
Private Types | |
| typedef std::vector< ThreadItem > | ThreadVector |
| An ThreadVector is a vector of running threads. | |
| typedef ThreadVector::iterator | ThreadVectorIterator |
| An ThreadVectorIterator is an iterator of a ThreadVector. | |
Private Member Functions | |
| VisualThreadingManager () | |
| The constructor. | |
| ~VisualThreadingManager () | |
| The destructor. | |
| VisualThreadingManager (const VisualThreadingManager &other) | |
| Copy constructor. | |
| VisualThreadingManager & | operator= (const VisualThreadingManager &other) |
| Assignment operator. | |
Static Private Member Functions | |
| static VisualThreadingManager * | getInstance (void) |
| Constructs a VisualThreadingManager. | |
Private Attributes | |
| ThreadVector | threadVector |
| The vector with the running threads. | |
| volatile bool | terminateAllThreads |
| Signal to stop all threads. | |
Static Private Attributes | |
| static VisualThreadingManager * | theVisualThreadingManager = NULL |
| VisualThreadingManager is a singleton class. | |
VisualThreadingManager holds identifiers for currently running threads.
typedef std::vector<ThreadItem> VizKit::VisualThreadingManager::ThreadVector [private] |
An ThreadVector is a vector of running threads.
typedef ThreadVector::iterator VizKit::VisualThreadingManager::ThreadVectorIterator [private] |
An ThreadVectorIterator is an iterator of a ThreadVector.
Identifiers of critical regions in VizKit.
| downloadQueueSingletonMutex |
VisualDownloadQueue initialization. |
| downloadQueueAccessMutex |
VisualDownloadQueue access or iteration. |
| addRequestDownloadQueueAccess |
Add to download queue. |
| stopRequestDownloadQueueAccess |
Remove from download queue. |
| notificationQueueSingletonMutex |
VisualNotificationQueue initialization. |
| notificationQueueAccessMutex |
VisualNotificationQueue access or iteration. |
| inputNotificationQueueAccessMutex |
VisualNotificationQueue access or iteration. |
| timeStoreSingletonMutex |
Initialization of VisualTiming. |
| timeStoreAccessMutex |
Access of or iteration over internal map of VisualTiming. |
| currentTimeAccessMutex |
Access of VisualTiming's currentTime variable. |
| appProcAccessMutex |
Access of app proc. |
| appCookieAccessMutex |
Access of app cookie. |
| appVersionAccessMutex |
Access of app version. |
| visualizerAPIVersionAccessMutex |
Access of visualizer API version. |
| trackPlayPositionAccessMutex |
Access of track play position. |
| audioDataTimestampIDAccessMutex |
Access of audio data timestamp id. |
| audioMetaDataAccessMutex |
Access of audio meta data. |
| audioMetaDataHistoryIndexAccessMutex |
Access of audio meta data history index. |
| visualItemIdentifierAccessMutex |
Access of visual item identifier. |
| VisualThreadingManager::VisualThreadingManager | ( | ) | [private] |
The constructor.
VisualThreadingManager is a singleton class. The constructor is private. New instance of class can only be created internally.
| VisualThreadingManager::~VisualThreadingManager | ( | ) | [private] |
The destructor.
VisualThreadingManager is a singleton class. The destructor is private. Instance of class can only be destructed internally.
| VizKit::VisualThreadingManager::VisualThreadingManager | ( | const VisualThreadingManager & | other | ) | [private] |
Copy constructor.
| other | Another VisualNetwork. |
| bool VisualThreadingManager::createThread | ( | ThreadingFuncPtr | aThreadingFuncPtr, |
| void * | param = NULL, |
||
| VisualThreading::ThreadDidDieCallback | callbackAfterThreadDidDie = NULL |
||
| ) | [static] |
Creates a new thread by calling task function.
| aThreadingFuncPtr | Pointer to function that should be started in new thread. |
| param | Optional name for function-thread. Useful for debugging purposes. |
| callbackAfterThreadDidDie | Callback that is called after the created thread did finished execution. |
| void VisualThreadingManager::dispose | ( | void | ) | [static] |
Disposes the VisualThreadingManager.
| void VisualThreadingManager::enterCriticalSection | ( | VisualCriticalRegion | aCriticalSection | ) | [static] |
Entering a critical section.
| aCriticalSection | Identifier of critical section / critical region. |
| void VisualThreadingManager::exitCriticalSection | ( | VisualCriticalRegion | aCriticalSection | ) | [static] |
Exiting a critical section.
| aCriticalSection | Identifier of critical section / critical region. |
| VisualThreadingManager * VisualThreadingManager::getInstance | ( | void | ) | [static, private] |
Constructs a VisualThreadingManager.
The VisualThreadingManager acts as a singleton. Returns a pointer to the initialised VisualThreadingManager.
| size_t VisualThreadingManager::getNumberOfCurrentlyRunningThreads | ( | void | ) | [static] |
Returns the number of currently running threads.
| VisualThreadingManager& VizKit::VisualThreadingManager::operator= | ( | const VisualThreadingManager & | other | ) | [private] |
Assignment operator.
| void VisualThreadingManager::update | ( | void | ) | [static] |
Updates the current internal statistics by asking for the status of registered threads.
volatile bool VizKit::VisualThreadingManager::terminateAllThreads [private] |
Signal to stop all threads.
VisualThreadingManager * VisualThreadingManager::theVisualThreadingManager = NULL [static, private] |
VisualThreadingManager is a singleton class.
Pointer to private instance is handled internally.
The vector with the running threads.