Avro C++
|
#include "Config.hh"
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
#include "Stream.hh"
#include "ValidSchema.hh"
Go to the source code of this file.
Classes | |
class | avro::Encoder |
The abstract base class for all Avro encoders. More... | |
Namespaces | |
avro | |
A bunch of templates and specializations for encoding and decoding specific types. | |
Typedefs | |
using | avro::EncoderPtr = std::shared_ptr< Encoder > |
Shared pointer to Encoder. | |
Functions | |
AVRO_DECL EncoderPtr | avro::binaryEncoder () |
Returns an encoder that can encode binary Avro standard. | |
AVRO_DECL EncoderPtr | avro::validatingEncoder (const ValidSchema &schema, const EncoderPtr &base) |
Returns an encoder that validates sequence of calls to an underlying Encoder against the given schema. | |
AVRO_DECL EncoderPtr | avro::jsonEncoder (const ValidSchema &schema) |
Returns an encoder that encodes Avro standard for JSON. | |
AVRO_DECL EncoderPtr | avro::jsonPrettyEncoder (const ValidSchema &schema) |
Returns an encoder that encodes Avro standard for pretty printed JSON. | |
Low level support for encoding avro values. This class has two types of functions. One type of functions support the writing of leaf values (for example, encodeLong and encodeString). These functions have analogs in Decoder.
The other type of functions support the writing of maps and arrays. These functions are arrayStart, startItem, and arrayEnd (and similar functions for maps). Some implementations of Encoder handle the buffering required to break large maps and arrays into blocks, which is necessary for applications that want to do streaming.