ReaderInterface< I, E > Class Template Referenceabstract

#include <RobotAPI/libraries/aron/core/data/rw/Reader.h>

Public Types

using ElementType = E
 
using InputType = I
 
using InputTypeNonConst = typename std::remove_const<InputType>::type
 

Public Member Functions

virtual data::Descriptor getDescriptor (InputType &input)=0
 
void readBool (InputType &input, bool &i)
 
virtual void readBool (InputType &input, bool &i, Path &)=0
 
void readDict (InputType &input, std::map< std::string, ElementType > &elements)
 
virtual void readDict (InputType &input, std::map< std::string, ElementType > &elements, Path &)=0
 
void readDouble (InputType &input, double &i)
 
virtual void readDouble (InputType &input, double &i, Path &)=0
 
void readFloat (InputType &input, float &i)
 
virtual void readFloat (InputType &input, float &i, Path &)=0
 
virtual std::optional< float > readImportance (InputType &)
 
void readInt (InputType &input, int &i)
 
virtual void readInt (InputType &input, int &i, Path &)=0
 
void readList (InputType &input, std::vector< ElementType > &elements)
 
virtual void readList (InputType &input, std::vector< ElementType > &elements, Path &)=0
 
void readLong (InputType &input, long &i)
 
virtual void readLong (InputType &input, long &i, Path &)=0
 
void readNDArray (InputType &input, std::vector< int > &shape, std::string &typeAsString, std::vector< unsigned char > &data)
 
virtual void readNDArray (InputType &input, std::vector< int > &shape, std::string &typeAsString, std::vector< unsigned char > &data, Path &)=0
 
virtual bool readNull (InputType &input)
 
void readPrimitive (InputType &input, bool &i)
 
void readPrimitive (InputType &input, bool &i, Path &p)
 
void readPrimitive (InputType &input, double &i)
 
void readPrimitive (InputType &input, double &i, Path &p)
 
void readPrimitive (InputType &input, float &i)
 
void readPrimitive (InputType &input, float &i, Path &p)
 
void readPrimitive (InputType &input, int &i)
 
void readPrimitive (InputType &input, int &i, Path &p)
 
void readPrimitive (InputType &input, long &i)
 
void readPrimitive (InputType &input, long &i, Path &p)
 
void readPrimitive (InputType &input, std::string &i)
 
void readPrimitive (InputType &input, std::string &i, Path &p)
 
void readString (InputType &input, std::string &s)
 
virtual void readString (InputType &input, std::string &s, Path &)=0
 
virtual ~ReaderInterface ()=default
 

Detailed Description

template<class I, class E = typename std::remove_const<I>::type>
class armarx::aron::data::ReaderInterface< I, E >
Template Parameters
Ithe input node type
Ewhat readDict/readList hand out per child. Defaults to a non-const copy of the input type; a reader whose nodes own their subtree should instead hand out const I* so that recursing into children costs nothing. It has to be a template parameter rather than a member alias, because the virtuals' signatures are fixed when the base is instantiated – a using in a derived class would silently declare a new overload and leave the pure virtual unimplemented.

Member Typedef Documentation

◆ ElementType

template<class I, class E = typename std::remove_const<I>::type>
using ElementType = E

◆ InputType

template<class I, class E = typename std::remove_const<I>::type>
using InputType = I

◆ InputTypeNonConst

template<class I, class E = typename std::remove_const<I>::type>
using InputTypeNonConst = typename std::remove_const<InputType>::type

Constructor & Destructor Documentation

◆ ~ReaderInterface()

template<class I, class E = typename std::remove_const<I>::type>
virtual ~ReaderInterface ( )
virtualdefault

Member Function Documentation

◆ getDescriptor()

template<class I, class E = typename std::remove_const<I>::type>
virtual data::Descriptor getDescriptor ( InputType & input)
pure virtual

Implemented in NlohmannJSONReader, and VariantReader.

◆ readBool() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readBool ( InputType & input,
bool & i )
inline

◆ readBool() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readBool ( InputType & input,
bool & i,
Path &  )
pure virtual

◆ readDict() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readDict ( InputType & input,
std::map< std::string, ElementType > & elements )
inline

◆ readDict() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readDict ( InputType & input,
std::map< std::string, ElementType > & elements,
Path &  )
pure virtual

◆ readDouble() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readDouble ( InputType & input,
double & i )
inline

◆ readDouble() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readDouble ( InputType & input,
double & i,
Path &  )
pure virtual

◆ readFloat() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readFloat ( InputType & input,
float & i )
inline

◆ readFloat() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readFloat ( InputType & input,
float & i,
Path &  )
pure virtual

◆ readImportance()

template<class I, class E = typename std::remove_const<I>::type>
virtual std::optional< float > readImportance ( InputType & )
inlinevirtual

Reimplemented in NlohmannJSONReader, and VariantReader.

◆ readInt() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readInt ( InputType & input,
int & i )
inline

◆ readInt() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readInt ( InputType & input,
int & i,
Path &  )
pure virtual

◆ readList() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readList ( InputType & input,
std::vector< ElementType > & elements )
inline

◆ readList() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readList ( InputType & input,
std::vector< ElementType > & elements,
Path &  )
pure virtual

◆ readLong() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readLong ( InputType & input,
long & i )
inline

◆ readLong() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readLong ( InputType & input,
long & i,
Path &  )
pure virtual

◆ readNDArray() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readNDArray ( InputType & input,
std::vector< int > & shape,
std::string & typeAsString,
std::vector< unsigned char > & data )
inline

◆ readNDArray() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readNDArray ( InputType & input,
std::vector< int > & shape,
std::string & typeAsString,
std::vector< unsigned char > & data,
Path &  )
pure virtual

◆ readNull()

template<class I, class E = typename std::remove_const<I>::type>
virtual bool readNull ( InputType & input)
inlinevirtual

◆ readPrimitive() [1/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
bool & i )
inline

◆ readPrimitive() [2/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
bool & i,
Path & p )
inline

◆ readPrimitive() [3/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
double & i )
inline

◆ readPrimitive() [4/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
double & i,
Path & p )
inline

◆ readPrimitive() [5/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
float & i )
inline

◆ readPrimitive() [6/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
float & i,
Path & p )
inline

◆ readPrimitive() [7/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
int & i )
inline

◆ readPrimitive() [8/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
int & i,
Path & p )
inline

◆ readPrimitive() [9/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
long & i )
inline

◆ readPrimitive() [10/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
long & i,
Path & p )
inline

◆ readPrimitive() [11/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
std::string & i )
inline

◆ readPrimitive() [12/12]

template<class I, class E = typename std::remove_const<I>::type>
void readPrimitive ( InputType & input,
std::string & i,
Path & p )
inline

◆ readString() [1/2]

template<class I, class E = typename std::remove_const<I>::type>
void readString ( InputType & input,
std::string & s )
inline

◆ readString() [2/2]

template<class I, class E = typename std::remove_const<I>::type>
virtual void readString ( InputType & input,
std::string & s,
Path &  )
pure virtual

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