VariantWriter Class Reference

#include <RobotAPI/libraries/aron/core/type/rw/writer/variant/VariantWriter.h>

+ Inheritance diagram for VariantWriter:

Public Member Functions

type::Descriptor getDescriptor (ReturnTypeConst &input) final
 
 VariantWriter ()=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
 
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
 
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
 
ReturnType writePair (const ReturnType &acceptedType1, const ReturnType &acceptedType2, const type::Maybe maybe, const Path &p=Path()) override
 
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
 
- Public Member Functions inherited from WriterInterface< aron::type::VariantPtr >
virtual ReturnType writeDict (const ReturnType &acceptedType, const type::Maybe maybe, const Path &p)=0
 Construct a dict from the params. More...
 
virtual ReturnType writeList (const ReturnType &acceptedType, const type::Maybe maybe, const Path &p)=0
 Construct a list from the params. More...
 
virtual ReturnType writeNull (const Path &p=Path())
 write a null More...
 
virtual 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)=0
 Construct an object from the params. More...
 
virtual ReturnType writePair (const ReturnType &acceptedType1, const ReturnType &acceptedType2, const type::Maybe maybe, const Path &p)=0
 Construct a pair from the params. More...
 
virtual ReturnType writeTuple (const std::vector< ReturnType > &acceptedTypes, const type::Maybe maybe, const Path &p)=0
 Construct a tuple from the params. More...
 
virtual ~WriterInterface ()=default
 

Additional Inherited Members

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

Detailed Description

Definition at line 31 of file VariantWriter.h.

Constructor & Destructor Documentation

◆ VariantWriter()

VariantWriter ( )
default

Member Function Documentation

◆ getDescriptor()

type::Descriptor getDescriptor ( ReturnTypeConst input)
finalvirtual

Implements WriterInterface< aron::type::VariantPtr >.

Definition at line 33 of file VariantWriter.cpp.

+ Here is the call graph for this function:

◆ writeAnyObject()

aron::type::VariantPtr writeAnyObject ( const type::Maybe  maybe,
const Path p = Path() 
)
overridevirtual

Construct a time from the params.

Implements WriterInterface< aron::type::VariantPtr >.

Definition at line 259 of file VariantWriter.cpp.

◆ writeBool()

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

Construct a bool from the params.

Implements WriterInterface< aron::type::VariantPtr >.

Definition at line 248 of file VariantWriter.cpp.

◆ writeDict()

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

◆ writeDouble()

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

Construct a double from the params.

Implements WriterInterface< aron::type::VariantPtr >.

Definition at line 226 of file VariantWriter.cpp.

◆ writeFloat()

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

Construct a float from the params.

Implements WriterInterface< aron::type::VariantPtr >.

Definition at line 215 of file VariantWriter.cpp.

◆ writeImage()

aron::type::VariantPtr 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< aron::type::VariantPtr >.

Definition at line 152 of file VariantWriter.cpp.

◆ writeInt()

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

Construct a int from the params.

Implements WriterInterface< aron::type::VariantPtr >.

Definition at line 193 of file VariantWriter.cpp.

◆ writeIntEnum()

aron::type::VariantPtr 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< aron::type::VariantPtr >.

Definition at line 178 of file VariantWriter.cpp.

◆ writeList()

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

◆ writeLong()

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

Construct a long from the params.

Implements WriterInterface< aron::type::VariantPtr >.

Definition at line 204 of file VariantWriter.cpp.

◆ writeMatrix()

aron::type::VariantPtr 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< aron::type::VariantPtr >.

Definition at line 122 of file VariantWriter.cpp.

◆ writeNDArray()

aron::type::VariantPtr 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< aron::type::VariantPtr >.

Definition at line 108 of file VariantWriter.cpp.

◆ writeObject()

aron::type::VariantPtr 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

Definition at line 39 of file VariantWriter.cpp.

+ Here is the call graph for this function:

◆ writePair()

aron::type::VariantPtr writePair ( const ReturnType acceptedType1,
const ReturnType acceptedType2,
const type::Maybe  maybe,
const Path p = Path() 
)
override

Definition at line 84 of file VariantWriter.cpp.

◆ writePointCloud()

aron::type::VariantPtr 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< aron::type::VariantPtr >.

Definition at line 165 of file VariantWriter.cpp.

◆ writeQuaternion()

aron::type::VariantPtr 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< aron::type::VariantPtr >.

Definition at line 139 of file VariantWriter.cpp.

◆ writeString()

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

Construct a string from the params.

Implements WriterInterface< aron::type::VariantPtr >.

Definition at line 237 of file VariantWriter.cpp.

◆ writeTuple()

aron::type::VariantPtr writeTuple ( const std::vector< ReturnType > &  acceptedTypes,
const type::Maybe  maybe,
const Path p = Path() 
)
override

Definition at line 97 of file VariantWriter.cpp.


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