7 #ifndef ZEROBUF_NONMOVINGALLOCATOR_H 8 #define ZEROBUF_NONMOVINGALLOCATOR_H 10 #include <zerobuf/NonMovingBaseAllocator.h> 20 ZEROBUF_API ~NonMovingAllocator();
22 uint8_t* getData()
final {
return _data; }
23 const uint8_t* getData()
const final {
return _data; }
24 size_t getSize()
const final {
return _size; }
25 ZEROBUF_API
void copyBuffer(
const void* data,
size_t size)
final;
26 bool isMovable()
const final {
return true; }
28 NonMovingAllocator(
const NonMovingAllocator&) =
delete;
29 NonMovingAllocator& operator=(
const NonMovingAllocator&) =
delete;
34 void _resize(
size_t newSize)
final;
Allocator base class which does not move existing fields.
Defines export visibility macros for library ZeroBuf.
Zero-copy, zero-serialize, zero-hassle protocol buffers.
A zerobuf root allocator which does not move existing fields.