VariantWriter Class Reference

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

+ Inheritance diagram for VariantWriter:

Public Member Functions

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

Detailed Description

Definition at line 35 of file VariantWriter.h.

Constructor & Destructor Documentation

◆ VariantWriter()

VariantWriter ( )
default

Member Function Documentation

◆ getDescriptor()

data::Descriptor getDescriptor ( ReturnTypeConst input)
finalvirtual

Implements WriterInterface< data::VariantPtr >.

Definition at line 35 of file VariantWriter.cpp.

+ Here is the call graph for this function:

◆ writeBool()

data::VariantPtr writeBool ( const bool  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< data::VariantPtr >.

Definition at line 106 of file VariantWriter.cpp.

◆ writeDict()

data::VariantPtr writeDict ( const std::map< std::string, data::VariantPtr > &  elements,
const std::optional< data::VariantPtr > &  extends = std::nullopt,
const Path p = Path() 
)
override

Definition at line 50 of file VariantWriter.cpp.

+ Here is the call graph for this function:

◆ writeDouble()

data::VariantPtr writeDouble ( const double  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< data::VariantPtr >.

Definition at line 92 of file VariantWriter.cpp.

◆ writeFloat()

data::VariantPtr writeFloat ( const float  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< data::VariantPtr >.

Definition at line 85 of file VariantWriter.cpp.

◆ writeInt()

data::VariantPtr writeInt ( const int  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< data::VariantPtr >.

Definition at line 71 of file VariantWriter.cpp.

◆ writeList()

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

Implements WriterInterface< data::VariantPtr >.

Definition at line 40 of file VariantWriter.cpp.

◆ writeLong()

data::VariantPtr writeLong ( const long  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< data::VariantPtr >.

Definition at line 78 of file VariantWriter.cpp.

◆ writeNDArray()

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

Implements WriterInterface< data::VariantPtr >.

Definition at line 61 of file VariantWriter.cpp.

◆ writeString()

data::VariantPtr writeString ( const std::string &  i,
const Path p = Path() 
)
overridevirtual

Implements WriterInterface< data::VariantPtr >.

Definition at line 99 of file VariantWriter.cpp.


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