Public Member Functions | 
| 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 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 arbitray binary data to the current stream. 
  | 
| 
void  | encodeBytes (const std::vector< uint8_t > &bytes) | 
| 
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) | 
| 
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. 
  |