ZeroBuf  0.1.0
ZeroBuf is a replacement for FlatBuffers
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Generic.h
1 
2 /* Copyright (c) 2015, Human Brain Project
3  * Daniel.Nachbaur@epfl.ch
4  */
5 
6 #ifndef ZEROBUF_GENERIC_H
7 #define ZEROBUF_GENERIC_H
8 
9 #include <zerobuf/api.h>
10 #include <zerobuf/Zerobuf.h> // base class
11 #include <zerobuf/Schema.h> // member
12 #include <zerobuf/NonMovingAllocator.h>
13 
14 namespace zerobuf
15 {
16 
25 template< class Alloc = NonMovingAllocator >
26 class GenericBase : public Zerobuf
27 {
28 public:
29  ZEROBUF_API explicit GenericBase( const Schema& schema );
30 
31  ZEROBUF_API servus::uint128_t getZerobufType() const final;
32  ZEROBUF_API Schema getSchema() const final;
33 
34 private:
35  const Schema _schema;
36 };
37 
39 
40 }
41 
42 #endif
Defines export visibility macros for library ZeroBuf.
A runtime and optimized representation of the schema file input, which describes the data layout of a...
Definition: Schema.h:21
A ZeroBuf object which can hold values that are described by the given schema.
Definition: Generic.h:26
Base class for all zerobufs.
Definition: Zerobuf.h:22