CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

evf::MsgBuf Class Reference

#include <MsgBuf.h>

List of all members.

Public Member Functions

 MsgBuf ()
 MsgBuf (unsigned int size, unsigned int type)
size_t msize ()
msgbuf * operator-> ()
virtual ~MsgBuf ()

Private Attributes

unsigned char * buf
size_t msize_
struct msgbuf * ptr_

Friends

class MasterQueue
class SlaveQueue

Detailed Description

Definition at line 9 of file MsgBuf.h.


Constructor & Destructor Documentation

evf::MsgBuf::MsgBuf ( ) [inline]

Definition at line 11 of file MsgBuf.h.

References buf, MAX_MSG_SIZE, MSQM_MESSAGE_TYPE_NOP, and ptr_.

             : msize_(MAX_MSG_SIZE+sizeof(struct msgbuf)+1)
      {
        buf = new unsigned char[MAX_MSG_SIZE+sizeof(struct msgbuf)+1];
        ptr_ = (msgbuf*)buf;
        ptr_->mtype = MSQM_MESSAGE_TYPE_NOP;
      }
evf::MsgBuf::MsgBuf ( unsigned int  size,
unsigned int  type 
) [inline]

Definition at line 18 of file MsgBuf.h.

References buf, msize_, and ptr_.

                                                 : msize_(size)
      {
        buf = new unsigned char[msize_+sizeof(struct msgbuf)+1];
        ptr_ = (msgbuf*)buf;
        ptr_->mtype = type;
      }
virtual evf::MsgBuf::~MsgBuf ( ) [inline, virtual]

Definition at line 25 of file MsgBuf.h.

References buf.

{delete[] buf;}

Member Function Documentation

size_t evf::MsgBuf::msize ( ) [inline]
msgbuf* evf::MsgBuf::operator-> ( ) [inline]

Definition at line 26 of file MsgBuf.h.

References ptr_.

{return ptr_;}

Friends And Related Function Documentation

friend class MasterQueue [friend]

Definition at line 31 of file MsgBuf.h.

friend class SlaveQueue [friend]

Definition at line 32 of file MsgBuf.h.


Member Data Documentation

unsigned char* evf::MsgBuf::buf [private]

Definition at line 29 of file MsgBuf.h.

Referenced by MsgBuf(), and ~MsgBuf().

size_t evf::MsgBuf::msize_ [private]

Definition at line 30 of file MsgBuf.h.

Referenced by MsgBuf(), and msize().

struct msgbuf* evf::MsgBuf::ptr_ [private]