Avro C++
Classes | Namespaces | Typedefs | Functions
Decoder.hh File Reference

Low level support for decoding avro values. More...

#include "Config.hh"
#include <stdint.h>
#include <string>
#include <vector>
#include "ValidSchema.hh"
#include "Stream.hh"
#include <boost/shared_ptr.hpp>

Go to the source code of this file.


class  avro::Decoder
 Decoder is an interface implemented by every decoder capable of decoding Avro data. More...
class  avro::ResolvingDecoder
 ResolvingDecoder is derived from Decoder, with an additional function to obtain the field ordering of fiedls within a record. More...


namespace  avro

A bunch of templates and specializations for encoding and decoding specific types.


typedef boost::shared_ptr
< Decoder > 
 Shared pointer to Decoder.
typedef boost::shared_ptr
< ResolvingDecoder > 
 Shared pointer to ResolvingDecoder.


AVRO_DECL DecoderPtr avro::binaryDecoder ()
 Returns an decoder that can decode binary Avro standard.
AVRO_DECL DecoderPtr avro::validatingDecoder (const ValidSchema &schema, const DecoderPtr &base)
 Returns an decoder that validates sequence of calls to an underlying Decoder against the given schema.
AVRO_DECL DecoderPtr avro::jsonDecoder (const ValidSchema &schema)
 Returns an decoder that can decode Avro standard for JSON.
AVRO_DECL ResolvingDecoderPtr avro::resolvingDecoder (const ValidSchema &writer, const ValidSchema &reader, const DecoderPtr &base)
 Returns a decoder that decodes avro data from base written according to writerSchema and resolves against readerSchema.

Detailed Description

Low level support for decoding avro values.

This class has two types of funtions. One type of functions support decoding of leaf values (for example, decodeLong and decodeString). These functions have analogs in Encoder.

The other type of functions support decoding of maps and arrays. These functions are arrayStart, startItem, and arrayEnd (and similar functions for maps).