Loading...
Searching...
No Matches
buffer_tmpl.hpp
Go to the documentation of this file.
#ifndef PROTOZERO_BUFFER_TMPL_HPP
#define PROTOZERO_BUFFER_TMPL_HPP
/*****************************************************************************
protozero - Minimalistic protocol buffer decoder and encoder in C++.
This file is from https://github.com/mapbox/protozero where you can find more
documentation.
*****************************************************************************/
#include <cstddef>
#include <iterator>
#include <string>
namespace protozero {
// Implementation of buffer customizations points for std::string
template <typename T>
struct buffer_customization {
static std::size_t size(const std::string* buffer);
static void append(std::string* buffer, const char* data, std::size_t count);
static void append_zeros(std::string* buffer, std::size_t count);
static void resize(std::string* buffer, std::size_t size);
static void reserve_additional(std::string* buffer, std::size_t size);
static void erase_range(std::string* buffer, std::size_t from, std::size_t to);
static char* at_pos(std::string* buffer, std::size_t pos);
static void push_back(std::string* buffer, char ch);
};
} // namespace protozero
#endif // PROTOZERO_BUFFER_TMPL_HPP
protozero
All parts of the protozero header-only library are in this namespace.
Definition basic_pbf_builder.hpp:24