# MessageBuffer.hh File Reference

`#include "certi.hh"`
`#include <string>`

Go to the source code of this file.

## Namespaces
namespace | certi
## Classes
class | MessageBuffer
| MessageBuffer is a class managing a byte buffer for Message exchange. More...
## Defines
#define | DEFAULT_MESSAGE_BUFFER_SIZE 255
#define | DECLARE_SIGNED(type)
#define | DECLARE_SINGLE_READ_WRITE(type, suffix)
#define | write_bytes write_chars
#define | read_bytes read_chars
#define | write_byte write_char
#define | read_byte read_char

## Define Documentation

#define DECLARE_SIGNED | ( | type |  | ) |

Value:

    int32_t                     \
        write_##type##s(const type##_t* data, uint32_t n) {     \
        return write_u##type##s(reinterpret_cast<const u##type##_t*>(data),n);  \
    }                           \
    \
    int32_t                     \
    read_##type##s(type##_t* data, uint32_t n) {        \
        return read_u##type##s(reinterpret_cast<u##type##_t*>(data),n); \
    }                               \

Definition at line 149 of file MessageBuffer.hh.

#define DECLARE_SINGLE_READ_WRITE | ( | type,
|  | suffix |  | ) |

Value:

    int32_t                     \
        write_##type(const type##suffix data) {     \
        return write_##type##s(&data,1);    \
    }                           \
    \
    int32_t                     \
    read_##type(type##suffix* data) {       \
        return read_##type##s(data,1);  \
    }                                    \
    \
    type##suffix read_##type() {\
        type##suffix retval;     \
        read_##type##s(&retval,1);\
        return retval; \
    }

Definition at line 160 of file MessageBuffer.hh.

#define DEFAULT_MESSAGE_BUFFER_SIZE 255

Definition at line 27 of file MessageBuffer.hh.

Referenced by MessageBuffer::initialize(), MessageBuffer::MessageBuffer(), MessageBuffer::write_uint16s(), MessageBuffer::write_uint32s(), MessageBuffer::write_uint64s(), and MessageBuffer::write_uint8s().

#define read_byte read_char

Definition at line 202 of file MessageBuffer.hh.

#define read_bytes read_chars

Definition at line 200 of file MessageBuffer.hh.

#define write_byte write_char

Definition at line 201 of file MessageBuffer.hh.

#define write_bytes write_chars

Definition at line 199 of file MessageBuffer.hh.