CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

edm::InitMsg Class Reference

#include <Messages.h>

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

List of all members.

Classes

struct  InitMsgHeader

Public Member Functions

void * data () const
int dataSize () const
int getDataSize () const
 InitMsg (void *buffer, int size, bool setcode=false)
 InitMsg (MsgCode &m)
int msgSize () const
void setDataSize (int s)

Private Attributes

int data_size_
InitMsgHeaderhead_

Detailed Description

Definition at line 257 of file Messages.h.


Constructor & Destructor Documentation

edm::InitMsg::InitMsg ( MsgCode m) [inline]

Definition at line 265 of file Messages.h.

References data_size_, and setDataSize().

                       :
      MsgCode(m),
      head_((InitMsgHeader*)MsgCode::payload()),
      data_size_(payloadSize() - sizeof(InitMsgHeader))
    { setDataSize(data_size_); }
edm::InitMsg::InitMsg ( void *  buffer,
int  size,
bool  setcode = false 
) [inline]

Definition at line 271 of file Messages.h.

References data_size_, getDataSize(), edm::MsgCode::INIT, edm::MsgCode::setCode(), and setDataSize().

                                                         :
      MsgCode(buffer,size),
      head_((InitMsgHeader*)MsgCode::payload()),
      data_size_(payloadSize() - sizeof(InitMsgHeader)) // default to full length
    {
      if(setcode)
        {
          // for new message
          setCode(MsgCode::INIT);
          setDataSize(data_size_);
        }
      else
        // for existing message
        data_size_ = getDataSize();
    }

Member Function Documentation

void* edm::InitMsg::data ( ) const [inline]

Definition at line 291 of file Messages.h.

References edm::MsgCode::payload().

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

{ return (char*)payload()+sizeof(InitMsgHeader); } 
int edm::InitMsg::dataSize ( ) const [inline]

Definition at line 292 of file Messages.h.

References edm::MsgCode::payloadSize().

{ return payloadSize() + sizeof(InitMsgHeader); }
int edm::InitMsg::getDataSize ( ) const [inline]
int edm::InitMsg::msgSize ( ) const [inline]

Definition at line 305 of file Messages.h.

References edm::MsgCode::codeSize(), and getDataSize().

    {
      return codeSize()+sizeof(InitMsgHeader)+getDataSize();
    }
void edm::InitMsg::setDataSize ( int  s) [inline]

Definition at line 299 of file Messages.h.

References edm::InitMsg::InitMsgHeader::data_size_, edm::encodeInt(), and head_.

Referenced by InitMsg().


Member Data Documentation

int edm::InitMsg::data_size_ [private]

Definition at line 312 of file Messages.h.

Referenced by InitMsg().

Definition at line 311 of file Messages.h.

Referenced by getDataSize(), and setDataSize().