CMsgManager Class Reference

#include <msgqueue.h>

Public Member Functions

 CMsgManager ()
 ~CMsgManager ()
int Initialize (const unsigned int nMsg)
void Free (StrMsg *Msg)
StrMsgNew ()

Private Attributes

CRioFreeList m_FreeList
StrMsgm_Msg

Detailed Description

Definition at line 51 of file msgqueue.h.


Constructor & Destructor Documentation

CMsgManager::CMsgManager (  ) 

Definition at line 54 of file msgqueue.cpp.

00055 {
00056     m_Msg = 0;
00057 }

CMsgManager::~CMsgManager (  ) 

Definition at line 59 of file msgqueue.cpp.

00060 {
00061     if(m_Msg != 0)
00062     {
00063         delete[] m_Msg;
00064     }
00065 }


Member Function Documentation

void CMsgManager::Free ( StrMsg Msg  ) 

Definition at line 92 of file msgqueue.cpp.

00093 {
00094     m_FreeList.Free( (RioQueueEle*)Msg);
00095 }

int CMsgManager::Initialize ( const unsigned int  nMsg  ) 

Definition at line 68 of file msgqueue.cpp.

00069 {
00070     // In case was initialized before
00071     if(m_Msg != 0)
00072     {
00073         delete[] m_Msg;
00074     }
00075 
00076     m_Msg = new StrMsg[nMsg];
00077 
00078     if(m_Msg == 0)
00079         return ERROR_SS_MEMORY;
00080 
00081     for(int i= ((int)(nMsg))-1; i>=0; i--)
00082     {
00083         m_FreeList.Free((RioQueueEle*)&m_Msg[i]);
00084     }
00085 
00086     return (0);
00087 
00088 }

StrMsg * CMsgManager::New (  ) 

Definition at line 100 of file msgqueue.cpp.

00101 {
00102     return (StrMsg*) m_FreeList.Get();
00103 }


Field Documentation

Definition at line 60 of file msgqueue.h.

Definition at line 61 of file msgqueue.h.


The documentation for this class was generated from the following files:
Generated on Wed Jul 4 16:03:31 2012 for RIO by  doxygen 1.6.3