|
virtual void | init (OutputStream &os)=0 |
| All future encodings will go to os, which should be valid until it is reset with another call to init() or the encoder is destructed.
|
|
virtual void | flush ()=0 |
| Flushes any data in internal buffers.
|
|
virtual int64_t | byteCount () const =0 |
| Returns the number of bytes produced so far. More...
|
|
virtual void | encodeNull ()=0 |
| Encodes a null to the current stream.
|
|
virtual void | encodeBool (bool b)=0 |
| Encodes a bool to the current stream.
|
|
virtual void | encodeInt (int32_t i)=0 |
| Encodes a 32-bit int to the current stream.
|
|
virtual void | encodeLong (int64_t l)=0 |
| Encodes a 64-bit signed int to the current stream.
|
|
virtual void | encodeFloat (float f)=0 |
| Encodes a single-precision floating point number to the current stream.
|
|
virtual void | encodeDouble (double d)=0 |
| Encodes a double-precision floating point number to the current stream.
|
|
virtual void | encodeString (const std::string &s)=0 |
| Encodes a UTF-8 string to the current stream.
|
|
virtual void | encodeBytes (const uint8_t *bytes, size_t len)=0 |
| Encodes arbitrary binary data into the current stream as Avro "bytes" data type. More...
|
|
void | encodeBytes (const std::vector< uint8_t > &bytes) |
| Encodes arbitrary binary data into the current stream as Avro "bytes" data type. More...
|
|
virtual void | encodeFixed (const uint8_t *bytes, size_t len)=0 |
| Encodes fixed length binary to the current stream.
|
|
void | encodeFixed (const std::vector< uint8_t > &bytes) |
| Encodes an Avro data type Fixed. More...
|
|
virtual void | encodeEnum (size_t e)=0 |
| Encodes enum to the current stream.
|
|
virtual void | arrayStart ()=0 |
| Indicates that an array of items is being encoded.
|
|
virtual void | arrayEnd ()=0 |
| Indicates that the current array of items have ended.
|
|
virtual void | mapStart ()=0 |
| Indicates that a map of items is being encoded.
|
|
virtual void | mapEnd ()=0 |
| Indicates that the current map of items have ended.
|
|
virtual void | setItemCount (size_t count)=0 |
| Indicates that count number of items are to follow in the current array or map.
|
|
virtual void | startItem ()=0 |
| Marks a beginning of an item in the current array or map.
|
|
virtual void | encodeUnionIndex (size_t e)=0 |
| Encodes a branch of a union. The actual value is to follow.
|
|
The abstract base class for all Avro encoders.
The implementations differ in the method of encoding (binary versus JSON) or in capabilities such as ability to verify the order of invocation of different functions.