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

Class to refer binary data. More...

#include <msgpack_light/binary.h>

Collaboration diagram for msgpack_light::binary_view:

Public Member Functions

 binary_view () noexcept
 Constructor.
 binary_view (const binary &data) noexcept
 Constructor.
 binary_view (const unsigned char *data, std::size_t size) noexcept
 Constructor.
const unsigned char * data () const noexcept
 Get the pointer to the data.
std::size_t size () const noexcept
 Get the size of the data.

Private Attributes

const unsigned char * data_
 Data.
std::size_t size_
 Size.

Detailed Description

Class to refer binary data.

Note
This class doesn't manage memory of binary data as std::string_view.

Definition at line 78 of file binary.h.

Constructor & Destructor Documentation

◆ binary_view() [1/3]

msgpack_light::binary_view::binary_view ( )
inlinenoexcept

Constructor.

Create empty data.

Definition at line 85 of file binary.h.

◆ binary_view() [2/3]

msgpack_light::binary_view::binary_view ( const unsigned char * data,
std::size_t size )
inlinenoexcept

Constructor.

Parameters
[in]dataPointer to the data.
[in]sizeSize of the data.

Definition at line 93 of file binary.h.

◆ binary_view() [3/3]

msgpack_light::binary_view::binary_view ( const binary & data)
inlinenoexcept

Constructor.

Parameters
[in]dataData.

Definition at line 362 of file binary.h.

Member Function Documentation

◆ data()

const unsigned char * msgpack_light::binary_view::data ( ) const
inlinenodiscardnoexcept

Get the pointer to the data.

Returns
Pointer to the data.

Definition at line 109 of file binary.h.

◆ size()

std::size_t msgpack_light::binary_view::size ( ) const
inlinenodiscardnoexcept

Get the size of the data.

Returns
Size of the data.

Definition at line 116 of file binary.h.

Member Data Documentation

◆ data_

const unsigned char* msgpack_light::binary_view::data_
private

Data.

Definition at line 120 of file binary.h.

◆ size_

std::size_t msgpack_light::binary_view::size_
private

Size.

Definition at line 123 of file binary.h.


The documentation for this class was generated from the following file: