QueuePointer Class Reference

An autopointer for the message queue. More...

#include <message.h>

Collaboration diagram for QueuePointer:
Collaboration graph

Detailed Description

An autopointer for the message queue.

Using an autopointer allows the queue to be released by the client and still exist until no drivers have messages relating to the queue still pending.

Public Member Functions

 QueuePointer ()
 Create a NULL autopointer;.
 
 QueuePointer (bool _Replace, size_t _Maxlen)
 Create an empty message queue and an auto pointer to it.
 
 ~QueuePointer ()
 Destroy our reference to the message queue.
 
 QueuePointer (const QueuePointer &CopyFrom)
 Create a new reference to a message queue.
 
QueuePointeroperator= (const QueuePointer &rhs)
 assign reference to our message queue
 
MessageQueueoperator-> ()
 retrieve underlying object for use
 
MessageQueueget () const
 retrieve underlying object for use, may return a null pointer
 
MessageQueueoperator* ()
 retrieve underlying object for use
 
bool operator== (const QueuePointer &rhs)
 check if pointers are equal
 
bool operator== (void *pointer)
 check if pointers are equal
 
bool operator!= (const QueuePointer &rhs)
 check if pointers are equal
 
bool operator!= (void *pointer)
 check if pointers are equal
 

Private Member Functions

void DecRef ()
 Decrement ref count.
 

Private Attributes

MessageQueueQueue
 The queue we are pointing to.
 
unsigned int * RefCount
 Reference count.
 
pthread_mutex_t * Lock
 Used to lock access to refcount.
 

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