Avro C++
Public Member Functions | List of all members
avro::GenericRecord Class Reference

The generic container for Avro records. More...

#include <GenericDatum.hh>

Inheritance diagram for avro::GenericRecord:
avro::GenericContainer

Public Member Functions

 GenericRecord (const NodePtr &schema)
 Constructs a generic record corresponding to the given schema schema, which should be of Avro type record.
 
size_t fieldCount () const
 Returns the number of fields in the current record.
 
size_t fieldIndex (const std::string &name) const
 Returns index of the field with the given name name.
 
bool hasField (const std::string &name) const
 Returns true if a field with the given name name is located in this r false otherwise.
 
const GenericDatumfield (const std::string &name) const
 Returns the field with the given name name.
 
GenericDatumfield (const std::string &name)
 Returns the reference to the field with the given name name, which can be used to change the contents.
 
const GenericDatumfieldAt (size_t pos) const
 Returns the field at the given position pos.
 
GenericDatumfieldAt (size_t pos)
 Returns the reference to the field at the given position pos, which can be used to change the contents.
 
void setFieldAt (size_t pos, const GenericDatum &v)
 Replaces the field at the given position pos with v.
 
- Public Member Functions inherited from avro::GenericContainer
const NodePtr & schema () const
 Returns the schema for this object.
 

Additional Inherited Members

- Protected Member Functions inherited from avro::GenericContainer
 GenericContainer (Type type, const NodePtr &s)
 Constructs a container corresponding to the given schema.
 

Detailed Description

The generic container for Avro records.


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