cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
Loading...
Searching...
No Matches
msgpack_light Namespace Reference

Namespace of this project. More...

Namespaces

namespace  details
 Namespace of internal implementations.
namespace  type_support
 Namespace of classes to support serialization of types.

Classes

class  binary
 Class of binary data. More...
class  binary_view
 Class to refer binary data. More...
class  const_array_iterator
 Class of iterators of arrays to access constant objects. More...
class  const_array_ref
 Class to access constant arrays. More...
class  const_extension_ref
 Class to access constant extension value. More...
class  const_map_iterator
 Class of iterators of maps to access constant objects. More...
class  const_map_ref
 Class to access constant maps. More...
class  const_object_ref
 Class to access constant objects. More...
class  file_output_stream
 Class of streams to write data to files. More...
class  memory_output_stream
 Class of streams to write data to memory. More...
class  monotonic_allocator
 Class of an allocator which releases memory only when the allocator is destroyed. More...
class  mutable_array_iterator
 Class of iterators of arrays to access non-constant objects. More...
class  mutable_array_ref
 Class to access non-constant arrays. More...
class  mutable_map_iterator
 Class of iterators of maps to access non-constant objects. More...
class  mutable_map_ref
 Class to access non-constant maps. More...
class  mutable_object_ref
 Class to access non-constant objects. More...
class  object
 Class of objects in MessagePack. More...
class  output_stream
 Interface of streams to write data. More...
class  serialization_buffer
 Class of buffers to serialize data. More...
class  standard_allocator
 Class of standard allocators to allocate and deallocate memory. More...

Enumerations

enum class  object_data_type : std::uint8_t {
  nil , unsigned_integer , signed_integer , boolean ,
  float32 , float64 , string , binary ,
  array , map , extension
}
 Enumeration to specify types of data in objects. More...

Functions

bool operator!= (binary_view lhs, binary_view rhs)
 Compare two binary data.
bool operator!= (const_array_iterator lhs, const_array_iterator rhs) noexcept
 Compare two iterators.
bool operator!= (const_map_iterator lhs, const_map_iterator rhs) noexcept
 Compare two iterators.
template<typename Allocator>
bool operator!= (mutable_array_iterator< Allocator > lhs, mutable_array_iterator< Allocator > rhs) noexcept
 Compare two iterators.
template<typename Allocator>
bool operator!= (mutable_map_iterator< Allocator > lhs, mutable_map_iterator< Allocator > rhs) noexcept
 Compare two iterators.
binary operator+ (const binary &lhs, const binary &rhs)
 Connect two binary data.
std::ostream & operator<< (std::ostream &stream, const binary &value)
 Format a value to a stream.
bool operator== (binary_view lhs, binary_view rhs)
 Compare two binary data.
bool operator== (const_array_iterator lhs, const_array_iterator rhs) noexcept
 Compare two iterators.
bool operator== (const_map_iterator lhs, const_map_iterator rhs) noexcept
 Compare two iterators.
template<typename Allocator>
bool operator== (mutable_array_iterator< Allocator > lhs, mutable_array_iterator< Allocator > rhs) noexcept
 Compare two iterators.
template<typename Allocator>
bool operator== (mutable_map_iterator< Allocator > lhs, mutable_map_iterator< Allocator > rhs) noexcept
 Compare two iterators.
template<typename T>
binary serialize (const T &data)
 Serialize data to an output stream.
template<typename T>
void serialize_to (output_stream &stream, const T &data)
 Serialize data in memory and return the resulting binary data.
void swap (msgpack_light::monotonic_allocator &instance1, msgpack_light::monotonic_allocator &instance2) noexcept
 Swap two instances.

Detailed Description

Namespace of this project.

Enumeration Type Documentation

◆ object_data_type

enum class msgpack_light::object_data_type : std::uint8_t
strong

Enumeration to specify types of data in objects.

Enumerator
nil 

Nil.

unsigned_integer 

Unsigned integer.

signed_integer 

Signed integer.

boolean 

Boolean.

float32 

32-bit floating-point numbers.

float64 

64-bit floating-point numbers.

string 

String.

binary 

Binary.

array 

Array.

map 

Map.

extension 

Extension.

Definition at line 29 of file object_data_type.h.

Function Documentation

◆ operator!=() [1/5]

bool msgpack_light::operator!= ( binary_view lhs,
binary_view rhs )
inlinenodiscard

Compare two binary data.

Parameters
[in]lhsLight-hand-side data.
[in]rhsRight-hand-side data.
Return values
trueTwo instances are not equal.
falseTwo instances are equal.

Definition at line 397 of file binary.h.

◆ operator!=() [2/5]

bool msgpack_light::operator!= ( const_array_iterator lhs,
const_array_iterator rhs )
inlinenodiscardnoexcept

Compare two iterators.

Parameters
[in]lhsLight-hand-side instance.
[in]rhsRight-hand-side instance.
Return values
trueTwo instances are not equal.
falseTwo instances are equal.

Definition at line 96 of file array_iterator_impl.h.

◆ operator!=() [3/5]

bool msgpack_light::operator!= ( const_map_iterator lhs,
const_map_iterator rhs )
inlinenodiscardnoexcept

Compare two iterators.

Parameters
[in]lhsLight-hand-side instance.
[in]rhsRight-hand-side instance.
Return values
trueTwo instances are not equal.
falseTwo instances are equal.

Definition at line 101 of file map_iterator_impl.h.

◆ operator!=() [4/5]

template<typename Allocator>
bool msgpack_light::operator!= ( mutable_array_iterator< Allocator > lhs,
mutable_array_iterator< Allocator > rhs )
inlinenodiscardnoexcept

Compare two iterators.

Template Parameters
AllocatorType of the allocator.
Parameters
[in]lhsLight-hand-side instance.
[in]rhsRight-hand-side instance.
Return values
trueTwo instances are not equal.
falseTwo instances are equal.

Definition at line 62 of file array_iterator_impl.h.

◆ operator!=() [5/5]

template<typename Allocator>
bool msgpack_light::operator!= ( mutable_map_iterator< Allocator > lhs,
mutable_map_iterator< Allocator > rhs )
inlinenodiscardnoexcept

Compare two iterators.

Template Parameters
AllocatorType of the allocator.
Parameters
[in]lhsLight-hand-side instance.
[in]rhsRight-hand-side instance.
Return values
trueTwo instances are not equal.
falseTwo instances are equal.

Definition at line 66 of file map_iterator_impl.h.

◆ operator+()

binary msgpack_light::operator+ ( const binary & lhs,
const binary & rhs )
inlinenodiscard

Connect two binary data.

Parameters
[in]lhsLight-hand-side data.
[in]rhsRight-hand-side data.
Returns
Connected data.

Definition at line 372 of file binary.h.

◆ operator<<()

std::ostream & msgpack_light::operator<< ( std::ostream & stream,
const binary & value )
inline

Format a value to a stream.

Parameters
[in]streamOutput stream.
[in]valueValue.
Returns
Output stream.

Definition at line 408 of file binary.h.

◆ operator==() [1/5]

bool msgpack_light::operator== ( binary_view lhs,
binary_view rhs )
inlinenodiscard

Compare two binary data.

Parameters
[in]lhsLight-hand-side data.
[in]rhsRight-hand-side data.
Return values
trueTwo instances are equal.
falseTwo instances are not equal.

Definition at line 384 of file binary.h.

◆ operator==() [2/5]

bool msgpack_light::operator== ( const_array_iterator lhs,
const_array_iterator rhs )
inlinenodiscardnoexcept

Compare two iterators.

Parameters
[in]lhsLight-hand-side instance.
[in]rhsRight-hand-side instance.
Return values
trueTwo instances are equal.
falseTwo instances are not equal.

Definition at line 83 of file array_iterator_impl.h.

◆ operator==() [3/5]

bool msgpack_light::operator== ( const_map_iterator lhs,
const_map_iterator rhs )
inlinenodiscardnoexcept

Compare two iterators.

Parameters
[in]lhsLight-hand-side instance.
[in]rhsRight-hand-side instance.
Return values
trueTwo instances are equal.
falseTwo instances are not equal.

Definition at line 88 of file map_iterator_impl.h.

◆ operator==() [4/5]

template<typename Allocator>
bool msgpack_light::operator== ( mutable_array_iterator< Allocator > lhs,
mutable_array_iterator< Allocator > rhs )
inlinenodiscardnoexcept

Compare two iterators.

Template Parameters
AllocatorType of the allocator.
Parameters
[in]lhsLight-hand-side instance.
[in]rhsRight-hand-side instance.
Return values
trueTwo instances are equal.
falseTwo instances are not equal.

Definition at line 47 of file array_iterator_impl.h.

◆ operator==() [5/5]

template<typename Allocator>
bool msgpack_light::operator== ( mutable_map_iterator< Allocator > lhs,
mutable_map_iterator< Allocator > rhs )
inlinenodiscardnoexcept

Compare two iterators.

Template Parameters
AllocatorType of the allocator.
Parameters
[in]lhsLight-hand-side instance.
[in]rhsRight-hand-side instance.
Return values
trueTwo instances are equal.
falseTwo instances are not equal.

Definition at line 51 of file map_iterator_impl.h.

◆ serialize()

template<typename T>
binary msgpack_light::serialize ( const T & data)
inlinenodiscard

Serialize data to an output stream.

Template Parameters
TType of data to serialize.
Parameters
[in]dataData to serialize.
Returns
Serialized binary data.

Definition at line 52 of file serialize.h.

◆ serialize_to()

template<typename T>
void msgpack_light::serialize_to ( output_stream & stream,
const T & data )
inline

Serialize data in memory and return the resulting binary data.

Template Parameters
TType of data.
Parameters
[out]streamStream to write serialized data.
[in]dataData.

Definition at line 38 of file serialize.h.

◆ swap()

void msgpack_light::swap ( msgpack_light::monotonic_allocator & instance1,
msgpack_light::monotonic_allocator & instance2 )
inlinenoexcept

Swap two instances.

Parameters
[in,out]instance1Instances.
[in,out]instance2Instances.

Definition at line 268 of file monotonic_allocator.h.