xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Graphics::QueueManager Class Reference

The graphics queue manager. More...

#include <queueman.h>

Inheritance diagram for Graphics::QueueManager:
Inheritance graph
[legend]
Collaboration diagram for Graphics::QueueManager:
Collaboration graph
[legend]

Public Member Functions

 QueueManager ()
 
 ~QueueManager ()
 
bool isQueueEmpty (QueueType queue)
 
void lockQueue (QueueType queue)
 
void unlockQueue (QueueType queue)
 
const std::list< Queueable * > & getQueue (QueueType queue) const
 
void sortQueue (QueueType queue)
 
void clearQueue (QueueType queue)
 
void clearAllQueues ()
 

Private Member Functions

std::list< Queueable * >::iterator addToQueue (QueueType queue, Queueable &q)
 
void removeFromQueue (QueueType queue, const std::list< Queueable *>::iterator &ref)
 

Private Attributes

Common::Mutex _queueMutex [kQueueMAX]
 
std::list< Queueable * > _queue [kQueueMAX]
 

Friends

class Queueable
 

Additional Inherited Members

- Static Public Member Functions inherited from Common::Singleton< QueueManager >
static QueueManager & instance ()
 
static void destroy ()
 
- Protected Types inherited from Common::Singleton< QueueManager >
typedef QueueManager SingletonBaseType
 
- Protected Member Functions inherited from Common::Singleton< QueueManager >
 Singleton ()
 
virtual ~Singleton ()
 

Detailed Description

The graphics queue manager.

Definition at line 41 of file queueman.h.

Constructor & Destructor Documentation

◆ QueueManager()

Graphics::QueueManager::QueueManager ( )

Definition at line 37 of file queueman.cpp.

◆ ~QueueManager()

Graphics::QueueManager::~QueueManager ( )

Definition at line 40 of file queueman.cpp.

References clearAllQueues().

Here is the call graph for this function:

Member Function Documentation

◆ addToQueue()

std::list< Queueable * >::iterator Graphics::QueueManager::addToQueue ( QueueType  queue,
Queueable q 
)
private

Definition at line 70 of file queueman.cpp.

References _queue, lockQueue(), and unlockQueue().

Here is the call graph for this function:

◆ clearAllQueues()

void Graphics::QueueManager::clearAllQueues ( )

Definition at line 103 of file queueman.cpp.

References clearQueue(), and Graphics::kQueueMAX.

Referenced by ~QueueManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearQueue()

void Graphics::QueueManager::clearQueue ( QueueType  queue)

Definition at line 91 of file queueman.cpp.

References _queue, lockQueue(), and unlockQueue().

Referenced by clearAllQueues().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getQueue()

const std::list< Queueable * > & Graphics::QueueManager::getQueue ( QueueType  queue) const

Definition at line 58 of file queueman.cpp.

References _queue.

◆ isQueueEmpty()

bool Graphics::QueueManager::isQueueEmpty ( QueueType  queue)

Definition at line 52 of file queueman.cpp.

References _queue, and _queueMutex.

◆ lockQueue()

void Graphics::QueueManager::lockQueue ( QueueType  queue)

Definition at line 44 of file queueman.cpp.

References _queueMutex, and Common::Mutex::lock().

Referenced by addToQueue(), clearQueue(), removeFromQueue(), and sortQueue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeFromQueue()

void Graphics::QueueManager::removeFromQueue ( QueueType  queue,
const std::list< Queueable *>::iterator &  ref 
)
private

Definition at line 81 of file queueman.cpp.

References _queue, lockQueue(), and unlockQueue().

Here is the call graph for this function:

◆ sortQueue()

void Graphics::QueueManager::sortQueue ( QueueType  queue)

Definition at line 62 of file queueman.cpp.

References _queue, lockQueue(), Graphics::queueComp(), and unlockQueue().

Here is the call graph for this function:

◆ unlockQueue()

void Graphics::QueueManager::unlockQueue ( QueueType  queue)

Definition at line 48 of file queueman.cpp.

References _queueMutex, and Common::Mutex::unlock().

Referenced by addToQueue(), clearQueue(), removeFromQueue(), and sortQueue().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Queueable

friend class Queueable
friend

Definition at line 65 of file queueman.h.

Member Data Documentation

◆ _queue

std::list<Queueable *> Graphics::QueueManager::_queue[kQueueMAX]
private

Definition at line 60 of file queueman.h.

Referenced by addToQueue(), clearQueue(), getQueue(), isQueueEmpty(), removeFromQueue(), and sortQueue().

◆ _queueMutex

Common::Mutex Graphics::QueueManager::_queueMutex[kQueueMAX]
private

Definition at line 59 of file queueman.h.

Referenced by isQueueEmpty(), lockQueue(), and unlockQueue().


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