|
Data Structures | |
| union | MqBufferAtomU |
| union used to set or modify native data from an MqBufferS object More... | |
| union | MqBufferU |
| a union for all data items supported by MqBufferS. More... | |
| struct | MqBufferS |
| defines an object to store generic (e.g mixed typed) data. More... | |
Defines | |
| #define | MQ_TYPE_IS_1_BYTE (1<<0) |
| the type is native and has a size of 1 byte | |
| #define | MQ_TYPE_IS_2_BYTE (1<<1) |
| the type is native and has a size of 2 bytes | |
| #define | MQ_TYPE_IS_4_BYTE (1<<2) |
| the type is native and has a size of 4 bytes | |
| #define | MQ_TYPE_IS_8_BYTE (1<<3) |
| the type is native and has a size of 8 bytes | |
| #define | MQ_TYPE_IS_NATIVE |
| the type is native | |
| #define | MQ_BLS_SIZE 50 |
| initial size of the MqBufferS:bls object | |
| #define | MQ_MqBufferS_SIGNATURE 0x6021139 |
Enumerations | |
| enum | MqTypeE { MQ_BYTT = (1<<4 | MQ_TYPE_IS_1_BYTE), MQ_BOLT = (2<<4 | MQ_TYPE_IS_1_BYTE), MQ_SRTT = (3<<4 | MQ_TYPE_IS_2_BYTE), MQ_INTT = (4<<4 | MQ_TYPE_IS_4_BYTE), MQ_FLTT = (5<<4 | MQ_TYPE_IS_4_BYTE), MQ_WIDT = (6<<4 | MQ_TYPE_IS_8_BYTE), MQ_DBLT = (7<<4 | MQ_TYPE_IS_8_BYTE), MQ_BINT = (8<<4 ), MQ_STRT = (9<<4 ), MQ_LSTT = (10<<4 ), MQ_RETT = (11<<4 ) } |
| a enum for all data types supported by MqBufferS More... | |
| enum | MqAllocE { MQ_ALLOC_STATIC = 0, MQ_ALLOC_DYNAMIC = 1 } |
| allocation style used for the data-segment in MqBufferS. More... | |
Functions | |
| MQ_EXTERN MQ_BYT | MqBufU2BYT (union MqBufferU bufU) |
| extract a MQ_BYT from a MqBufferS object | |
| MQ_EXTERN MQ_BOL | MqBufU2BOL (union MqBufferU bufU) |
| extract a MQ_BOL from a MqBufferS object | |
| MQ_EXTERN MQ_SRT | MqBufU2SRT (union MqBufferU bufU) |
| extract a MQ_SRT from a MqBufferS object | |
| MQ_EXTERN MQ_INT | MqBufU2INT (union MqBufferU bufU) |
| extract a MQ_INT from a MqBufferS object | |
| MQ_EXTERN MQ_FLT | MqBufU2FLT (union MqBufferU bufU) |
| extract a MQ_FLT from a MqBufferS object | |
| MQ_EXTERN MQ_WID | MqBufU2WID (union MqBufferU bufU) |
| extract a MQ_WID from a MqBufferS object | |
| MQ_EXTERN MQ_DBL | MqBufU2DBL (union MqBufferU bufU) |
| extract a MQ_DBL from a MqBufferS object | |
| MQ_EXTERN MQ_ATO | MqBufU2ATO (union MqBufferU bufU) |
| extract a MQ_ATO from a MqBufferS object | |
| MQ_EXTERN struct MqBufferS * | MqBufferCreate (struct MqS *const context, MQ_SIZE size) |
| create a new MqBufferS with size | |
| MQ_EXTERN void | MqBufferDelete (struct MqBufferS **const bufP) |
| delete a new MqBufferS | |
| MQ_EXTERN void | MqBufferReset (struct MqBufferS *const buf) |
| reset a MqBufferS to the length zero | |
| MQ_EXTERN struct MqBufferS * | MqBufferCopy (register struct MqBufferS *const dest, register struct MqBufferS const *const srce) |
| copy the MqBufferS from srce to dest | |
| MQ_EXTERN struct MqBufferS * | MqBufferDup (struct MqBufferS const *const srce) |
| create an new object as duplication of an existing object | |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateY (struct MqS *const context, MQ_BYT const val) |
| create and initialize a new MqBufferS object using native typed value | |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateO (struct MqS *const context, MQ_BOL const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateS (struct MqS *const context, MQ_SRT const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateI (struct MqS *const context, MQ_INT const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateF (struct MqS *const context, MQ_FLT const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateW (struct MqS *const context, MQ_WID const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateD (struct MqS *const context, MQ_DBL const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateC (struct MqS *const context, MQ_CST const val) |
| create and initialize an new MqBufferS object using an MQ_STR object | |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateB (struct MqS *const context, MQ_BINB const *const val, MQ_SIZE const len) |
| create and initialize an new MqBufferS object using an MQ_BIN object | |
| MQ_EXTERN struct MqBufferS * | MqBufferCreateU (struct MqS *const context, struct MqBufferS const *const val) |
| create and initialize an new MqBufferS object using an MQ_BUF object | |
| MQ_EXTERN enum MqErrorE | MqBufferGetY (struct MqBufferS *const buf, MQ_BYT *const valP) |
| read native typed value from an MQ_BUF object | |
| MQ_EXTERN enum MqErrorE | MqBufferGetO (struct MqBufferS *const buf, MQ_BOL *const valP) |
| MQ_EXTERN enum MqErrorE | MqBufferGetS (struct MqBufferS *const buf, MQ_SRT *const valP) |
| MQ_EXTERN enum MqErrorE | MqBufferGetI (struct MqBufferS *const buf, MQ_INT *const valP) |
| MQ_EXTERN enum MqErrorE | MqBufferGetF (struct MqBufferS *const buf, MQ_FLT *const valP) |
| MQ_EXTERN enum MqErrorE | MqBufferGetW (struct MqBufferS *const buf, MQ_WID *const valP) |
| MQ_EXTERN enum MqErrorE | MqBufferGetD (struct MqBufferS *const buf, MQ_DBL *const valP) |
| MQ_EXTERN enum MqErrorE | MqBufferGetB (struct MqBufferS *const buf, MQ_BIN *const out, MQ_SIZE *const size) |
| function to read an MQ_BIN from an MQ_BUF object | |
| MQ_EXTERN enum MqErrorE | MqBufferGetC (struct MqBufferS *const buf, MQ_CST *const out) |
| function to read an MQ_STR from an MQ_BUF object | |
| MQ_EXTERN char | MqBufferGetType (struct MqBufferS *const buf) |
| return the type from a MQ_BUF object | |
| MQ_EXTERN struct MqS * | MqBufferGetContext (struct MqBufferS *const buf) |
return the MqErrorS object from a MQ_BUF object | |
| MQ_EXTERN struct MqBufferS * | MqBufferSetY (struct MqBufferS *const buf, MQ_BYT const val) |
| set the MqBufferS object with a native typed value | |
| MQ_EXTERN struct MqBufferS * | MqBufferSetO (struct MqBufferS *const buf, MQ_BOL const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferSetS (struct MqBufferS *const buf, MQ_SRT const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferSetI (struct MqBufferS *const buf, MQ_INT const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferSetF (struct MqBufferS *const buf, MQ_FLT const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferSetW (struct MqBufferS *const buf, MQ_WID const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferSetD (struct MqBufferS *const buf, MQ_DBL const val) |
| MQ_EXTERN struct MqBufferS * | MqBufferSetC (struct MqBufferS *const buf, MQ_CST const in) |
| set the MqBufferS object with an MQ_STR object | |
| MQ_EXTERN struct MqBufferS * | MqBufferSetB (struct MqBufferS *const buf, MQ_BINB const *const in, MQ_SIZE const len) |
| set the MqBufferS object with an MQ_BIN object | |
| MQ_EXTERN struct MqBufferS * | MqBufferSetU (struct MqBufferS *const buf, struct MqBufferS const *const in) |
| set the MqBufferS object with an MQ_BUF object | |
| MQ_EXTERN struct MqBufferS * | MqBufferSetV (struct MqBufferS *const buf, MQ_CST const fmt,...) |
| set the MqBufferS to a vararg string with format | |
| MQ_EXTERN enum MqErrorE | MqBufferCastTo (struct MqBufferS *const buf, enum MqTypeE const type) |
| change the type of an MqBufferS object to type | |
| MQ_EXTERN MQ_SIZE | MqBufferAppendC (struct MqBufferS *const buf, MQ_CST const string) |
| append a single string to a MqBufferS | |
| MQ_EXTERN MQ_SIZE | MqBufferAppendVL (struct MqBufferS *const buf, MQ_CST const fmt, va_list var_list) |
| append a single string with format and var_list arguments to a MqBufferS | |
| MQ_EXTERN MQ_SIZE | MqBufferAppendV (struct MqBufferS *const buf, MQ_CST const fmt,...) |
| append a single string with format and ... arguments to a MqBufferS | |
| MQ_EXTERN MQ_SIZE | MqBufferPush (register struct MqBufferS *const buf, MQ_CST const string) |
| add str to the MqBufferS | |
| MQ_EXTERN MQ_SIZE | MqBufferPop (register struct MqBufferS *const buf, MQ_CST const string) |
| delete str from the MqBufferS | |
| MQ_EXTERN void | MqBufferLog (struct MqS const *const context, struct MqBufferS const *const buf, MQ_CST const prefix) |
| log the whole MqBufferS object to the stderr device | |
| MQ_EXTERN void | MqBufferLogS (struct MqS const *const context, struct MqBufferS const *const buf, MQ_CST const prefix) |
| log the short MqBufferS object data to the stderr device | |
The MqBufferS struct is used to store and manage MqTypeE typed data in a MqBufferU storage. If libmsgque is working on any kind of data it is working on MqBufferS objects or on a list of MqBufferS objects called MqBufferLS.
| #define MQ_BLS_SIZE 50 |
| #define MQ_TYPE_IS_1_BYTE (1<<0) |
| #define MQ_TYPE_IS_2_BYTE (1<<1) |
| #define MQ_TYPE_IS_4_BYTE (1<<2) |
| #define MQ_TYPE_IS_8_BYTE (1<<3) |
| #define MQ_TYPE_IS_NATIVE |
Value:
the type is native
| enum MqAllocE |
| enum MqTypeE |
a enum for all data types supported by MqBufferS
The type is a one byte character with the following syntax:
change the type of an MqBufferS object to type
| buf | the MqBufferS object to work on | |
| type | the type of on object from MqTypeE used in various functions and structs like MqBufferS::type |
| MQ_EXTERN struct MqBufferS* MqBufferCopy | ( | register struct MqBufferS *const | dest, | |
| register struct MqBufferS const *const | srce | |||
| ) | [read] |
copy the MqBufferS from srce to dest
| dest | target of the copy | |
| srce | source of the copy |
| the | dest object |
create a new MqBufferS with size
| [in] | context | the initial MqS object created by MqContextCreate |
| size | initial size of the buffer, if size = 0 the initial size is set to an default value |
| MQ_EXTERN struct MqBufferS* MqBufferCreateB | ( | struct MqS *const | context, | |
| MQ_BINB const *const | val, | |||
| MQ_SIZE const | len | |||
| ) | [read] |
create and initialize an new MqBufferS object using an MQ_BIN object
| [in] | context | the initial MqS object created by MqContextCreate |
| val | the MQ_BIN object | |
| len | the size of the MQ_BIN object |
create and initialize an new MqBufferS object using an MQ_STR object
| [in] | context | the initial MqS object created by MqContextCreate |
| val | the MQ_STR object |
create and initialize a new MqBufferS object using native typed value
| [in] | context | the initial MqS object created by MqContextCreate |
| [in] | val | the value to initialize the buffer to |
create and initialize a new MqBufferS object using native typed value
| [in] | context | the initial MqS object created by MqContextCreate |
| [in] | val | the value to initialize the buffer to |
create and initialize a new MqBufferS object using native typed value
| [in] | context | the initial MqS object created by MqContextCreate |
| [in] | val | the value to initialize the buffer to |
create and initialize a new MqBufferS object using native typed value
| [in] | context | the initial MqS object created by MqContextCreate |
| [in] | val | the value to initialize the buffer to |
create and initialize a new MqBufferS object using native typed value
| [in] | context | the initial MqS object created by MqContextCreate |
| [in] | val | the value to initialize the buffer to |
| MQ_EXTERN struct MqBufferS* MqBufferCreateU | ( | struct MqS *const | context, | |
| struct MqBufferS const *const | val | |||
| ) | [read] |
create and initialize an new MqBufferS object using an MQ_BUF object
| [in] | context | the initial MqS object created by MqContextCreate |
| val | the MQ_BUF object |
create and initialize a new MqBufferS object using native typed value
| [in] | context | the initial MqS object created by MqContextCreate |
| [in] | val | the value to initialize the buffer to |
create and initialize a new MqBufferS object using native typed value
| [in] | context | the initial MqS object created by MqContextCreate |
| [in] | val | the value to initialize the buffer to |
| MQ_EXTERN void MqBufferDelete | ( | struct MqBufferS **const | bufP | ) |
create an new object as duplication of an existing object
| srce | source of the duplication |
| the | new object |
| MQ_EXTERN enum MqErrorE MqBufferGetB | ( | struct MqBufferS *const | buf, | |
| MQ_BIN *const | out, | |||
| MQ_SIZE *const | size | |||
| ) |
function to read an MQ_BIN from an MQ_BUF object
| buf | the MqBufferS object to work on |
| out | the pointer to an MQ_BIN array object | |
| size | the size of the array the array pointer |
function to read an MQ_STR from an MQ_BUF object
| buf | the MqBufferS object to work on |
| out | the pointer to an MQ_STR object |
| MQ_EXTERN char MqBufferGetType | ( | struct MqBufferS *const | buf | ) |
| MQ_EXTERN void MqBufferLog | ( | struct MqS const *const | context, | |
| struct MqBufferS const *const | buf, | |||
| MQ_CST const | prefix | |||
| ) |
log the whole MqBufferS object to the stderr device
| [in] | context | the initial MqS object created by MqContextCreate |
| buf | the MqBufferS object to work on | |
| prefix | item to identify the output |
| MQ_EXTERN void MqBufferLogS | ( | struct MqS const *const | context, | |
| struct MqBufferS const *const | buf, | |||
| MQ_CST const | prefix | |||
| ) |
log the short MqBufferS object data to the stderr device
| [in] | context | the initial MqS object created by MqContextCreate |
| buf | the MqBufferS object to work on | |
| prefix | item to identify the output |
| MQ_EXTERN void MqBufferReset | ( | struct MqBufferS *const | buf | ) |
1.5.8