Generator Class Referenceabstract

#include <RobotAPI/libraries/aron/codegeneration/codegenerator/codewriter/cpp/generator/Generator.h>

+ Inheritance diagram for Generator:

Public Types

using PointerType = GeneratorPtr
 

Public Member Functions

 Generator ()=delete
 
 Generator (const std::string &instantiatedCppTypename, const std::string &classCppTypename, const std::string &aronDataTypename, const std::string &aronTypeTypename)
 
std::string getClassCppTypename () const
 
virtual CppBlockPtr getCopyCtorBlock (const std::string &) const
 
virtual std::pair< std::vector< std::pair< std::string, std::string > >, bool > getCopyCtorInitializers (const std::string &) const
 
virtual CppBlockPtr getCtorBlock (const std::string &) const
 
virtual std::pair< std::vector< std::pair< std::string, std::string > >, bool > getCtorInitializers (const std::string &) const
 
virtual CppBlockPtr getDtorBlock (const std::string &) const
 
virtual CppBlockPtr getEqualsBlock (const std::string &cppAccessorThis, const std::string &cppAccessorOther) const
 
std::string getFullClassCppTypename () const
 
std::string getFullInstantiatedCppTypename () const
 
std::string getFullInstantiatedCppTypenameGenerator () const
 
std::string getInstantiatedCppTypename () const
 
virtual std::vector< CppFieldPtrgetPublicVariableDeclarations (const std::string &) const
 
virtual CppBlockPtr getReadBlock (const std::string &cppAccessor, const std::string &variantAccessor) const =0
 
virtual std::vector< std::string > getRequiredIncludes () const
 
virtual CppBlockPtr getResetHardBlock (const std::string &cppAccessor) const
 
virtual CppBlockPtr getResetSoftBlock (const std::string &cppAccessor) const
 
virtual const type::VariantgetType () const =0
 
virtual CppBlockPtr getWriteBlock (const std::string &cppAccessor, const Path &, std::string &variantAccessor) const =0
 
virtual CppBlockPtr getWriteTypeBlock (const std::string &typeAccessor, const std::string &cppAccessor, const Path &, std::string &variantAccessor) const =0
 
CppCtorPtr toCopyCtor (const std::string &) const
 
CppCtorPtr toCtor (const std::string &) const
 
CppMethodPtr toDtor (const std::string &) const
 
CppMethodPtr toEqualsMethod () const
 
CppMethodPtr toReadMethod () const
 
CppMethodPtr toResetHardMethod () const
 
CppMethodPtr toResetSoftMethod () const
 
CppMethodPtr toSpecializedDataReaderMethod (const ReaderInfo &info) const
 
CppMethodPtr toSpecializedDataWriterMethod (const WriterInfo &info) const
 
CppMethodPtr toSpecializedStaticDataReaderMethod (const StaticReaderInfo &info) const
 
CppMethodPtr toSpecializedTypeWriterMethod (const WriterInfo &info) const
 
CppMethodPtr toWriteMethod () const
 
CppMethodPtr toWriteTypeMethod () const
 
virtual ~Generator ()=default
 

Static Public Member Functions

static std::string EscapeAccessor (const std::string &)
 
static std::string ExtractCppTypename (const type::Variant &)
 
static std::vector< std::string > ExtractCppTypenames (const std::vector< type::VariantPtr > &)
 
static std::unique_ptr< GeneratorFromAronType (const type::Variant &)
 
static std::string OptionalFloatLiteral (const std::optional< float > &)
 

Protected Member Functions

std::string nextEl () const
 
std::string resolveMaybeAccessor (const std::string &) const
 
CppBlockPtr resolveMaybeEqualsBlock (const CppBlockPtr &, const std::string &, const std::string &) const
 
std::string resolveMaybeGenerator (const std::string &args="") const
 
std::string resolveMaybeGeneratorWithSetter (const std::string &, const std::string &args="") const
 
CppBlockPtr resolveMaybeReadBlock (const CppBlockPtr &, const std::string &, const std::string &) const
 
CppBlockPtr resolveMaybeResetHardBlock (const CppBlockPtr &, const std::string &) const
 
CppBlockPtr resolveMaybeResetSoftBlock (const CppBlockPtr &, const std::string &) const
 
CppBlockPtr resolveMaybeWriteBlock (const CppBlockPtr &, const std::string &) const
 
std::string toPointerAccessor (const std::string &) const
 

Static Protected Attributes

static const std::string ARON_MAYBE_TYPE_ACCESSOR
 
static const std::string ARON_OTHER_ACCESSOR = Generator::ARON_VARIABLE_PREFIX + "_o"
 
static const std::string ARON_PATH_ACCESSOR = Generator::ARON_VARIABLE_PREFIX + "_p"
 
static const std::string ARON_READER_ACCESSOR = Generator::ARON_VARIABLE_PREFIX + "_r"
 
static const std::string ARON_TEMPLATE_INSTANTIATIONS_ACCESSOR
 
static const std::string ARON_VARIABLE_PREFIX = "aron"
 
static const std::string ARON_VARIANT_RETURN_ACCESSOR
 
static const std::string ARON_WRITER_ACCESSOR = Generator::ARON_VARIABLE_PREFIX + "_w"
 

Detailed Description

Definition at line 63 of file Generator.h.

Member Typedef Documentation

◆ PointerType

Definition at line 66 of file Generator.h.

Constructor & Destructor Documentation

◆ Generator() [1/2]

Generator ( )
delete
+ Here is the caller graph for this function:

◆ Generator() [2/2]

Generator ( const std::string & instantiatedCppTypename,
const std::string & classCppTypename,
const std::string & aronDataTypename,
const std::string & aronTypeTypename )

Definition at line 118 of file Generator.cpp.

◆ ~Generator()

virtual ~Generator ( )
virtualdefault

Member Function Documentation

◆ EscapeAccessor()

std::string EscapeAccessor ( const std::string & accessor)
static

Definition at line 55 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ ExtractCppTypename()

std::string ExtractCppTypename ( const type::Variant & n)
static

Definition at line 93 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ExtractCppTypenames()

std::vector< std::string > ExtractCppTypenames ( const std::vector< type::VariantPtr > & n)
static

Definition at line 101 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromAronType()

std::unique_ptr< Generator > FromAronType ( const type::Variant & n)
static

Definition at line 112 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getClassCppTypename()

std::string getClassCppTypename ( ) const

Definition at line 183 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getCopyCtorBlock()

CppBlockPtr getCopyCtorBlock ( const std::string & ) const
virtual

Definition at line 538 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getCopyCtorInitializers()

std::pair< std::vector< std::pair< std::string, std::string > >, bool > getCopyCtorInitializers ( const std::string & name) const
virtual

Reimplemented in ObjectClass.

Definition at line 522 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCtorBlock()

CppBlockPtr getCtorBlock ( const std::string & ) const
virtual

Definition at line 516 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getCtorInitializers()

std::pair< std::vector< std::pair< std::string, std::string > >, bool > getCtorInitializers ( const std::string & name) const
virtual

Reimplemented in Bool, Double, Float, Image, Int, IntEnum, Long, Matrix, NDArray, ObjectClass, PointCloud, Quaternion, and String.

Definition at line 510 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getDtorBlock()

CppBlockPtr getDtorBlock ( const std::string & ) const
virtual

Definition at line 544 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getEqualsBlock()

CppBlockPtr getEqualsBlock ( const std::string & cppAccessorThis,
const std::string & cppAccessorOther ) const
virtual

Reimplemented in Image, IntEnumClass, Matrix, ObjectClass, PointCloud, and Quaternion.

Definition at line 568 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFullClassCppTypename()

std::string getFullClassCppTypename ( ) const

Definition at line 189 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFullInstantiatedCppTypename()

std::string getFullInstantiatedCppTypename ( ) const

Definition at line 137 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFullInstantiatedCppTypenameGenerator()

std::string getFullInstantiatedCppTypenameGenerator ( ) const

Definition at line 160 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstantiatedCppTypename()

std::string getInstantiatedCppTypename ( ) const

Definition at line 131 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getPublicVariableDeclarations()

std::vector< CppFieldPtr > getPublicVariableDeclarations ( const std::string & name) const
virtual

Reimplemented in IntEnumClass, and ObjectClass.

Definition at line 503 of file Generator.cpp.

+ Here is the call graph for this function:

◆ getReadBlock()

virtual CppBlockPtr getReadBlock ( const std::string & cppAccessor,
const std::string & variantAccessor ) const
pure virtual

◆ getRequiredIncludes()

std::vector< std::string > getRequiredIncludes ( ) const
virtual

Reimplemented in AnyObject, Dict, Image, List, Matrix, Object, ObjectClass, Pair, PointCloud, Quaternion, and Tuple.

Definition at line 497 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getResetHardBlock()

CppBlockPtr getResetHardBlock ( const std::string & cppAccessor) const
virtual

Reimplemented in Bool, Double, Float, Image, Int, IntEnum, IntEnumClass, Long, Matrix, Object, ObjectClass, Quaternion, and String.

Definition at line 550 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getResetSoftBlock()

CppBlockPtr getResetSoftBlock ( const std::string & cppAccessor) const
virtual

Reimplemented in Bool, Dict, Double, Float, Image, Int, IntEnum, IntEnumClass, List, Long, Matrix, NDArray, Object, ObjectClass, Pair, PointCloud, Quaternion, String, and Tuple.

Definition at line 559 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getType()

◆ getWriteBlock()

virtual CppBlockPtr getWriteBlock ( const std::string & cppAccessor,
const Path & ,
std::string & variantAccessor ) const
pure virtual

◆ getWriteTypeBlock()

virtual CppBlockPtr getWriteTypeBlock ( const std::string & typeAccessor,
const std::string & cppAccessor,
const Path & ,
std::string & variantAccessor ) const
pure virtual

Implemented in AnyObject, Bool, Dict, Double, Float, Image, Int, IntEnum, IntEnumClass, List, Long, Matrix, NDArray, Object, ObjectClass, Pair, PointCloud, Quaternion, String, and Tuple.

+ Here is the caller graph for this function:

◆ nextEl()

std::string nextEl ( ) const
protected

Definition at line 634 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OptionalFloatLiteral()

std::string OptionalFloatLiteral ( const std::optional< float > & value)
static

Definition at line 74 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ resolveMaybeAccessor()

std::string resolveMaybeAccessor ( const std::string & s) const
protected

Definition at line 584 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveMaybeEqualsBlock()

CppBlockPtr resolveMaybeEqualsBlock ( const CppBlockPtr & block_if_data,
const std::string & accessor,
const std::string & otherInstanceAccessor ) const
protected

Definition at line 756 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveMaybeGenerator()

std::string resolveMaybeGenerator ( const std::string & args = "") const
protected

Definition at line 600 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveMaybeGeneratorWithSetter()

std::string resolveMaybeGeneratorWithSetter ( const std::string & s,
const std::string & args = "" ) const
protected

Definition at line 623 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveMaybeReadBlock()

CppBlockPtr resolveMaybeReadBlock ( const CppBlockPtr & block_if_data,
const std::string & cppAccessor,
const std::string & variantAccessor ) const
protected

Definition at line 732 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveMaybeResetHardBlock()

CppBlockPtr resolveMaybeResetHardBlock ( const CppBlockPtr & block_if_data,
const std::string & cppAccessor ) const
protected

Definition at line 676 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveMaybeResetSoftBlock()

CppBlockPtr resolveMaybeResetSoftBlock ( const CppBlockPtr & block_if_data,
const std::string & cppAccessor ) const
protected

Definition at line 698 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveMaybeWriteBlock()

CppBlockPtr resolveMaybeWriteBlock ( const CppBlockPtr & block_if_data,
const std::string & cppAccessor ) const
protected

Definition at line 715 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toCopyCtor()

CppCtorPtr toCopyCtor ( const std::string & name) const

Definition at line 230 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toCtor()

CppCtorPtr toCtor ( const std::string & name) const

Definition at line 212 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toDtor()

CppMethodPtr toDtor ( const std::string & name) const

Definition at line 250 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toEqualsMethod()

CppMethodPtr toEqualsMethod ( ) const

Definition at line 477 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toPointerAccessor()

std::string toPointerAccessor ( const std::string & cppAccessor) const
protected

Definition at line 654 of file Generator.cpp.

+ Here is the call graph for this function:

◆ toReadMethod()

CppMethodPtr toReadMethod ( ) const

Definition at line 360 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toResetHardMethod()

CppMethodPtr toResetHardMethod ( ) const

Definition at line 285 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toResetSoftMethod()

CppMethodPtr toResetSoftMethod ( ) const

Definition at line 268 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toSpecializedDataReaderMethod()

CppMethodPtr toSpecializedDataReaderMethod ( const ReaderInfo & info) const

Definition at line 416 of file Generator.cpp.

◆ toSpecializedDataWriterMethod()

CppMethodPtr toSpecializedDataWriterMethod ( const WriterInfo & info) const

Definition at line 395 of file Generator.cpp.

◆ toSpecializedStaticDataReaderMethod()

CppMethodPtr toSpecializedStaticDataReaderMethod ( const StaticReaderInfo & info) const

Definition at line 437 of file Generator.cpp.

◆ toSpecializedTypeWriterMethod()

CppMethodPtr toSpecializedTypeWriterMethod ( const WriterInfo & info) const

Definition at line 458 of file Generator.cpp.

◆ toWriteMethod()

CppMethodPtr toWriteMethod ( ) const

Definition at line 329 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toWriteTypeMethod()

CppMethodPtr toWriteTypeMethod ( ) const

Definition at line 302 of file Generator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ ARON_MAYBE_TYPE_ACCESSOR

const std::string ARON_MAYBE_TYPE_ACCESSOR
staticprotected
Initial value:
=
static const std::string ARON_VARIABLE_PREFIX
Definition Generator.h:162

Definition at line 164 of file Generator.h.

◆ ARON_OTHER_ACCESSOR

const std::string ARON_OTHER_ACCESSOR = Generator::ARON_VARIABLE_PREFIX + "_o"
staticprotected

Definition at line 170 of file Generator.h.

◆ ARON_PATH_ACCESSOR

const std::string ARON_PATH_ACCESSOR = Generator::ARON_VARIABLE_PREFIX + "_p"
staticprotected

Definition at line 165 of file Generator.h.

◆ ARON_READER_ACCESSOR

const std::string ARON_READER_ACCESSOR = Generator::ARON_VARIABLE_PREFIX + "_r"
staticprotected

Definition at line 166 of file Generator.h.

◆ ARON_TEMPLATE_INSTANTIATIONS_ACCESSOR

const std::string ARON_TEMPLATE_INSTANTIATIONS_ACCESSOR
staticprotected
Initial value:

Definition at line 168 of file Generator.h.

◆ ARON_VARIABLE_PREFIX

const std::string ARON_VARIABLE_PREFIX = "aron"
staticprotected

Definition at line 162 of file Generator.h.

◆ ARON_VARIANT_RETURN_ACCESSOR

const std::string ARON_VARIANT_RETURN_ACCESSOR
staticprotected
Initial value:

Definition at line 169 of file Generator.h.

◆ ARON_WRITER_ACCESSOR

const std::string ARON_WRITER_ACCESSOR = Generator::ARON_VARIABLE_PREFIX + "_w"
staticprotected

Definition at line 167 of file Generator.h.


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