cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
|
Base class of constant objects in MessagePack. More...
#include <msgpack_light/details/object_base.h>
Public Member Functions | |
Access to data | |
object_data_type | type () const noexcept |
Get the type of this object. | |
std::uint64_t | as_unsigned_integer () const |
Get data as an unsigned integer. | |
std::int64_t | as_signed_integer () const |
Get data as a signed integer. | |
bool | as_boolean () const |
Get data as a boolean. | |
float | as_float32 () const |
Get data as a 32-bit floating-pointe number. | |
double | as_float64 () const |
Get data as a 64-bit floating-pointe number. | |
std::string_view | as_string () const |
Get data as a string. | |
binary_view | as_binary () const |
Get data as a binary. | |
const_array_ref | as_array () const |
Get data as an array. | |
const_map_ref | as_map () const |
Get data as a map. | |
const_extension_ref | as_extension () const |
Get data as an extension. | |
Internal data | |
| |
const details::object_data & | data () const noexcept |
Get the internal data. |
Protected Member Functions | |
const_object_base ()=default | |
Constructor. | |
const Derived & | derived () const noexcept |
Access the derived class. |
Base class of constant objects in MessagePack.
Derived | Type of the derived class. |
Definition at line 48 of file object_base.h.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
Get data as a 32-bit floating-pointe number.
Definition at line 103 of file object_base.h.
|
inlinenodiscard |
Get data as a 64-bit floating-pointe number.
Definition at line 116 of file object_base.h.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscardnoexcept |
|
inlinenodiscardprotectednoexcept |
Access the derived class.
Definition at line 212 of file object_base.h.
|
inlinenodiscardnoexcept |
Get the type of this object.
Definition at line 60 of file object_base.h.