/srv/osrm/osrm-backend/third_party/protozero/include/protozero
NameSizeModeActions
basic_pbf_builder.hpp89370644editdlrm
basic_pbf_writer.hpp364850644editdlrm
buffer_fixed.hpp57980644editdlrm
buffer_string.hpp20710644editdlrm
buffer_tmpl.hpp34640644editdlrm
buffer_vector.hpp21740644editdlrm
byteswap.hpp29310644editdlrm
config.hpp12870644editdlrm
data_view.hpp58690644editdlrm
exception.hpp29740644editdlrm
iterators.hpp153560644editdlrm
pbf_builder.hpp8010644editdlrm
pbf_message.hpp57810644editdlrm
pbf_reader.hpp343140644editdlrm
pbf_writer.hpp27120644editdlrm
types.hpp18370644editdlrm
varint.hpp78220644editdlrm
version.hpp9190644editdlrm
Edit: /srv/osrm/osrm-backend/third_party/protozero/include/protozero/buffer_vector.hpp (2174B)
#ifndef PROTOZERO_BUFFER_VECTOR_HPP #define PROTOZERO_BUFFER_VECTOR_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. *****************************************************************************/ /** * @file buffer_vector.hpp * * @brief Contains the customization points for buffer implementation based * on std::vector */ #include "buffer_tmpl.hpp" #include #include #include namespace protozero { // Implementation of buffer customizations points for std::vector /// @cond INTERNAL template <> struct buffer_customization> { static std::size_t size(const std::vector* buffer) noexcept { return buffer->size(); } static void append(std::vector* buffer, const char* data, std::size_t count) { buffer->insert(buffer->end(), data, data + count); } static void append_zeros(std::vector* buffer, std::size_t count) { buffer->insert(buffer->end(), count, '\0'); } static void resize(std::vector* buffer, std::size_t size) { protozero_assert(size < buffer->size()); buffer->resize(size); } static void reserve_additional(std::vector* buffer, std::size_t size) { buffer->reserve(buffer->size() + size); } static void erase_range(std::vector* buffer, std::size_t from, std::size_t to) { protozero_assert(from <= buffer->size()); protozero_assert(to <= buffer->size()); protozero_assert(from <= to); buffer->erase(std::next(buffer->begin(), from), std::next(buffer->begin(), to)); } static char* at_pos(std::vector* buffer, std::size_t pos) { protozero_assert(pos <= buffer->size()); return (&*buffer->begin()) + pos; } static void push_back(std::vector* buffer, char ch) { buffer->push_back(ch); } }; /// @endcond } // namespace protozero #endif // PROTOZERO_BUFFER_VECTOR_HPP