nlib
|
Defines various static member functions for directly writing MessagePack into memory. More...
#include "nn/nlib/msgpack/MpDirectWriter.h"
Static Public Member Functions | |
static nlib_byte_t * | WriteUint8 (nlib_byte_t *p, nlib_byte_t *pend, uint8_t val) noexcept |
Writes two-byte data that starts with 0xcc. More... | |
static nlib_byte_t * | WriteUint16 (nlib_byte_t *p, nlib_byte_t *pend, uint16_t val) noexcept |
Writes three-byte data that starts with 0xcd. More... | |
static nlib_byte_t * | WriteUint32 (nlib_byte_t *p, nlib_byte_t *pend, uint32_t val) noexcept |
Writes five-byte data that starts with 0xce. More... | |
static nlib_byte_t * | WriteUint64 (nlib_byte_t *p, nlib_byte_t *pend, uint64_t val) noexcept |
Writes nine-byte data that starts with 0xcf. More... | |
static nlib_byte_t * | WriteInt8 (nlib_byte_t *p, nlib_byte_t *pend, int8_t val) noexcept |
Writes two-byte data that starts with 0xd0. More... | |
static nlib_byte_t * | WriteInt16 (nlib_byte_t *p, nlib_byte_t *pend, int16_t val) noexcept |
Writes three-byte data that starts with 0xd1. More... | |
static nlib_byte_t * | WriteInt32 (nlib_byte_t *p, nlib_byte_t *pend, int32_t val) noexcept |
Writes five-byte data that starts with 0xd2. More... | |
static nlib_byte_t * | WriteInt64 (nlib_byte_t *p, nlib_byte_t *pend, int64_t val) noexcept |
Writes nine-byte data that starts with 0xd3. More... | |
static nlib_byte_t * | WriteNil (nlib_byte_t *p, nlib_byte_t *pend) noexcept |
Writes 0xc0. More... | |
static nlib_byte_t * | WriteBoolean (nlib_byte_t *p, nlib_byte_t *pend, bool val) noexcept |
Writes 0xc2 (if true ) or 0xc3 (if false ). More... | |
static nlib_byte_t * | WriteFloat (nlib_byte_t *p, nlib_byte_t *pend, float val) noexcept |
Writes five-byte data that starts with 0xca. More... | |
static nlib_byte_t * | WriteDouble (nlib_byte_t *p, nlib_byte_t *pend, double val) noexcept |
Writes nine-byte data that starts with 0xcb. More... | |
static nlib_byte_t * | WriteString (nlib_byte_t *p, nlib_byte_t *pend, const char *str, uint32_t len) noexcept |
Writes data according to the string length. More... | |
static nlib_byte_t * | WriteString (nlib_byte_t *p, nlib_byte_t *pend, const char *str) noexcept |
A parameter omitted version of the above function which receives a null terminated string. | |
static nlib_byte_t * | WriteStringHeader (nlib_byte_t *p, nlib_byte_t *pend, uint32_t len) noexcept |
Data according to the string length is written, but the string itself is not written. More... | |
static nlib_byte_t * | WriteBin (nlib_byte_t *p, nlib_byte_t *pend, const nlib_byte_t *bin, uint32_t n) noexcept |
Writes binary data according to the data size. More... | |
static nlib_byte_t * | WriteBinHeader (nlib_byte_t *p, nlib_byte_t *pend, uint32_t n) noexcept |
Data according to the binary data size is written, but the binary data itself is not written. More... | |
static nlib_byte_t * | WriteExt (nlib_byte_t *p, nlib_byte_t *pend, int8_t type, const nlib_byte_t *data, uint32_t n) noexcept |
Writes data according to the data size. More... | |
static nlib_byte_t * | WriteExtHeader (nlib_byte_t *p, nlib_byte_t *pend, int8_t type, uint32_t n) noexcept |
Data according to the data size is written, but the data itself is not written. More... | |
static nlib_byte_t * | WriteArrayHeader (nlib_byte_t *p, nlib_byte_t *pend, uint32_t count) noexcept |
Writes data according to the number of elements in the array. More... | |
static nlib_byte_t * | WriteMapHeader (nlib_byte_t *p, nlib_byte_t *pend, uint32_t count) noexcept |
Writes data according to the number of elements in the array. More... | |
static nlib_byte_t * | WriteUnsignedInt (nlib_byte_t *p, nlib_byte_t *pend, uint8_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to two bytes. More... | |
static nlib_byte_t * | WriteUnsignedInt (nlib_byte_t *p, nlib_byte_t *pend, uint16_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to three bytes. More... | |
static nlib_byte_t * | WriteUnsignedInt (nlib_byte_t *p, nlib_byte_t *pend, uint32_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to five bytes. More... | |
static nlib_byte_t * | WriteUnsignedInt (nlib_byte_t *p, nlib_byte_t *pend, uint64_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to nine bytes. More... | |
static nlib_byte_t * | WriteInt (nlib_byte_t *p, nlib_byte_t *pend, int8_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to two bytes. More... | |
static nlib_byte_t * | WriteInt (nlib_byte_t *p, nlib_byte_t *pend, int16_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to three bytes. More... | |
static nlib_byte_t * | WriteInt (nlib_byte_t *p, nlib_byte_t *pend, int32_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to five bytes. More... | |
static nlib_byte_t * | WriteInt (nlib_byte_t *p, nlib_byte_t *pend, int64_t val) noexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to nine bytes. More... | |
static nlib_byte_t * | WriteTimestamp (nlib_byte_t *p, nlib_byte_t *pend, int64_t sec, uint32_t nsec) noexcept |
Encodes the provided time data into data with the minimum length. Writes data of a size up to 15 bytes. More... | |
static nlib_byte_t * | WriteTimestamp (nlib_byte_t *p, nlib_byte_t *pend, nlib_time val) noexcept |
Encodes the provided time data into data with the minimum length. Writes data of a size up to 15 bytes. More... | |
Defines various static member functions for directly writing MessagePack into memory.
Definition at line 23 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes data according to the number of elements in the array.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | count | Number of elements in the array. |
NULL
if the area size is insufficient for data to be written.5 + n
bytes is written. The user must write n elements in the array after executing this function. Definition at line 397 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes binary data according to the data size.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | bin | Binary data. |
[in] | n | Data size. |
NULL
if the area size is insufficient for data to be written.5 + n
bytes is written. Definition at line 265 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Data according to the binary data size is written, but the binary data itself is not written.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | n | Data size. |
NULL
if the area size is insufficient for data to be written.Definition at line 247 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes 0xc2 (if true
) or 0xc3 (if false
).
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 163 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes nine-byte data that starts with 0xcb.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 181 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes data according to the data size.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | type | Data type. |
[in] | data | Data. |
[in] | n | Data size. |
NULL
if the area size is insufficient for data to be written.6 + n
bytes is written. Definition at line 337 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Data according to the data size is written, but the data itself is not written.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | type | Data type. |
[in] | n | Data size. |
NULL
if the area size is insufficient for data to be written.Definition at line 287 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes five-byte data that starts with 0xca.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 169 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to two bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 479 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to three bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 489 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to five bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 505 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to nine bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 525 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes three-byte data that starts with 0xd1.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 136 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes five-byte data that starts with 0xd2.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 143 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes nine-byte data that starts with 0xd3.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 150 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes two-byte data that starts with 0xd0.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 129 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes data according to the number of elements in the array.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | count | Number of elements (pairs of a key and value) in the map. |
NULL
if the area size is insufficient for data to be written.5 + n
bytes is written. The user must write 2 * n
elements (n pairs of a key and value) after executing this function. Definition at line 415 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes 0xc0.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
NULL
if the area size is insufficient for data to be written. Definition at line 157 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes data according to the string length.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | str | The string to be serialized. |
[in] | len | Specifies the string length. |
NULL
if the area size is insufficient for data to be written.5 + len
bytes is written. Definition at line 215 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Data according to the string length is written, but the string itself is not written.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | len | Specifies the string length. |
NULL
if the area size is insufficient for data to be written.Definition at line 193 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided time data into data with the minimum length. Writes data of a size up to 15 bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | sec | The integer part (in seconds) of the time elapsed from 1970-01-01. |
[in] | nsec | The decimal part (in nanoseconds) of the time elapsed from 1970-01-01. |
NULL
if the area size is insufficient for data to be written. Definition at line 536 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided time data into data with the minimum length. Writes data of a size up to 15 bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The time data to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 566 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes three-byte data that starts with 0xcd.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 108 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes five-byte data that starts with 0xce.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 115 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes nine-byte data that starts with 0xcf.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 122 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Writes two-byte data that starts with 0xcc.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written.Definition at line 100 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to two bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 433 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to three bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 443 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to five bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 455 of file MpDirectWriter.h.
|
inlinestaticnoexcept |
Encodes the provided numerical data into data with the minimum length. Writes data of a size up to nine bytes.
[in] | p | Pointer to the area that serialized data is written into. |
[in] | pend | The end of the area that data can be written into. |
[in] | val | The value to be serialized. |
NULL
if the area size is insufficient for data to be written. Definition at line 471 of file MpDirectWriter.h.
© Nintendo Co., Ltd. All rights reserved.