Avro C++

Public Member Functions | Static Public Member Functions | List of all members
avro::GenericReader Class Reference

A utility class to read generic datum from decoders. More...

`#include <Generic.hh>`

Inheritance diagram for avro::GenericReader:

## Public Member Functions
| GenericReader (ValidSchema s, const DecoderPtr &decoder)
| Constructs a reader for the given schema using the given decoder.
| GenericReader (const ValidSchema &writerSchema, const ValidSchema &readerSchema, const DecoderPtr &decoder)
| Constructs a reader for the given reader's schema `readerSchema` using the given decoder which holds data matching writer's schema `writerSchema`.
void | read (GenericDatum &datum) const
| Reads a value off the decoder.
void | drain ()
| Drains any residual bytes in the input stream (e.g. More...

## Static Public Member Functions
static void | read (Decoder &d, GenericDatum &g)
| Reads a generic datum from the stream, using the given schema.
static void | read (Decoder &d, GenericDatum &g, const ValidSchema &s)
| Reads a generic datum from the stream, using the given schema.

## Detailed Description

A utility class to read generic datum from decoders.

## Member Function Documentation

## ◆ drain()

void avro::GenericReader::drain | ( |  | ) |
| inline

Drains any residual bytes in the input stream (e.g.

because reader's schema has no use of them) and return unused bytes back to the underlying input stream.

The documentation for this class was generated from the following file:

- api/Generic.hh