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 &)
 

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 65 of file Generator.h.

Member Typedef Documentation

◆ PointerType

Definition at line 68 of file Generator.h.

Constructor & Destructor Documentation

◆ Generator() [1/2]

Generator ( )
delete

◆ Generator() [2/2]

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

Definition at line 97 of file Generator.cpp.

◆ ~Generator()

virtual ~Generator ( )
virtualdefault

Member Function Documentation

◆ EscapeAccessor()

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

Definition at line 53 of file Generator.cpp.

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

◆ ExtractCppTypename()

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

Definition at line 72 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 80 of file Generator.cpp.

+ Here is the call graph for this function:

◆ FromAronType()

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

Definition at line 91 of file Generator.cpp.

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

◆ getClassCppTypename()

std::string getClassCppTypename ( ) const

Definition at line 162 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getCopyCtorBlock()

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

Definition at line 517 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 501 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 495 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 IntEnum, Image, Matrix, Quaternion, NDArray, PointCloud, Bool, ObjectClass, Double, Float, Int, Long, and String.

Definition at line 489 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getDtorBlock()

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

Definition at line 523 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 PointCloud, Image, Matrix, Quaternion, ObjectClass, and IntEnumClass.

Definition at line 547 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 168 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 116 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 139 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 110 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 482 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 Object, Image, Matrix, Quaternion, AnyObject, List, Pair, Tuple, PointCloud, Dict, and ObjectClass.

Definition at line 476 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ getResetHardBlock()

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

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

Definition at line 529 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 Object, IntEnum, Bool, ObjectClass, Image, Matrix, Quaternion, Double, Float, Int, Long, String, IntEnumClass, NDArray, PointCloud, List, Pair, Tuple, and Dict.

Definition at line 538 of file Generator.cpp.

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

◆ getType()

virtual const type::Variant& getType ( ) const
pure virtual

Implemented in SpecializedGeneratorBase< TypeT, DerivedT >.

+ Here is the caller graph for this function:

◆ 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 Bool, AnyObject, Double, Float, Int, Long, String, Object, IntEnum, ObjectClass, Image, Matrix, Quaternion, IntEnumClass, NDArray, PointCloud, List, Pair, Tuple, and Dict.

+ Here is the caller graph for this function:

◆ nextEl()

std::string nextEl ( ) const
protected

Definition at line 613 of file Generator.cpp.

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

◆ resolveMaybeAccessor()

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

Definition at line 563 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 735 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 579 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 602 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 711 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 655 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 677 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 694 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 209 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 191 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 229 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 456 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 633 of file Generator.cpp.

+ Here is the call graph for this function:

◆ toReadMethod()

CppMethodPtr toReadMethod ( ) const

Definition at line 339 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 264 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 247 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 395 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ toSpecializedDataWriterMethod()

CppMethodPtr toSpecializedDataWriterMethod ( const WriterInfo info) const

Definition at line 374 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ toSpecializedStaticDataReaderMethod()

CppMethodPtr toSpecializedStaticDataReaderMethod ( const StaticReaderInfo info) const

Definition at line 416 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ toSpecializedTypeWriterMethod()

CppMethodPtr toSpecializedTypeWriterMethod ( const WriterInfo info) const

Definition at line 437 of file Generator.cpp.

+ Here is the caller graph for this function:

◆ toWriteMethod()

CppMethodPtr toWriteMethod ( ) const

Definition at line 308 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 281 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:

Definition at line 149 of file Generator.h.

◆ ARON_OTHER_ACCESSOR

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

Definition at line 155 of file Generator.h.

◆ ARON_PATH_ACCESSOR

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

Definition at line 150 of file Generator.h.

◆ ARON_READER_ACCESSOR

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

Definition at line 151 of file Generator.h.

◆ ARON_TEMPLATE_INSTANTIATIONS_ACCESSOR

const std::string ARON_TEMPLATE_INSTANTIATIONS_ACCESSOR
staticprotected
Initial value:

Definition at line 153 of file Generator.h.

◆ ARON_VARIABLE_PREFIX

const std::string ARON_VARIABLE_PREFIX = "aron"
staticprotected

Definition at line 147 of file Generator.h.

◆ ARON_VARIANT_RETURN_ACCESSOR

const std::string ARON_VARIANT_RETURN_ACCESSOR
staticprotected
Initial value:

Definition at line 154 of file Generator.h.

◆ ARON_WRITER_ACCESSOR

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

Definition at line 152 of file Generator.h.


The documentation for this class was generated from the following files:
armarx::aron::codegenerator::cpp::Generator::ARON_VARIABLE_PREFIX
static const std::string ARON_VARIABLE_PREFIX
Definition: Generator.h:147