LRAUV  revA
LogQueue Class Reference

Singleton wrapper for queue. More...

#include <LogQueue.h>

Collaboration diagram for LogQueue:

Classes

class  StaticDestructor
 Makes sure that static objects are deleted on shutdown. More...
 

Public Member Functions

 ~LogQueue ()
 Destructor. More...
 
LogEntry * push (LogEntry *entry)
 Push onto write queue. More...
 
LogEntry * peek (void)
 Examine queue, but do not pop element. More...
 
LogEntry * pop (void)
 Pop out of read queue. More...
 
bool isEmpty (void)
 Is read queue empty? More...
 
 LogQueue ()
 

Static Public Member Functions

static LogQueue & Instance ()
 Function for accessing singleton. More...
 

Static Protected Member Functions

static void FlushQueues (bool andDelete=true)
 Swap the two queues. More...
 

Private Member Functions

void clear (bool andDelete=false)
 Clear either queue. More...
 

Private Attributes

LogEntryQueue queue_
 The actual queues for LogEntry. More...
 

Static Private Attributes

static LogQueue * Instance_
 Static instance of the singleton. More...
 
static LogQueue::StaticDestructor StaticDestructor_
 Static instance of StaticDestructor. More...
 

Detailed Description

Singleton wrapper for queue.

Constructor & Destructor Documentation

LogQueue::~LogQueue ( )

Destructor.

References clear().

LogQueue::LogQueue ( )

Referenced by Instance().

Member Function Documentation

void LogQueue::clear ( bool  andDelete = false)
private

Clear either queue.

Clear the read queue.

Clear either queue

References RingBufferVoid::isEmpty(), RingBuffer< T >::pop(), and queue_.

Referenced by FlushQueues(), and ~LogQueue().

void LogQueue::FlushQueues ( bool  andDelete = true)
staticprotected

Swap the two queues.

Just define not the current queue

References clear(), and Instance_.

LogQueue & LogQueue::Instance ( )
static

Function for accessing singleton.

Static singleton retrival function.

References Instance_, and LogQueue().

Referenced by Logger::log().

bool LogQueue::isEmpty ( void  )

Is read queue empty?

References RingBufferVoid::isEmpty(), and queue_.

Referenced by LogEngine::processQueue().

LogEntry * LogQueue::peek ( void  )

Examine queue, but do not pop element.

Sends a wake signal to the logger.

Examine queue, but do not pop element

References RingBuffer< T >::peek(), and queue_.

LogEntry * LogQueue::pop ( void  )

Pop out of read queue.

Pop out of queue.

References RingBuffer< T >::pop(), and queue_.

Referenced by LogEngine::processQueue().

LogEntry * LogQueue::push ( LogEntry *  entry)

Push onto write queue.

Push into queue.

References RingBuffer< T >::push(), and queue_.

Referenced by Logger::log().

Member Data Documentation

LogQueue * LogQueue::Instance_
staticprivate

Static instance of the singleton.

Referenced by FlushQueues(), Instance(), and LogQueue::StaticDestructor::~StaticDestructor().

LogEntryQueue LogQueue::queue_
private

The actual queues for LogEntry.

Referenced by clear(), isEmpty(), peek(), pop(), and push().

LogQueue::StaticDestructor LogQueue::StaticDestructor_
staticprivate

Static instance of StaticDestructor.


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