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

Generic container for Avro enum. More...

#include <Generic.hh>

Inheritance diagram for avro::GenericEnum:
avro::GenericContainer

List of all members.

Public Member Functions

 GenericEnum (const NodePtr &schema)
 Constructs a generic enum corresponding to the given schema schema, which should be of Avro type enum.
const std::string & symbol (size_t n)
 Returns the symbol corresponding to the cardinal n.
size_t index (const std::string &symbol) const
 Returns the cardinal for the given symbol symbol.
size_t set (const std::string &symbol)
 Set the value for this enum corresponding to the given symbol symbol.
void set (size_t n)
 Set the value for this enum corresponding to the given cardinal n.
size_t value () const
 Returns the cardinal for the current value of this enum.
const std::string & symbol () const
 Returns the symbol for the current value of this enum.

Detailed Description

Generic container for Avro enum.


Member Function Documentation

size_t avro::GenericEnum::index ( const std::string &  symbol) const [inline]

Returns the cardinal for the given symbol symbol.

If the symbol is not defined for this enum and exception is thrown.

const std::string& avro::GenericEnum::symbol ( size_t  n) [inline]

Returns the symbol corresponding to the cardinal n.

If the value for n is not within the limits an exception is thrown.


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