NlohmannJSONWriter Class Reference

#include <RobotAPI/libraries/aron/core/data/rw/writer/nlohmannJSON/NlohmannJSONWriter.h>

+ Inheritance diagram for NlohmannJSONWriter:

Public Member Functions

data::Descriptor getDescriptor (ReturnTypeConst &input) final
 
 NlohmannJSONWriter ()=default
 
nlohmann::json writeBool (const bool i, const Path &p=Path()) override
 
nlohmann::json writeDict (const std::map< std::string, nlohmann::json > &elements, const std::optional< nlohmann::json > &extends=std::nullopt, const Path &p=Path()) override
 
nlohmann::json writeDouble (const double i, const Path &p=Path()) override
 
nlohmann::json writeFloat (const float i, const Path &p=Path()) override
 
nlohmann::json writeInt (const int i, const Path &p=Path()) override
 
nlohmann::json writeList (const std::vector< nlohmann::json > &elements, const Path &p=Path()) override
 
nlohmann::json writeLong (const long i, const Path &p=Path()) override
 
nlohmann::json writeNDArray (const std::vector< int > &shape, const std::string &typeAsString, const unsigned char *data, const Path &p=Path()) override
 
nlohmann::json writeString (const std::string &i, const Path &p=Path()) override
 
- Public Member Functions inherited from WriterInterface< nlohmann::json >
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 ~WriterInterface ()=default
 

Additional Inherited Members

- Public Types inherited from WriterInterface< nlohmann::json >
using ReturnType = nlohmann::json
 
using ReturnTypeConst = typename std::add_const< ReturnType >::type
 

Detailed Description

Definition at line 36 of file NlohmannJSONWriter.h.

Constructor & Destructor Documentation

◆ NlohmannJSONWriter()

NlohmannJSONWriter ( )
default

Member Function Documentation

◆ getDescriptor()

data::Descriptor getDescriptor ( ReturnTypeConst input)
finalvirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 45 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writeBool()

nlohmann::json writeBool ( const bool  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 121 of file NlohmannJSONWriter.cpp.

◆ writeDict()

nlohmann::json writeDict ( const std::map< std::string, nlohmann::json > &  elements,
const std::optional< nlohmann::json > &  extends = std::nullopt,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 58 of file NlohmannJSONWriter.cpp.

◆ writeDouble()

nlohmann::json writeDouble ( const double  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 105 of file NlohmannJSONWriter.cpp.

◆ writeFloat()

nlohmann::json writeFloat ( const float  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 97 of file NlohmannJSONWriter.cpp.

◆ writeInt()

nlohmann::json writeInt ( const int  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 81 of file NlohmannJSONWriter.cpp.

◆ writeList()

nlohmann::json writeList ( const std::vector< nlohmann::json > &  elements,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 50 of file NlohmannJSONWriter.cpp.

◆ writeLong()

nlohmann::json writeLong ( const long  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 89 of file NlohmannJSONWriter.cpp.

◆ writeNDArray()

nlohmann::json writeNDArray ( const std::vector< int > &  shape,
const std::string &  typeAsString,
const unsigned char *  data,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 67 of file NlohmannJSONWriter.cpp.

◆ writeString()

nlohmann::json writeString ( const std::string &  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 113 of file NlohmannJSONWriter.cpp.


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