cpp-msgpack-light
0.3.0
A light library to serialize MessagePack.
Toggle main menu visibility
Loading...
Searching...
No Matches
serialization_buffer_impl.h
Go to the documentation of this file.
1
/*
2
* Copyright 2024 MusicScience37 (Kenta Kabashima)
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
20
#pragma once
21
22
#ifndef MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION
23
#if defined(MSGPACK_LIGHT_DOCUMENTATION)
27
#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION \
28
<compiler-specific-default-value>
29
#elif defined(_MSC_VER)
30
// With MSVC, non_buffered_serialization_buffer_impl was slightly faster.
31
#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION 0
32
#elif defined(__clang__)
33
// With Clang, buffered_serialization_buffer_impl was faster.
34
#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION 1
35
#elif defined(__GNUC__) || defined(__GNUG__)
36
// With GCC, non_buffered_serialization_buffer_impl was faster.
37
#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION 0
38
#else
39
#define MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION 0
40
#endif
41
#endif
42
43
#if MSGPACK_LIGHT_USE_BUFFER_IN_SERIALIZATION
44
45
#include "
msgpack_light/details/buffered_serialization_buffer_impl.h
"
46
47
namespace
msgpack_light::details
{
48
50
using
serialization_buffer_impl
= buffered_serialization_buffer_impl;
51
52
}
// namespace msgpack_light::details
53
54
#else
55
56
#include "
msgpack_light/details/non_buffered_serialization_buffer_impl.h
"
57
58
namespace
msgpack_light::details
{
59
61
using
serialization_buffer_impl
=
non_buffered_serialization_buffer_impl
;
62
63
}
// namespace msgpack_light::details
64
65
#endif
buffered_serialization_buffer_impl.h
Definition of buffered_serialization_buffer_impl class.
msgpack_light::details::non_buffered_serialization_buffer_impl
Class to implement internal implementation of serialization_buffer class without buffers.
Definition
non_buffered_serialization_buffer_impl.h:36
msgpack_light::details
Namespace of internal implementations.
Definition
binary.h:35
msgpack_light::details::serialization_buffer_impl
non_buffered_serialization_buffer_impl serialization_buffer_impl
Type of internal implementation of serialization_buffer class.
Definition
serialization_buffer_impl.h:61
non_buffered_serialization_buffer_impl.h
Definition of non_buffered_serialization_buffer_impl class.
include
msgpack_light
details
serialization_buffer_impl.h
Generated on
for cpp-msgpack-light by
1.18.0