Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

OI_REPLY_QUEUE Class Reference

#include <oi_msg.hh>

Collaboration diagram for OI_REPLY_QUEUE:

Collaboration graph
[legend]

Public Methods

 OI_REPLY_QUEUE ()
 ~OI_REPLY_QUEUE ()
void add_message (RCS_OI_REPLY_MSG *_msg)
RCS_OI_REPLY_MSGget_message ()
void flush ()

Private Attributes

OI_REPLY_QUEUE_NODEhead
OI_REPLY_QUEUE_NODEtail

Constructor & Destructor Documentation

OI_REPLY_QUEUE::OI_REPLY_QUEUE  
 

Definition at line 134 of file oi_msg.cc.

00135 {
00136   head = NULL;
00137   tail = NULL;
00138 }

OI_REPLY_QUEUE::~OI_REPLY_QUEUE  
 

Definition at line 140 of file oi_msg.cc.

00141 {
00142   flush ();
00143 }


Member Function Documentation

void OI_REPLY_QUEUE::add_message RCS_OI_REPLY_MSG   _msg
 

Definition at line 147 of file oi_msg.cc.

00148 {
00149   OI_REPLY_QUEUE_NODE *new_reply_node;
00150 
00151   new_reply_node = new OI_REPLY_QUEUE_NODE (_msg);
00152 
00153   if (NULL == head)
00154     {
00155       head = new_reply_node;
00156     }
00157   if (NULL != tail)
00158     {
00159       tail->next = new_reply_node;
00160       tail = new_reply_node;
00161     }
00162   else
00163     {
00164       tail = new_reply_node;
00165     }
00166 }

RCS_OI_REPLY_MSG * OI_REPLY_QUEUE::get_message  
 

Definition at line 171 of file oi_msg.cc.

00172 {
00173   RCS_OI_REPLY_MSG *return_msg;
00174   OI_REPLY_QUEUE_NODE *first_reply_node;
00175 
00176   if (NULL != head)
00177     {
00178       return_msg = head->msg;
00179       first_reply_node = head;
00180       head = head->next;
00181       delete first_reply_node;
00182       return return_msg;
00183     }
00184   return NULL;
00185 }

void OI_REPLY_QUEUE::flush  
 

Definition at line 189 of file oi_msg.cc.

Referenced by ~OI_REPLY_QUEUE().

00190 {
00191   OI_REPLY_QUEUE_NODE *temp;
00192   while (NULL != head)
00193     {
00194       delete head->msg;
00195       head->msg = NULL;
00196       temp = head;
00197       head = head->next;
00198       delete temp;
00199     }
00200   tail = NULL;
00201 }


Field Documentation

OI_REPLY_QUEUE_NODE* OI_REPLY_QUEUE::head [private]
 

Definition at line 81 of file oi_msg.hh.

OI_REPLY_QUEUE_NODE* OI_REPLY_QUEUE::tail [private]
 

Definition at line 82 of file oi_msg.hh.


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 15:59:03 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001