NlohmannJSONReader Class Reference

#include <RobotAPI/libraries/aron/core/type/rw/reader/nlohmannJSON/NlohmannJSONReader.h>

+ Inheritance diagram for NlohmannJSONReader:

Public Member Functions

type::Descriptor getDescriptor (InputType &input) final
 
 NlohmannJSONReader ()=default
 
void readAnyObject (InputType &input, type::Maybe &maybe, Path &p) override
 
void readBool (InputType &input, std::optional< bool > &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readDict (InputType &input, InputTypeNonConst &acceptedType, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readDouble (InputType &input, std::optional< double > &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readFloat (InputType &input, std::optional< float > &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readImage (InputType &input, type::image::PixelType &type, std::string &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readInt (InputType &input, std::optional< int > &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readIntEnum (InputType &input, std::string &name, std::map< std::string, int > &acceptedValues, std::string &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readList (InputType &input, InputTypeNonConst &acceptedType, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readLong (InputType &input, std::optional< long > &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readMatrix (InputType &input, int &rows, int &cols, type::matrix::ElementType &type, std::string &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readNDArray (InputType &input, int &ndim, type::ndarray::ElementType &type, std::string &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readObject (InputType &input, std::string &name, std::vector< std::string > &templates, std::vector< std::string > &templateInstantiations, std::map< std::string, InputTypeNonConst > &memberTypes, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readPair (InputType &input, InputTypeNonConst &acceptedType1, InputTypeNonConst &acceptedType2, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readPointCloud (InputType &input, type::pointcloud::VoxelType &type, std::string &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readQuaternion (InputType &input, type::quaternion::ElementType &type, std::string &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readString (InputType &input, std::optional< std::string > &defaultValue, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
void readTuple (InputType &input, std::vector< InputTypeNonConst > &acceptedTypes, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) override
 
- Public Member Functions inherited from ReaderInterface< I >
virtual void readAnyObject (const InputType &input, type::Maybe &maybe, Path &p)=0
 Extract information from an time type. More...
 
virtual void readBool (const InputType &input, std::optional< bool > &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from an bool type. More...
 
virtual void readDict (const InputType &input, InputTypeNonConst &acceptedType, type::Maybe &maybe, Path &p)=0
 Extract information from a dict type. More...
 
virtual void readDouble (const InputType &input, std::optional< double > &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from an double type. More...
 
virtual void readFloat (const InputType &input, std::optional< float > &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from an float type. More...
 
virtual void readImage (const InputType &input, type::image::PixelType &type, std::string &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from an image type. More...
 
virtual void readInt (const InputType &input, std::optional< int > &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from an int type. More...
 
virtual void readIntEnum (const InputType &input, std::string &name, std::map< std::string, int > &acceptedValues, std::string &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from an int enum type. More...
 
virtual void readList (const InputType &input, InputTypeNonConst &acceptedType, type::Maybe &maybe, Path &p)=0
 Extract information from a list type. More...
 
virtual void readLong (const InputType &input, std::optional< long > &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from an long type. More...
 
virtual void readMatrix (const InputType &input, int &rows, int &cols, type::matrix::ElementType &type, std::string &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from a matrix type. More...
 
virtual void readNDArray (const InputType &input, int &ndim, type::ndarray::ElementType &type, std::string &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from a ndarray type. More...
 
virtual bool readNull (InputType &input)
 Check if input is null. More...
 
virtual void readObject (const InputType &input, std::string &name, std::vector< std::string > &templates, std::vector< std::string > &templateInstantiations, std::map< std::string, InputTypeNonConst > &memberTypes, type::Maybe &maybe, Path &p)=0
 Extract information from an Object type. More...
 
virtual void readPair (const InputType &input, InputTypeNonConst &acceptedTypes1, InputTypeNonConst &acceptedTypes2, type::Maybe &maybe, Path &p)=0
 Extract information from a pair type. More...
 
virtual void readPointCloud (const InputType &input, type::pointcloud::VoxelType &type, std::string &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from a pointcloud type. More...
 
virtual void readQuaternion (const InputType &input, type::quaternion::ElementType &type, std::string &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from a quaternion type. More...
 
virtual void readString (const InputType &input, std::optional< std::string > &defaultValue, type::Maybe &maybe, Path &p)=0
 Extract information from an string type. More...
 
virtual void readTuple (const InputType &input, std::vector< InputTypeNonConst > &acceptedTypes, type::Maybe &maybe, Path &p)=0
 Extract information from a tuple type. More...
 
virtual ~ReaderInterface ()=default
 

Additional Inherited Members

- Public Types inherited from ReaderInterface< I >
using InputType = I
 
using InputTypeNonConst = typename std::remove_const< InputType >::type
 

Detailed Description

Definition at line 35 of file NlohmannJSONReader.h.

Constructor & Destructor Documentation

◆ NlohmannJSONReader()

NlohmannJSONReader ( )
default

Member Function Documentation

◆ getDescriptor()

type::Descriptor getDescriptor ( InputType input)
finalvirtual

Implements ReaderInterface< I >.

Definition at line 59 of file NlohmannJSONReader.cpp.

+ Here is the call graph for this function:

◆ readAnyObject()

void readAnyObject ( InputType input,
type::Maybe &  maybe,
Path p 
)
override

Definition at line 324 of file NlohmannJSONReader.cpp.

◆ readBool()

void readBool ( InputType input,
std::optional< bool > &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readDict()

void readDict ( InputType input,
InputTypeNonConst acceptedType,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readDouble()

void readDouble ( InputType input,
std::optional< double > &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readFloat()

void readFloat ( InputType input,
std::optional< float > &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readImage()

void readImage ( InputType input,
type::image::PixelType &  type,
std::string &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr<Path>(new Path()) 
)
override

Definition at line 217 of file NlohmannJSONReader.cpp.

◆ readInt()

void readInt ( InputType input,
std::optional< int > &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readIntEnum()

void readIntEnum ( InputType input,
std::string &  name,
std::map< std::string, int > &  acceptedValues,
std::string &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr<Path>(new Path()) 
)
override

Definition at line 233 of file NlohmannJSONReader.cpp.

◆ readList()

void readList ( InputType input,
InputTypeNonConst acceptedType,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readLong()

void readLong ( InputType input,
std::optional< long > &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readMatrix()

void readMatrix ( InputType input,
int &  rows,
int &  cols,
type::matrix::ElementType &  type,
std::string &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr<Path>(new Path()) 
)
override

Definition at line 164 of file NlohmannJSONReader.cpp.

+ Here is the call graph for this function:

◆ readNDArray()

void readNDArray ( InputType input,
int &  ndim,
type::ndarray::ElementType &  type,
std::string &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readObject()

void readObject ( InputType input,
std::string &  name,
std::vector< std::string > &  templates,
std::vector< std::string > &  templateInstantiations,
std::map< std::string, InputTypeNonConst > &  memberTypes,
type::Maybe &  maybe,
Path p = *std::unique_ptr<Path>(new Path()) 
)
override

Definition at line 65 of file NlohmannJSONReader.cpp.

◆ readPair()

void readPair ( InputType input,
InputTypeNonConst acceptedType1,
InputTypeNonConst acceptedType2,
type::Maybe &  maybe,
Path p = *std::unique_ptr<Path>(new Path()) 
)
override

Definition at line 130 of file NlohmannJSONReader.cpp.

+ Here is the call graph for this function:

◆ readPointCloud()

void readPointCloud ( InputType input,
type::pointcloud::VoxelType &  type,
std::string &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr<Path>(new Path()) 
)
override

Definition at line 201 of file NlohmannJSONReader.cpp.

◆ readQuaternion()

void readQuaternion ( InputType input,
type::quaternion::ElementType &  type,
std::string &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr<Path>(new Path()) 
)
override

Definition at line 185 of file NlohmannJSONReader.cpp.

◆ readString()

void readString ( InputType input,
std::optional< std::string > &  defaultValue,
type::Maybe &  maybe,
Path p = *std::unique_ptr< Path >(new Path()) 
)
override

◆ readTuple()

void readTuple ( InputType input,
std::vector< InputTypeNonConst > &  acceptedTypes,
type::Maybe &  maybe,
Path p = *std::unique_ptr<Path>(new Path()) 
)
override

Definition at line 117 of file NlohmannJSONReader.cpp.


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