|
join 1.0
lightweight network framework library
|
message pack reader class. More...
#include <pack.hpp>
Public Member Functions | |
| PackReader ()=default | |
| default constructor. | |
| PackReader (const PackReader &other)=delete | |
| copy constructor. | |
| PackReader & | operator= (const PackReader &other)=delete |
| copy assignment. | |
| PackReader (PackReader &&other)=delete | |
| move constructor. | |
| PackReader & | operator= (PackReader &&other)=delete |
| move assignment. | |
| ~PackReader ()=default | |
| destroy instance. | |
| template<typename Handler > | |
| int | deserialize (const char *document, size_t length, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (const char *first, const char *last, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::string_view document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::stringstream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::istringstream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::fstream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::ifstream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::iostream &document, Handler &handler) |
| deserialize a document. | |
| template<typename Handler > | |
| int | deserialize (std::istream &document, Handler &handler) |
| deserialize a document. | |
Protected Member Functions | |
| template<typename ProbeType > | |
| int | read (ProbeType &document, Value &value) |
| parse a document into a value. | |
| template<typename ProbeType , typename Handler > | |
| int | read (ProbeType &document, Handler &&handler) |
| parse a document, resetting the handler on failure. | |
| template<typename ProbeType , typename Handler > | |
| int | readValue (ProbeType &document, Handler &handler, size_t depth) |
| parse value. | |
| template<typename ProbeType , typename Handler > | |
| int | readNull (ProbeType &document, Handler &handler, bool isKey=false) |
| parse a null value. | |
| template<typename ProbeType , typename Handler > | |
| int | readFalse (ProbeType &document, Handler &handler, bool isKey=false) |
| parse a false value. | |
| template<typename ProbeType , typename Handler > | |
| int | readTrue (ProbeType &document, Handler &handler, bool isKey=false) |
| parse a true value. | |
| template<typename ProbeType , typename Handler > | |
| int | readArray (ProbeType &document, Handler &handler, size_t depth) |
| parse an array value. | |
| template<typename ProbeType , typename Handler > | |
| int | readObject (ProbeType &document, Handler &handler, size_t depth) |
| parse an object value. | |
| template<typename ProbeType , typename Handler > | |
| int | readKey (ProbeType &document, Handler &handler) |
| parse a key of any type. | |
| template<typename ProbeType , typename Handler > | |
| int | readString (ProbeType &document, Handler &handler, bool isKey=false) |
| parse a string value. | |
| template<typename ProbeType , typename Handler > | |
| int | readBin (ProbeType &document, Handler &handler) |
| parse binary data. | |
| template<typename ProbeType , typename Handler > | |
| int | readNumber (ProbeType &document, Handler &handler, bool isKey=false) |
| parse a number value. | |
| constexpr bool | isNull (uint8_t c) |
| check if null. | |
| constexpr bool | isFalse (uint8_t c) |
| check if false. | |
| constexpr bool | isTrue (uint8_t c) |
| check if true. | |
| constexpr bool | isInt (uint8_t c) |
| check if 32 bits integer. | |
| constexpr bool | isUint (uint8_t c) |
| check if unsigned 32 bits integer. | |
| constexpr bool | isInt64 (uint8_t c) |
| check if 64 bits integer. | |
| constexpr bool | isUint64 (uint8_t c) |
| check if unsigned 64 bits integer. | |
| constexpr bool | isReal (uint8_t c) |
| check if real. | |
| constexpr bool | isNumber (uint8_t c) |
| check if number. | |
| constexpr bool | isString (uint8_t c) |
| check if string. | |
| constexpr bool | isBin (uint8_t c) |
| check if binary data. | |
| constexpr bool | isArray (uint8_t c) |
| check if array. | |
| constexpr bool | isObject (uint8_t c) |
| check if object. | |
Static Protected Member Functions | |
| template<typename ProbeType > | |
| static int | readBytes (ProbeType &document, uint32_t len, std::string &output) |
| read bytes by chunks. | |
| template<typename Type , typename ProbeType , typename Output > requires std::is_arithmetic_v<Type> | |
| static int | unpack (ProbeType &document, Output &output) |
| unpack value from stream. | |
message pack reader class.
|
default |
default constructor.
|
delete |
copy constructor.
| other | object to copy. |
|
delete |
move constructor.
| other | object to move. |
|
default |
destroy instance.
|
inline |
deserialize a document.
| document | document to parse. |
| length | The length of the document to parse. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| first | The first character of the document to parse. |
| last | The last character of the document to parse. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to parse. |
| handler | handler receiving the document. |
|
inline |
deserialize a document.
| document | document to deserialize. |
| handler | handler receiving the document. |
|
inlineconstexprprotected |
check if array.
| c | character to check. |
|
inlineconstexprprotected |
check if binary data.
| c | character to check. |
|
inlineconstexprprotected |
check if false.
| c | character to check. |
|
inlineconstexprprotected |
check if 32 bits integer.
| c | character to check. |
|
inlineconstexprprotected |
check if 64 bits integer.
| c | character to check. |
|
inlineconstexprprotected |
check if null.
| c | character to check. |
|
inlineconstexprprotected |
check if number.
| c | character to check. |
|
inlineconstexprprotected |
check if object.
| c | character to check. |
|
inlineconstexprprotected |
check if real.
| c | character to check. |
|
inlineconstexprprotected |
check if string.
| c | character to check. |
|
inlineconstexprprotected |
check if true.
| c | character to check. |
|
inlineconstexprprotected |
check if unsigned 32 bits integer.
| c | character to check. |
|
inlineconstexprprotected |
check if unsigned 64 bits integer.
| c | character to check. |
|
delete |
copy assignment.
| other | object to copy. |
|
delete |
move assignment.
| other | object to move. |
|
inlineprotected |
parse a document, resetting the handler on failure.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlineprotected |
parse a document into a value.
| document | document to parse. |
| value | value receiving the document. |
|
inlineprotected |
parse an array value.
| document | document to parse. |
| handler | handler receiving the document. |
| depth | number of enclosing containers. |
|
inlineprotected |
parse binary data.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlinestaticprotected |
read bytes by chunks.
| document | document to parse. |
| len | number of bytes to read. |
| output | string receiving the bytes. |
|
inlineprotected |
parse a false value.
| document | document to parse. |
| handler | handler receiving the document. |
| isKey | indicate whether the element to parse is a key or not. |
|
inlineprotected |
parse a key of any type.
| document | document to parse. |
| handler | handler receiving the document. |
|
inlineprotected |
parse a null value.
| document | document to parse. |
| handler | handler receiving the document. |
| isKey | indicate whether the element to parse is a key or not. |
|
inlineprotected |
parse a number value.
| document | document to parse. |
| handler | handler receiving the document. |
| isKey | indicate whether the element to parse is a key or not. |
|
inlineprotected |
parse an object value.
| document | document to parse. |
| handler | handler receiving the document. |
| depth | number of enclosing containers. |
|
inlineprotected |
parse a string value.
| document | document to parse. |
| handler | handler receiving the document. |
| isKey | indicate whether the element to parse is a key or not. |
|
inlineprotected |
parse a true value.
| document | document to parse. |
| handler | handler receiving the document. |
| isKey | indicate whether the element to parse is a key or not. |
|
inlineprotected |
parse value.
| document | document to parse. |
| handler | handler receiving the document. |
| depth | number of enclosing containers. |
|
inlinestaticprotected |
unpack value from stream.
| document | document to parse. |
| output | unpacked value. |