NlohmannJSONWriter Class Reference

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

+ Inheritance diagram for NlohmannJSONWriter:

Public Member Functions

type::Descriptor getDescriptor (ReturnTypeConst &input) final
 
 NlohmannJSONWriter ()=default
 
ReturnType writeAnyObject (const type::Maybe maybe, const Path &p=Path()) override
 Construct a time from the params. More...
 
ReturnType writeBool (const std::optional< bool > &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a bool from the params. More...
 
ReturnType writeDict (const ReturnType &acceptedType, const type::Maybe maybe, const Path &p=Path()) override
 Construct a dict from the params. More...
 
ReturnType writeDouble (const std::optional< double > &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a double from the params. More...
 
ReturnType writeFloat (const std::optional< float > &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a float from the params. More...
 
ReturnType writeImage (const type::image::PixelType, const std::string &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a image from the params. More...
 
ReturnType writeInt (const std::optional< int > &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a int from the params. More...
 
ReturnType writeIntEnum (const std::string &name, const std::map< std::string, int > &acceptedValues, const std::string &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a int enum from the params. More...
 
ReturnType writeList (const ReturnType &acceptedType, const type::Maybe maybe, const Path &p=Path()) override
 Construct a list from the params. More...
 
ReturnType writeLong (const std::optional< long > &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a long from the params. More...
 
ReturnType writeMatrix (const int rows, const int cols, const type::matrix::ElementType type, const std::string &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a matrix from the params. More...
 
ReturnType writeNDArray (const int ndim, const type::ndarray::ElementType, const std::string &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a ndarray from the params. More...
 
ReturnType writeObject (const std::string &name, const std::vector< std::string > &templates, const std::vector< std::string > &templateInstantiations, const std::map< std::string, ReturnType > &memberTypes, const std::optional< ReturnType > &extends, const type::Maybe maybe, const Path &p=Path()) override
 Construct an object from the params. More...
 
ReturnType writePair (const ReturnType &acceptedType1, const ReturnType &acceptedType2, const type::Maybe maybe, const Path &p=Path()) override
 Construct a pair from the params. More...
 
ReturnType writePointCloud (const type::pointcloud::VoxelType, const std::string &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a pointcloud from the params. More...
 
ReturnType writeQuaternion (const type::quaternion::ElementType, const std::string &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a quaternion from the params. More...
 
ReturnType writeString (const std::optional< std::string > &defaultValue, const type::Maybe maybe, const Path &p=Path()) override
 Construct a string from the params. More...
 
ReturnType writeTuple (const std::vector< ReturnType > &acceptedTypes, const type::Maybe maybe, const Path &p=Path()) override
 Construct a tuple from the params. More...
 
- Public Member Functions inherited from WriterInterface< nlohmann::json >
virtual ReturnType writeNull (const Path &p=Path())
 write a null More...
 
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()

type::Descriptor getDescriptor ( ReturnTypeConst input)
finalvirtual

Implements WriterInterface< nlohmann::json >.

Definition at line 50 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writeAnyObject()

nlohmann::json writeAnyObject ( const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a time from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 298 of file NlohmannJSONWriter.cpp.

◆ writeBool()

nlohmann::json writeBool ( const std::optional< bool > &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a bool from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 286 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writeDict()

ReturnType writeDict ( const ReturnType acceptedType,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a dict from the params.

Implements WriterInterface< nlohmann::json >.

◆ writeDouble()

nlohmann::json writeDouble ( const std::optional< double > &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a double from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 263 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writeFloat()

nlohmann::json writeFloat ( const std::optional< float > &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a float from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 251 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writeImage()

nlohmann::json writeImage ( const type::image::PixelType  type,
const std::string &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a image from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 180 of file NlohmannJSONWriter.cpp.

◆ writeInt()

nlohmann::json writeInt ( const std::optional< int > &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a int from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 227 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writeIntEnum()

nlohmann::json writeIntEnum ( const std::string &  name,
const std::map< std::string, int > &  acceptedValues,
const std::string &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a int enum from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 207 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writeList()

ReturnType writeList ( const ReturnType acceptedType,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a list from the params.

Implements WriterInterface< nlohmann::json >.

◆ writeLong()

nlohmann::json writeLong ( const std::optional< long > &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a long from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 239 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writeMatrix()

nlohmann::json writeMatrix ( const int  rows,
const int  cols,
const type::matrix::ElementType  type,
const std::string &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a matrix from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 149 of file NlohmannJSONWriter.cpp.

◆ writeNDArray()

nlohmann::json writeNDArray ( const int  ndim,
const type::ndarray::ElementType  type,
const std::string &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a ndarray from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 134 of file NlohmannJSONWriter.cpp.

◆ writeObject()

nlohmann::json writeObject ( const std::string &  name,
const std::vector< std::string > &  templates,
const std::vector< std::string > &  templateInstantiations,
const std::map< std::string, ReturnType > &  memberTypes,
const std::optional< ReturnType > &  extends,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct an object from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 56 of file NlohmannJSONWriter.cpp.

+ Here is the call graph for this function:

◆ writePair()

nlohmann::json writePair ( const ReturnType acceptedType1,
const ReturnType acceptedType2,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a pair from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 111 of file NlohmannJSONWriter.cpp.

◆ writePointCloud()

nlohmann::json writePointCloud ( const type::pointcloud::VoxelType  ,
const std::string &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a pointcloud from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 193 of file NlohmannJSONWriter.cpp.

◆ writeQuaternion()

nlohmann::json writeQuaternion ( const type::quaternion::ElementType  type,
const std::string &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a quaternion from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 165 of file NlohmannJSONWriter.cpp.

◆ writeString()

nlohmann::json writeString ( const std::optional< std::string > &  defaultValue,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a string from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 275 of file NlohmannJSONWriter.cpp.

◆ writeTuple()

nlohmann::json writeTuple ( const std::vector< ReturnType > &  acceptedTypes,
const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a tuple from the params.

Implements WriterInterface< nlohmann::json >.

Definition at line 123 of file NlohmannJSONWriter.cpp.


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