Avro C++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Classes | Namespaces | Typedefs | Functions
Encoder.hh File Reference

Low level support for encoding 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.

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

typedef boost::shared_ptr
< Encoder > 
avro::EncoderPtr
 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 can encode Avro standard for JSON.
 

Detailed Description

Low level support for encoding avro values.

This class has two types of funtions. 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.