#include <MsgQueue.h>
Public Member Functions | |
CMsgQueue () | |
CMsgQueue. | |
~CMsgQueue () | |
CMsgQueue. | |
CMessage * | Pop_Front () |
Pop_Front. | |
void | Push_Back (const CMessage *pMsg) |
Push_Back. | |
bool | Empty () const |
Empty. | |
void | CleanUp () |
CleanUp. |
Description: The CMsgQueue is a safe list that can be used by applications that require object created in dll files to add and remove items from a list. The CMsgQueue class does not immediately delete the internal nodes and other memory associated with the list when an item is removed from the queue. The memory can be safely removed later by calling CleanUp from the Dll or from the application.
Limitations: Whoever pushes messages into the queue is responsible for calling the cleanup function. If the messages are pushed by an object allocated in a dll file, some object from the dll file must call CleanUp. If this constraint is not satisfied, memory exceptions will occur!
|
CMsgQueue. Description: This constructor initializes internal class variables.
|
|
CMsgQueue. Description: This destructor has been included for maintenance purposes only.
|
|
CleanUp. Description: Frees all memory associated with popped items that were "scheduled" for deletion.
|
|
Empty. Description: This function checks whether or not the queue is empty.
|
|
Pop_Front. Description: Retrieves a message from the message queue. The retrieved message is popped from the top of the list.
|
|
Push_Back. Description: This function adds a COPY of the message to the message queue. The orignal message can be deleted if desired.
|