Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

MqBufferS Get API
[MqBufferS API]

get the data of type MqTypeE from a MqBufferS object. More...

Defines

#define MqGetError(expr, buf)   if ((expr) && MqErrorGetStatus(buf->error) == MQ_ERROR) goto error
 work on expr and jump to label error on error
#define MqGet2(buf, size)   (buf->type == _MQ_BIN || buf->type == _MQ_INT2 ? *buf->cur.I2 : MqGet2F(buf,size))
 get a MQ_INT2 form a MqBufferS object (fast)
#define MqGet2Error(buf, size, ret)   MqGetError((ret=MqGet2(buf,size))==MQ_NULL_2,buf)
 get a MQ_INT2 form a MqBufferS object with error-check
#define MqGetU2Error(buf, size, ret)   MqGetError((ret=MqGetU2(buf,size))==MQ_NULL_U2,buf)
 get a MQ_INT2 form a MqBufferS object with error-check
#define MqGet4T(type, buf, size)   (type == _MQ_BIN || type == _MQ_INT4 ? *buf->cur.I4 : MqGet4F(buf,size))
 get a MQ_INT4 from a MqBufferS object (fast) with type-speedup
#define MqGet4(buf, size)   MqGet4T(buf->type,buf,size)
 get a MQ_INT4 from a MqBufferS object (fast)
#define MqGet4Error(buf, size, ret)   MqGetError((ret=MqGet4(buf,size))==MQ_NULL_4,buf)
 get a MQ_INT4 from a MqBufferS object with error-check
#define MqGet4TError(type, buf, size, ret)   MqGetError((ret=MqGet4T(type,buf,size))==MQ_NULL_4,buf)
 get a MQ_INT4 from a MqBufferS object with error-check and type-speedup
#define MqGet8(buf, size)   (buf->type == _MQ_BIN || buf->type == _MQ_INT8 ? *buf->cur.I8 : MqGet8F(buf,size))
 get a MQ_INT8 from a MqBufferS object (fast)
#define MqGet8Error(buf, size, ret)   MqGetError((ret=MqGet8(buf,size))==MQ_NULL_8,buf)
 get a MQ_INT8 from a MqBufferS object with error-check
#define MqGetF(buf, size)   (buf->type == _MQ_BIN || buf->type == _MQ_FLT4 ? *buf->cur.F : MqGetFF(buf,size))
 get a MQ_FLT4 from a MqBufferS object (fast)
#define MqGetFError(buf, size, ret)   MqGetError((ret=MqGetF(buf,size))==MQ_NULL_F,buf)
 get a MQ_FLT4 from a MqBufferS object with error-check
#define MqGetD(buf, size)   (buf->type == _MQ_BIN || buf->type == _MQ_FLT8 ? *buf->cur.D : MqGetDF(buf,size))
 get a MQ_FLT8 from a MqBufferS object (fast)
#define MqGetDError(buf, size, ret)   MqGetError((ret=MqGetD(buf,size))==MQ_NULL_D,buf)
 get a MQ_FLT8 from a MqBufferS object with error-check
#define MqGetPT(type, buf, size)   (type == _MQ_BIN || type == _MQ_PTR ? *buf->cur.P : MqGetPF(buf,size))
 get a MQ_PTR from a MqBufferS object (fast) with type-speedup
#define MqGetP(buf, size)   MqGetPT(buf->type,buf,size)
 get a MQ_PTR from a MqBufferS object (fast)
#define MqGetPError(buf, size, ret)   MqGetError((ret=MqGetP(buf,size))==MQ_NULL_P,buf)
 get a MQ_PTR from a MqBufferS object with error-check
#define MqGetPTError(type, buf, size, ret)   MqGetError((ret=MqGetPT(type,buf,size))==MQ_NULL_P,buf)
 get a MQ_PTR from a MqBufferS object with error-check and type-speedup
#define MqGetCError(buf, size, ret)   MqGetError((ret=MqGetC(buf,size))==MQ_NULL_C,buf)
 get a MQ_STR from a MqBufferS object with error-check
Attention:
the return string is using temporary memory


Functions

MQ_EXTERN MQ_INT2 MqGet2F (MqBufferSP const buf, const MQ_SIZE size)
 get a MQ_INT2 from a MqBufferS object (slow)
MQ_EXTERN MQ_UINT2 MqGetU2 (MqBufferSP const buf, const MQ_SIZE size)
 get a MQ_UINT2 from a MqBufferS object (slow)
MQ_EXTERN MQ_INT4 MqGet4F (MqBufferSP const buf, const MQ_SIZE size)
 get a MQ_INT4 from a MqBufferS object (slow)
MQ_EXTERN MQ_INT8 MqGet8F (MqBufferSP const buf, const MQ_SIZE size)
 get a MQ_INT8 from a MqBufferS object (slow)
MQ_EXTERN MQ_FLT4 MqGetFF (MqBufferSP const buf, const MQ_SIZE size)
 get a MQ_FLT4 from a MqBufferS object (slow)
MQ_EXTERN MQ_FLT8 MqGetDF (MqBufferSP const buf, const MQ_SIZE size)
 get a MQ_FLT8 from a MqBufferS object (slow)
MQ_EXTERN MQ_PTR MqGetPF (MqBufferSP const buf, const MQ_SIZE size)
 get a MQ_PTR from a MqBufferS object (slow)
MQ_EXTERN MQ_STR MqGetC (MqBufferSP const buf, const int size)
 get a MQ_STR from a MqBufferS object
Attention:
the return string is using temporary memory


Detailed Description

get the data of type MqTypeE from a MqBufferS object.

if necessary a cast is done but the MqBufferS object will be unchanged. if the type member of MqBufferS is of type _MQ_BIN (e.g. binary) no cast will be done (e.g. the type is always right). for speedup and error handling up to 5 different flavours are used:

  1. MqGetXF: always check for casting (slow)
  2. MqGetX: check for _MQ_BIN or _MQ_XXX type and, if possible, do a direct read (fast)
  3. MqGetXT: same as MqGetX but use an external type argument (faster)
  4. MqGet4Error: same as MqGetX plus additional error checking
  5. MqGet4TError: same as MqGetXT plus additional error checking

Generated on Tue Nov 23 16:13:06 2004 for libFreiburg by  doxygen 1.3.8-20040928