VariantReader Class Reference

#include <RobotAPI/libraries/aron/core/type/rw/reader/variant/VariantReader.h>

+ Inheritance diagram for VariantReader:

Public Member Functions

type::Descriptor getDescriptor (InputType &input) final
 
void readAnyObject (InputType &input, type::Maybe &maybe, Path &p= *std::unique_ptr< Path >(new Path())) 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
 
 VariantReader ()=default
 
- Public Member Functions inherited from ReaderInterface< const aron::type::VariantPtr >
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< const aron::type::VariantPtr >
using InputType = const aron::type::VariantPtr
 
using InputTypeNonConst = typename std::remove_const< InputType >::type
 

Detailed Description

Definition at line 35 of file VariantReader.h.

Constructor & Destructor Documentation

◆ VariantReader()

VariantReader ( )
default

Member Function Documentation

◆ getDescriptor()

type::Descriptor getDescriptor ( InputType input)
finalvirtual

Implements ReaderInterface< const aron::type::VariantPtr >.

Definition at line 37 of file VariantReader.cpp.

+ Here is the call graph for this function:

◆ readAnyObject()

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

Definition at line 309 of file VariantReader.cpp.

+ Here is the call graph for this function:

◆ 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 191 of file VariantReader.cpp.

+ Here is the call graph for this function:

◆ 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 207 of file VariantReader.cpp.

+ Here is the call graph for this function:

◆ 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 139 of file VariantReader.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 43 of file VariantReader.cpp.

+ Here is the call graph for this function:

◆ readPair()

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

Definition at line 105 of file VariantReader.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 175 of file VariantReader.cpp.

+ Here is the call graph for this function:

◆ 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 159 of file VariantReader.cpp.

+ Here is the call graph for this function:

◆ 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 91 of file VariantReader.cpp.

+ Here is the call graph for this function:

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