Avro C++
Public Member Functions
avro::GenericUnion Class Reference

Generic container for unions. More...

#include <GenericDatum.hh>

Inheritance diagram for avro::GenericUnion:
avro::GenericContainer

List of all members.

Public Member Functions

 GenericUnion (const NodePtr &schema)
 Constructs a generic union corresponding to the given schema schema, and the given value.
size_t currentBranch () const
 Returns the index of the current branch.
void selectBranch (size_t branch)
 Selects a new branch.
GenericDatumdatum ()
 Returns the datum corresponding to the currently selected branch in this union.
const GenericDatumdatum () const
 Returns the datum corresponding to the currently selected branch in this union.

Detailed Description

Generic container for unions.


Constructor & Destructor Documentation

avro::GenericUnion::GenericUnion ( const NodePtr &  schema) [inline]

Constructs a generic union corresponding to the given schema schema, and the given value.

The schema should be of Avro type union and the value should correspond to one of the branches of the union.


Member Function Documentation

void avro::GenericUnion::selectBranch ( size_t  branch) [inline]

Selects a new branch.

The type for the value is changed accordingly.

Parameters:
branchThe index for the selected branch.

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