CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

edm::MsgCode Class Reference

#include <Messages.h>

Inheritance diagram for edm::MsgCode:
edm::EventMsg edm::InitMsg

List of all members.

Public Types

enum  Codes { INVALID = 0, INIT = 1, EVENT = 2, DONE = 3 }

Public Member Functions

int codeSize () const
Codes getCode () const
 MsgCode (void *buffer)
 MsgCode (void *buffer, int size, Codes c)
 MsgCode (void *buffer, int size)
 MsgCode (void *buffer, Codes c)
void * payload () const
int payloadSize () const
void setCode (Codes c)
int totalSize () const

Private Attributes

unsigned char * buffer_
int size_

Detailed Description

Definition at line 55 of file Messages.h.


Member Enumeration Documentation

Enumerator:
INVALID 
INIT 
EVENT 
DONE 

Definition at line 58 of file Messages.h.

{ INVALID = 0, INIT = 1, EVENT = 2, DONE = 3 };

Constructor & Destructor Documentation

edm::MsgCode::MsgCode ( void *  buffer,
int  size 
) [inline]

Definition at line 64 of file Messages.h.

References size_.

                                   :
      buffer_((unsigned char*)buffer),size_(size<4?0:size-4)
    { assert(size_>=0); } 
edm::MsgCode::MsgCode ( void *  buffer) [inline, explicit]

Definition at line 69 of file Messages.h.

                                  :
      buffer_((unsigned char*)buffer),size_(0)
    { } 
edm::MsgCode::MsgCode ( void *  buffer,
Codes  c 
) [inline]

Definition at line 74 of file Messages.h.

References setCode().

                                  :
      buffer_((unsigned char*)buffer),size_(0)
    { setCode(c); }
edm::MsgCode::MsgCode ( void *  buffer,
int  size,
Codes  c 
) [inline]

Definition at line 79 of file Messages.h.

References setCode().

                                            :
      buffer_((unsigned char*)buffer),size_(size-4)
    { setCode(c); }

Member Function Documentation

int edm::MsgCode::codeSize ( ) const [inline]

Definition at line 96 of file Messages.h.

Referenced by edm::InitMsg::msgSize(), and edm::EventMsg::msgSize().

{ return 4; }
Codes edm::MsgCode::getCode ( ) const [inline]

Definition at line 88 of file Messages.h.

References buffer_, and edm::decodeInt().

Referenced by edm::JobHeaderDecoder::decodeJobHeader().

    {
      return (Codes)decodeInt(buffer_);
    }
void* edm::MsgCode::payload ( ) const [inline]

Definition at line 94 of file Messages.h.

References buffer_.

Referenced by edm::EventMsg::data(), and edm::InitMsg::data().

{ return &buffer_[4]; }
int edm::MsgCode::payloadSize ( ) const [inline]

Definition at line 95 of file Messages.h.

References size_.

Referenced by edm::InitMsg::dataSize().

{ return size_; }
void edm::MsgCode::setCode ( Codes  c) [inline]

Definition at line 83 of file Messages.h.

References buffer_, and edm::encodeInt().

Referenced by edm::EventMsg::EventMsg(), edm::InitMsg::InitMsg(), and MsgCode().

int edm::MsgCode::totalSize ( ) const [inline]

Definition at line 97 of file Messages.h.

References size_.

{ return size_+4; }

Member Data Documentation

unsigned char* edm::MsgCode::buffer_ [private]

Definition at line 100 of file Messages.h.

Referenced by getCode(), payload(), and setCode().

int edm::MsgCode::size_ [private]

Definition at line 101 of file Messages.h.

Referenced by MsgCode(), payloadSize(), and totalSize().