|
Avro C++
|
Generic container for Avro enum. More...
#include <GenericDatum.hh>
Public Member Functions | |
| GenericEnum (const NodePtr &schema) | |
Constructs a generic enum corresponding to the given schema schema, which should be of Avro type enum. | |
| GenericEnum (const NodePtr &schema, const std::string &symbol) | |
| const std::string & | symbol (size_t n) |
Returns the symbol corresponding to the cardinal n. More... | |
| size_t | index (const std::string &symbol) const |
Returns the cardinal for the given symbol symbol. More... | |
| 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. | |
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. | |
Generic container for Avro enum.
|
inline |
Returns the cardinal for the given symbol symbol.
If the symbol is not defined for this enum and exception is thrown.
|
inline |
Returns the symbol corresponding to the cardinal n.
If the value for n is not within the limits an exception is thrown.
1.8.17