Public Member Functions

avro::DataFileReader< T > Class Template Reference

List of all members.

Public Member Functions

 DataFileReader (const char *filename, const ValidSchema &readerSchema)
 Constructs the reader for the given file and the reader is expected to use the given schema.
 DataFileReader (const char *filename)
 Constructs the reader for the given file and the reader is expected to use the schema that is used with data.
 DataFileReader (std::auto_ptr< DataFileReaderBase > base)
 Constructs a reader using the reader base.
 DataFileReader (std::auto_ptr< DataFileReaderBase > base, const ValidSchema &readerSchema)
 Constructs a reader using the reader base.
bool read (T &datum)
const ValidSchemareaderSchema ()
 Returns the schema for this object.
const ValidSchemadataSchema ()
 Returns the schema stored with the data file.
void close ()
 Closes the reader.

template<typename T>
class avro::DataFileReader< T >


Constructor & Destructor Documentation

template<typename T >
avro::DataFileReader< T >::DataFileReader ( std::auto_ptr< DataFileReaderBase base  )  [inline]

Constructs a reader using the reader base.

This form of constructor allows the user to examine the schema of a given file and then decide to use the right type of data to be desrialize. Without this the user must know the type of data for the template _before_ he knows the schema within the file. The schema present in the data file will be used for reading from this reader.

template<typename T >
avro::DataFileReader< T >::DataFileReader ( std::auto_ptr< DataFileReaderBase base,
const ValidSchema readerSchema 
) [inline]

Constructs a reader using the reader base.

This form of constructor allows the user to examine the schema of a given file and then decide to use the right type of data to be desrialize. Without this the user must know the type of data for the template _before_ he knows the schema within the file. The argument readerSchema will be used for reading from this reader.


Member Function Documentation

template<typename T >
void avro::DataFileReader< T >::close (  )  [inline]

Closes the reader.

No further operation is possible on this reader.


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