7 #ifndef ZEROBUF_ZEROBUF_H
8 #define ZEROBUF_ZEROBUF_H
11 #include <zerobuf/Types.h>
12 #include <servus/uint128_t.h>
25 virtual servus::uint128_t getZerobufType()
const = 0;
26 virtual Schema getSchema()
const = 0;
27 virtual void notifyUpdated() {}
29 ZEROBUF_API
const void* getZerobufData()
const;
30 ZEROBUF_API
size_t getZerobufSize()
const;
31 ZEROBUF_API
void setZerobufData(
const void* data,
size_t size );
33 ZEROBUF_API std::string toJSON()
const;
34 ZEROBUF_API
void fromJSON(
const std::string& json );
36 ZEROBUF_API
bool operator==(
const Zerobuf& rhs )
const;
37 ZEROBUF_API
bool operator!=(
const Zerobuf& rhs )
const;
40 const Allocator* getAllocator()
const {
return _alloc; }
48 Allocator* getAllocator() {
return _alloc; }
50 ZEROBUF_API
void _setZerobufArray(
const void* data,
const size_t size,
51 const size_t arrayNum );
Defines export visibility macros for library ZeroBuf.
A runtime and optimized representation of the schema file input, which describes the data layout of a...
Allocator base class and interface.
Base class for all zerobufs.