|
cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
|
Class of objects in MessagePack. More...
#include <msgpack_light/object.h>
Public Types | |
| using | base_type |
| Type of the base class. | |
| Public Types inherited from msgpack_light::details::mutable_object_base< object< standard_allocator >, standard_allocator > | |
| using | allocator_type |
| Type of the allocator. | |
Public Member Functions | |
Initialization and finalization | |
| object (allocator_type allocator=allocator_type()) | |
| Constructor. | |
| object (const object &other) | |
| Copy constructor. | |
| object (object &&other) noexcept | |
| Move constructor. | |
| object & | operator= (const object &other) |
| Copy assignment operator. | |
| object & | operator= (object &&other) noexcept |
| Move assignment operator. | |
| void | swap (object &other) noexcept |
| Swap this instance with another instance. | |
| ~object () | |
| Destructor. | |
Internal data | |
| |
| details::object_data & | data () noexcept |
| Get the internal data. | |
| const details::object_data & | data () const noexcept |
| Get the internal data. | |
| details::allocator_wrapper< Allocator > & | allocator () noexcept |
| Get the allocator. | |
| Public Member Functions inherited from msgpack_light::details::mutable_object_base< object< standard_allocator >, standard_allocator > | |
| void | set_unsigned_integer (std::uint64_t value) noexcept |
| Set this object to an unsigned integer. | |
| void | set_signed_integer (std::int64_t value) noexcept |
| Set this object to a signed integer. | |
| void | set_boolean (bool value) noexcept |
| Set this object to a boolean value. | |
| void | set_float32 (float value) noexcept |
| Set this object to a 32-bit floating-point number. | |
| void | set_float64 (double value) noexcept |
| Set this object to a 64-bit floating-point number. | |
| void | set_string (std::string_view value) |
| Set this object to a string. | |
| void | set_binary (binary_view value) |
| Set this object to a binary. | |
| mutable_array_ref< standard_allocator > | set_array (std::size_t size=0U) |
| Set this object to an array. | |
| mutable_map_ref< standard_allocator > | set_map (std::size_t size=0U) |
| Set this object to a map. | |
| void | set_extension (std::int8_t type, binary_view value_data) |
| Set this object to a extension value. | |
| void | clear () noexcept |
| Clear the data. | |
| mutable_array_ref< standard_allocator > | as_array () |
| Get data as an array. | |
| mutable_map_ref< standard_allocator > | as_map () |
| Get data as a map. | |
| details::object_data & | data () noexcept |
| Get the internal data. | |
| allocator_wrapper< standard_allocator > & | allocator () noexcept |
| Get the allocator. | |
| Public Member Functions inherited from msgpack_light::details::const_object_base< object< standard_allocator > > | |
| 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. | |
| const details::object_data & | data () const noexcept |
| Get the internal data. | |
Private Attributes | |
| details::allocator_wrapper< Allocator > | allocator_ |
| Allocator. | |
| details::object_data | data_ {} |
| Data. | |
Additional Inherited Members | |
| Protected Member Functions inherited from msgpack_light::details::mutable_object_base< object< standard_allocator >, standard_allocator > | |
| mutable_object_base ()=default | |
| Constructor. | |
| object< standard_allocator > & | derived () noexcept |
| Access the derived class. | |
| Protected Member Functions inherited from msgpack_light::details::const_object_base< object< standard_allocator > > | |
| const_object_base ()=default | |
| Constructor. | |
| const object< standard_allocator > & | derived () const noexcept |
| Access the derived class. | |
Class of objects in MessagePack.
| Allocator | Type of the allocator. |
| using msgpack_light::object< Allocator >::base_type |
Type of the base class.
|
inlineexplicit |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
private |
|
private |