Class CCodeGeneratorBase#
Defined in File codegen_base.h
Inheritance Relationships#
Derived Types#
public CCanDataLinkGen(Class CCanDataLinkGen)public CDbcUtilCMakeGenerator(Class CDbcUtilCMakeGenerator)public CSoftcarFMUGen(Class CSoftcarFMUGen)public CVSSBSCodingRX(Class CVSSBSCodingRX)public CVSSBSCodingTX(Class CVSSBSCodingTX)public CVSSBSGenerator(Class CVSSBSGenerator)public CVSSCodingCommon(Class CVSSCodingCommon)public CVSSVDCodingRX(Class CVSSVDCodingRX)public CVSSVDCodingTX(Class CVSSVDCodingTX)public CVSSVDGenerator(Class CVSSVDGenerator)
Class Documentation#
-
class CCodeGeneratorBase#
Code generator base class.
Subclassed by CCanDataLinkGen, CDbcUtilCMakeGenerator, CSoftcarFMUGen, CVSSBSCodingRX, CVSSBSCodingTX, CVSSBSGenerator, CVSSCodingCommon, CVSSVDCodingRX, CVSSVDCodingTX, CVSSVDGenerator
Protected Types
-
typedef std::map<std::string, std::string> CKeywordMap#
Keyword map for keyword replacement in a string.
-
typedef std::map<std::string, std::string> CKeywordMap
Keyword map for keyword replacement in a string.
Protected Static Functions
-
static std::string ReplaceKeywords(const std::string &rssStr, const CKeywordMap &rmapKeywords, char cMarker = '%')#
Replace keywords in a string.
- Parameters:
rssStr – [in] Reference to the string containing the keywords.
rmapKeywords – [in] Map with keywords to replace.
cMarker – [in] Character to identify the keyword with (placed before and after the keyword; e.g. keyword%).
- Returns:
Returns the string with replacements.
-
template<typename T>
static inline std::string to_string(const T &rtVar)# Generator specific string generator. The std::to_string doesn’t handle floating points very well.
- Template Parameters:
T – Type of the variable to stringetize.
- Parameters:
rtVar – [in] Reference to the variable.
- Returns:
The generated string object.
-
static inline std::string to_string(const double &rdVar)#
Overloading for double.
- Parameters:
rdVar – [in] Reference to the double variable.
- Returns:
The generated string object.
-
static inline std::string to_string(const float &rfVar)#
Overloading for float.
- Parameters:
rfVar – [in] Reference to the float variable.
- Returns:
The generated string object.
-
static std::string ReplaceKeywords(const std::string &rssStr, const CKeywordMap &rmapKeywords, char cMarker = '%')
Replace keywords in a string.
- Parameters:
rssStr – [in] Reference to the string containing the keywords.
rmapKeywords – [in] Map with keywords to replace.
cMarker – [in] Character to identify the keyword with (placed before and after the keyword; e.g. keyword%).
- Returns:
Returns the string with replacements.
-
template<typename T>
static inline std::string to_string(const T &rtVar) Generator specific string generator. The std::to_string doesn’t handle floating points very well.
- Template Parameters:
T – Type of the variable to stringetize.
- Parameters:
rtVar – [in] Reference to the variable.
- Returns:
The generated string object.
-
static inline std::string to_string(const double &rdVar)
Overloading for double.
- Parameters:
rdVar – [in] Reference to the double variable.
- Returns:
The generated string object.
-
static inline std::string to_string(const float &rfVar)
Overloading for float.
- Parameters:
rfVar – [in] Reference to the float variable.
- Returns:
The generated string object.
-
typedef std::map<std::string, std::string> CKeywordMap#