protozero: include/protozero/pbf_writer.hpp Source File

protozero 1.7.1 Minimalistic protocol buffer decoder and encoder in C++.

Loading...
Searching...
No Matches
pbf_writer.hpp
Go to the documentation of this file.
1#ifndef PROTOZERO_PBF_WRITER_HPP
2#define PROTOZERO_PBF_WRITER_HPP
3
4/*****************************************************************************
5
6protozero - Minimalistic protocol buffer decoder and encoder in C++.
7
8This file is from https://github.com/mapbox/protozero where you can find more
9documentation.
10
11*****************************************************************************/
12
19#include "basic_pbf_writer.hpp"
20#include "buffer_string.hpp"
21
22#include <cstdint>
23#include <string>
24
25namespace protozero {
26
30 using pbf_writer = basic_pbf_writer<std::string>;
31
33 using packed_field_bool = detail::packed_field_varint<std::string, bool>;
34
36 using packed_field_enum = detail::packed_field_varint<std::string, int32_t>;
37
39 using packed_field_int32 = detail::packed_field_varint<std::string, int32_t>;
40
42 using packed_field_sint32 = detail::packed_field_svarint<std::string, int32_t>;
43
45 using packed_field_uint32 = detail::packed_field_varint<std::string, uint32_t>;
46
48 using packed_field_int64 = detail::packed_field_varint<std::string, int64_t>;
49
51 using packed_field_sint64 = detail::packed_field_svarint<std::string, int64_t>;
52
54 using packed_field_uint64 = detail::packed_field_varint<std::string, uint64_t>;
55
57 using packed_field_fixed32 = detail::packed_field_fixed<std::string, uint32_t>;
58
60 using packed_field_sfixed32 = detail::packed_field_fixed<std::string, int32_t>;
61
63 using packed_field_fixed64 = detail::packed_field_fixed<std::string, uint64_t>;
64
66 using packed_field_sfixed64 = detail::packed_field_fixed<std::string, int64_t>;
67
69 using packed_field_float = detail::packed_field_fixed<std::string, float>;
70
72 using packed_field_double = detail::packed_field_fixed<std::string, double>;
73
74} // end namespace protozero
75
76#endif // PROTOZERO_PBF_WRITER_HPP
basic_pbf_writer.hpp
Contains the basic_pbf_writer template class.
buffer_string.hpp
Contains the customization points for buffer implementation based on std::string.
protozero::basic_pbf_writer
Definition basic_pbf_writer.hpp:59
protozero
All parts of the protozero header-only library are in this namespace.
Definition basic_pbf_builder.hpp:24
protozero::packed_field_int32
detail::packed_field_varint< std::string, int32_t > packed_field_int32
Class for generating packed repeated int32 fields.
Definition pbf_writer.hpp:39
protozero::packed_field_uint64
detail::packed_field_varint< std::string, uint64_t > packed_field_uint64
Class for generating packed repeated uint64 fields.
Definition pbf_writer.hpp:54
protozero::packed_field_sfixed32
detail::packed_field_fixed< std::string, int32_t > packed_field_sfixed32
Class for generating packed repeated sfixed32 fields.
Definition pbf_writer.hpp:60
protozero::packed_field_bool
detail::packed_field_varint< std::string, bool > packed_field_bool
Class for generating packed repeated bool fields.
Definition pbf_writer.hpp:33
protozero::packed_field_uint32
detail::packed_field_varint< std::string, uint32_t > packed_field_uint32
Class for generating packed repeated uint32 fields.
Definition pbf_writer.hpp:45
protozero::packed_field_enum
detail::packed_field_varint< std::string, int32_t > packed_field_enum
Class for generating packed repeated enum fields.
Definition pbf_writer.hpp:36
protozero::packed_field_sint64
detail::packed_field_svarint< std::string, int64_t > packed_field_sint64
Class for generating packed repeated sint64 fields.
Definition pbf_writer.hpp:51
protozero::packed_field_float
detail::packed_field_fixed< std::string, float > packed_field_float
Class for generating packed repeated float fields.
Definition pbf_writer.hpp:69
protozero::packed_field_sint32
detail::packed_field_svarint< std::string, int32_t > packed_field_sint32
Class for generating packed repeated sint32 fields.
Definition pbf_writer.hpp:42
protozero::packed_field_fixed64
detail::packed_field_fixed< std::string, uint64_t > packed_field_fixed64
Class for generating packed repeated fixed64 fields.
Definition pbf_writer.hpp:63
protozero::packed_field_double
detail::packed_field_fixed< std::string, double > packed_field_double
Class for generating packed repeated double fields.
Definition pbf_writer.hpp:72
protozero::packed_field_sfixed64
detail::packed_field_fixed< std::string, int64_t > packed_field_sfixed64
Class for generating packed repeated sfixed64 fields.
Definition pbf_writer.hpp:66
protozero::packed_field_int64
detail::packed_field_varint< std::string, int64_t > packed_field_int64
Class for generating packed repeated int64 fields.
Definition pbf_writer.hpp:48
protozero::packed_field_fixed32
detail::packed_field_fixed< std::string, uint32_t > packed_field_fixed32
Class for generating packed repeated fixed32 fields.
Definition pbf_writer.hpp:57