6 #ifndef ZEROBUF_CONSTALLOCATOR_H 
    7 #define ZEROBUF_CONSTALLOCATOR_H 
   10 #include <zerobuf/Allocator.h>  
   20     ZEROBUF_API ~ConstAllocator();
 
   22     const uint8_t* getData() 
const final { 
return _data; }
 
   23     size_t getSize() 
const final { 
return _size; }
 
   24     bool isMutable() 
const final { 
return false; }
 
   27     ConstAllocator( 
const ConstAllocator& ) = 
delete;
 
   28     ConstAllocator& operator = ( 
const ConstAllocator& ) = 
delete;
 
   30     uint8_t* getData() 
final 
   31         { 
throw std::runtime_error( 
"No mutable getData() for ConstAllocator" ); }
 
   32     void copyBuffer( 
const void*, 
size_t ) 
final 
   33         { 
throw std::runtime_error( 
"No copyBuffer for ConstAllocator" ); }
 
   34     uint8_t* updateAllocation( 
size_t, 
bool, 
size_t ) 
final 
   35         { 
throw std::runtime_error( 
"No updateAllocation for ConstAllocator" ); }
 
   36     void compact( 
float ) 
final 
   37         { 
throw std::runtime_error( 
"No compact for ConstAllocator" ); }
 
Defines export visibility macros for library ZeroBuf. 
Zero-copy, zero-serialize, zero-hassle protocol buffers. 
Allocator base class and interface. 
A zerobuf root allocator which gives read-only access to its data.