19 #ifndef avro_Generic_hh__
20 #define avro_Generic_hh__
22 #include <boost/utility.hpp>
27 #include "GenericDatum.hh"
36 const bool isResolving_;
125 const std::pair<ValidSchema, GenericDatum> &p) {
126 GenericWriter::write(e, p.second, p.first);
131 GenericReader::read(d, p.second, p.first);
142 GenericWriter::write(e, g);
147 GenericReader::read(d, g);
static void decode(Decoder &d, GenericDatum &g)
Decodes.
Definition: Generic.hh:146
Codec_traits tells avro how to encode and decode an object of given type.
Definition: Generic.hh:114
The abstract base class for all Avro encoders.
Definition: Encoder.hh:52
void drain()
Drains any residual bytes in the input stream (e.g.
Definition: Generic.hh:65
static void encode(Encoder &e, const GenericDatum &g)
Encodes.
Definition: Generic.hh:141
Decoder is an interface implemented by every decoder capable of decoding Avro data.
Definition: Decoder.hh:48
std::shared_ptr< Decoder > DecoderPtr
Shared pointer to Decoder.
Definition: Decoder.hh:177
Generic datum which can hold any Avro type.
Definition: GenericDatum.hh:61
A utility class to write generic datum to encoders.
Definition: Generic.hh:82
A utility class to read generic datum from decoders.
Definition: Generic.hh:34
static void encode(Encoder &e, const std::pair< ValidSchema, GenericDatum > &p)
Encodes.
Definition: Generic.hh:124
A bunch of templates and specializations for encoding and decoding specific types.
Definition: AvroParse.hh:30
std::shared_ptr< Encoder > EncoderPtr
Shared pointer to Encoder.
Definition: Encoder.hh:147
A ValidSchema is basically a non-mutable Schema that has passed some minimum of sanity checks.
Definition: ValidSchema.hh:40
static void decode(Decoder &d, std::pair< ValidSchema, GenericDatum > &p)
Decodes.
Definition: Generic.hh:130
static void write(Encoder &e, const GenericDatum &g, const ValidSchema &)
Writes a generic datum on to the stream, using the given schema.
Definition: Generic.hh:108