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< CppFieldPtr > getPublicVariableDeclarations (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::Variant & getType () 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< Generator > FromAronType (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"
 

Member Typedef Documentation

◆ PointerType

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 )

◆ ~Generator()

virtual ~Generator ( )
virtualdefault

Member Function Documentation

◆ EscapeAccessor()

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

◆ ExtractCppTypename()

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

◆ ExtractCppTypenames()

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

◆ FromAronType()

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

◆ getClassCppTypename()

std::string getClassCppTypename ( ) const

◆ getCopyCtorBlock()

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

◆ getCopyCtorInitializers()

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

Reimplemented in ObjectClass.

◆ getCtorBlock()

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

◆ getCtorInitializers()

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

◆ getDtorBlock()

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

◆ getEqualsBlock()

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

◆ getFullClassCppTypename()

std::string getFullClassCppTypename ( ) const

◆ getFullInstantiatedCppTypename()

std::string getFullInstantiatedCppTypename ( ) const

◆ getFullInstantiatedCppTypenameGenerator()

std::string getFullInstantiatedCppTypenameGenerator ( ) const

◆ getInstantiatedCppTypename()

std::string getInstantiatedCppTypename ( ) const

◆ getPublicVariableDeclarations()

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

Reimplemented in IntEnumClass, and ObjectClass.

◆ getReadBlock()

◆ getRequiredIncludes()

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

◆ getResetHardBlock()

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

◆ getResetSoftBlock()

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

◆ getType()

◆ getWriteBlock()

◆ getWriteTypeBlock()

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

◆ nextEl()

std::string nextEl ( ) const
protected

◆ OptionalFloatLiteral()

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

◆ resolveMaybeAccessor()

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

◆ resolveMaybeEqualsBlock()

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

◆ resolveMaybeGenerator()

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

◆ resolveMaybeGeneratorWithSetter()

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

◆ resolveMaybeReadBlock()

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

◆ resolveMaybeResetHardBlock()

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

◆ resolveMaybeResetSoftBlock()

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

◆ resolveMaybeWriteBlock()

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

◆ toCopyCtor()

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

◆ toCtor()

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

◆ toDtor()

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

◆ toEqualsMethod()

CppMethodPtr toEqualsMethod ( ) const

◆ toPointerAccessor()

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

◆ toReadMethod()

CppMethodPtr toReadMethod ( ) const

◆ toResetHardMethod()

CppMethodPtr toResetHardMethod ( ) const

◆ toResetSoftMethod()

CppMethodPtr toResetSoftMethod ( ) const

◆ toSpecializedDataReaderMethod()

CppMethodPtr toSpecializedDataReaderMethod ( const ReaderInfo & info) const

◆ toSpecializedDataWriterMethod()

CppMethodPtr toSpecializedDataWriterMethod ( const WriterInfo & info) const

◆ toSpecializedStaticDataReaderMethod()

CppMethodPtr toSpecializedStaticDataReaderMethod ( const StaticReaderInfo & info) const

◆ toSpecializedTypeWriterMethod()

CppMethodPtr toSpecializedTypeWriterMethod ( const WriterInfo & info) const

◆ toWriteMethod()

CppMethodPtr toWriteMethod ( ) const

◆ toWriteTypeMethod()

CppMethodPtr toWriteTypeMethod ( ) const

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

◆ ARON_OTHER_ACCESSOR

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

◆ ARON_PATH_ACCESSOR

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

◆ ARON_READER_ACCESSOR

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

◆ ARON_TEMPLATE_INSTANTIATIONS_ACCESSOR

const std::string ARON_TEMPLATE_INSTANTIATIONS_ACCESSOR
staticprotected
Initial value:

◆ ARON_VARIABLE_PREFIX

const std::string ARON_VARIABLE_PREFIX = "aron"
staticprotected

◆ ARON_VARIANT_RETURN_ACCESSOR

const std::string ARON_VARIANT_RETURN_ACCESSOR
staticprotected
Initial value:

◆ ARON_WRITER_ACCESSOR

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

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