|
| virtual data::Descriptor | getDescriptor (ReturnTypeConst &input)=0 |
| |
| virtual ReturnType | writeBool (const bool i, const Path &p)=0 |
| |
| virtual ReturnType | writeDict (const std::map< std::string, ReturnType > &elements, const std::optional< ReturnType > &extends, const Path &p)=0 |
| |
| virtual ReturnType | writeDict (std::map< std::string, ReturnType > &&elements, const std::optional< ReturnType > &extends, const Path &p) |
| | Overload for callers that no longer need elements afterwards - which is the case for all generated write() code, since it builds the element map purely to hand it over.
|
| |
| virtual ReturnType | writeDouble (const double i, const Path &p)=0 |
| |
| virtual ReturnType | writeFloat (const float i, const Path &p)=0 |
| |
| virtual void | writeImportance (ReturnType &, const std::optional< float > &) |
| |
| virtual ReturnType | writeInt (const int i, const Path &p)=0 |
| |
| virtual ReturnType | writeList (const std::vector< ReturnType > &elements, const Path &p)=0 |
| |
| virtual ReturnType | writeList (std::vector< ReturnType > &&elements, const Path &p) |
| | Same bargain as the writeDict overload below, for lists.
|
| |
| virtual ReturnType | writeLong (const long i, const Path &p)=0 |
| |
| virtual ReturnType | writeNDArray (const std::vector< int > &shape, const std::string &typeAsString, const unsigned char *data, const Path &p)=0 |
| |
| virtual ReturnType | writeNull () |
| |
| ReturnType | writePrimitive (const bool i, const Path &p=Path()) |
| |
| ReturnType | writePrimitive (const double i, const Path &p=Path()) |
| |
| ReturnType | writePrimitive (const float i, const Path &p=Path()) |
| |
| ReturnType | writePrimitive (const int i, const Path &p=Path()) |
| |
| ReturnType | writePrimitive (const long i, const Path &p=Path()) |
| |
| ReturnType | writePrimitive (const std::string &i, const Path &p=Path()) |
| |
| virtual ReturnType | writeString (const std::string &i, const Path &p)=0 |
| |
| virtual | ~WriterInterface ()=default |
| |
Overload for callers that no longer need elements afterwards - which is the case for all generated write() code, since it builds the element map purely to hand it over.
The default implementation forwards to the copying overload, so writers that cannot take ownership need not implement anything. Writers that can (see VariantWriter) override this to avoid rebuilding the map element by element.
Reimplemented in AronDTOWriter, and NlohmannJSONWriter.