Class CPSClassGeneratorBase#
Defined in File ps_class_generator_base.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Type#
public CGenContext
(Class CGenContext)
Derived Types#
public CProxyGenerator
(Class CProxyGenerator)public CStubGenerator
(Class CStubGenerator)
Class Documentation#
-
class CPSClassGeneratorBase : public CGenContext#
Proxy/stub class generator base implementation.
Subclassed by CProxyGenerator, CStubGenerator
Public Functions
-
CPSClassGeneratorBase(sdv::IInterfaceAccess *pParser)#
Constructor.
- Parameters:
pParser – [in] Pointer to the parser object.
-
virtual bool Generate()#
Generate the proxy.
- Returns:
Returns whether generation was successful.
Protected Functions
-
virtual std::string GetNameAppendix() const = 0#
Return the name addition to be added to the filename and class definition.
- Returns:
The name appendix string.
-
virtual std::string GetClassDefFileComments() const = 0#
Get definition file comments to be written in the file header.
- Returns:
String with class definition comments.
-
virtual std::string GetClassImplFileComments() const = 0#
Get implementation file comments to be written in the file header.
- Returns:
String with class implementation comments.
-
virtual std::string GetClassDefBegin(CKeywordMap &rmapKeywords) const = 0#
Get begin of class definition to be inserted into the header file.
Remark
The following keywords are defined: class_name% and interface_name%.
- Parameters:
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with class definition begin.
-
virtual std::string GetClassDefEnd(CKeywordMap &rmapKeywords) const = 0#
Get end of class definition to be inserted into the header file.
Remark
The following keywords are defined: class_name% and interface_name%.
- Parameters:
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with class definition end.
-
virtual std::string GetConstructImplBegin(CKeywordMap &rmapKeywords) const = 0#
Get begin of constructor implementation to be inserted into the cpp file.
Remark
The following keywords are defined: class_name% and interface_name%.
- Parameters:
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with constructor implementation begin.
-
virtual std::string GetConstructImplEnd(CKeywordMap &rmapKeywords) const = 0#
Get end of constructor implementation to be inserted into the cpp file.
Remark
The following keywords are defined: class_name% and interface_name%.
- Parameters:
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with constructor implementation end.
-
virtual std::string GetConstructFuncImpl(const SFuncInfo &rsFunc, CKeywordMap &rmapKeywords) const = 0#
Get the constructor body for a function (attribute or operation).
Remark
The following keywords are defined: class_name%, interface_name%, func_decl_type%, func_default_ret_value%, func_name%, func_index%, param_pack_def%, param_pack_use%, total_param_cnt%, in_param_cnt%, and out_param_cnt%.
- Parameters:
rsFunc – [in] Reference to the function information structure.
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with constructor function body.
-
virtual std::string GetFuncDef(const SFuncInfo &rsFunc, CKeywordMap &rmapKeywords) const = 0#
Get the function definition (attribute or operation).
Remark
The following keywords are defined: class_name%, interface_name%, func_decl_type%, func_default_ret_value%, func_name%, func_index%, param_pack_def%, param_pack_use%, total_param_cnt%, in_param_cnt%, and out_param_cnt%.
Remark
The out_param_cnt% includes the return parameter.
- Parameters:
rsFunc – [in] Reference to the function information structure.
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with the function definition.
-
virtual std::string GetFuncImpl(const SFuncInfo &rsFunc, CKeywordMap &rmapKeywords, const CExceptionVector &rvecExceptions) const = 0#
Get the function implementation (attribute or operation).
The function implementation uses the specific keywords param_init%, stream_input_param%, stream_output_param%, and param_term% to insert code from the parameter streaming functions.
Remark
The following keywords are defined: class_name%, interface_name%, func_decl_type%, func_default_ret_value%, func_name%, func_index%, param_pack_def%, param_pack_use%, total_param_cnt%, in_param_cnt%, and out_param_cnt%.
Remark
The out_param_cnt% includes the return parameter.
- Parameters:
rsFunc – [in] Reference to the function information structure.
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
rvecExceptions – [in] Vector containing the exceptions defined for this function.
- Returns:
String with the function implementation.
-
virtual std::string GetFuncImplParamInit(const SFuncInfo &rsFunc, const SParamInfo &rsParam, CKeywordMap &rmapKeywords) const = 0#
Get parameter initialization of the function implementation (attribute or operation). The content of this function is paced in the keyword param_init% of the GetFuncImpl function.
Remark
The following keywords are defined: class_name%, interface_name%, func_decl_type%, func_default_ret_value%, func_name%, func_index%, param_pack_def%, param_pack_use%, total_param_cnt%, in_param_cnt%, out_param_cnt%, param_name%, param_decl_type%, param_index%, param_default_val%, param_size% and param_cnt%.
Remark
The out_param_cnt% includes the return parameter.
Remark
The param_index% is the parameter index incl. optional return value at index 0.
- Parameters:
rsFunc – [in] Reference to the function information structure.
rsParam – [in] Reference to a parameter information structure.
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with the function parameter initialization.
-
virtual std::string GetFuncImplStreamParamInput(const SFuncInfo &rsFunc, const SParamInfo &rsParam, CKeywordMap &rmapKeywords) const = 0#
Get input parameter streaming of the function implementation (attribute or operation). The content of this function is paced in the keyword stream_param_input% of the GetFuncImpl function.
Remark
The following keywords are defined: class_name%, interface_name%, func_decl_type%, func_default_ret_value%, func_name%, func_index%, param_pack_def%, param_pack_use%, total_param_cnt%, in_param_cnt%, out_param_cnt%, param_name%, param_decl_type%, param_index%, param_default_val%, param_size% and param_cnt%.
Remark
The out_param_cnt% includes the return parameter.
Remark
The param_index% is the parameter index incl. optional return value at index 0.
- Parameters:
rsFunc – [in] Reference to the function information structure.
rsParam – [in] Reference to a parameter information structure.
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with the function input parameters.
-
virtual std::string GetFuncImplStreamParamOutput(const SFuncInfo &rsFunc, const SParamInfo &rsParam, CKeywordMap &rmapKeywords) const = 0#
Get output parameter streaming of the function implementation (attribute or operation). The content of this function is paced in the keyword stream_param_output% of the GetFuncImpl function.
Remark
The following keywords are defined: class_name%, interface_name%, func_decl_type%, func_default_ret_value%, func_name%, func_index%, param_pack_def%, param_pack_use%, total_param_cnt%, in_param_cnt%, out_param_cnt%, param_name%, param_decl_type%, param_index%, param_default_val%, param_size% and param_cnt%.
Remark
The out_param_cnt% includes the return parameter.
Remark
The param_index% is the parameter index incl. optional return value at index 0.
- Parameters:
rsFunc – [in] Reference to the function information structure.
rsParam – [in] Reference to a parameter information structure.
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with the function output parameters.
-
virtual std::string GetFuncImplParamTerm(const SFuncInfo &rsFunc, const SParamInfo &rsParam, CKeywordMap &rmapKeywords) const = 0#
Get parameter termination of the function implementation (attribute or operation). The content of this function is paced in the keyword param_term% of the GetFuncImpl function.
Remark
The following keywords are defined: class_name%, interface_name%, func_decl_type%, func_default_ret_value%, func_name%, func_index%, param_pack_def%, param_pack_use%, total_param_cnt%, in_param_cnt%, out_param_cnt%, param_name%, param_decl_type%, param_index%, param_default_val%, param_size% and param_cnt%.
Remark
The out_param_cnt% includes the return parameter.
Remark
The param_index% is the parameter index incl. optional return value at index 0.
- Parameters:
rsFunc – [in] Reference to the function information structure.
rsParam – [in] Reference to a parameter information structure.
rmapKeywords – [inout] Reference to the keyword map. This allows inserting additional keywords local for the returned code snippet.
- Returns:
String with the function parameter termination.
-
struct SFuncInfo#
Function information structure.
Public Members
-
std::string ssName#
Function name.
-
std::string ssDecl#
Return value declaration type (could be void).
-
std::string ssDeclType#
Return value declaration base type.
-
std::string ssDefRetValue#
Default return value (or empty if decl type is void).
-
bool bIsConst = false#
Set when the function is declared as const function.
-
size_t nInputParamCnt = 0#
Input parameter count.
-
size_t nOutputParamCnt = 0#
Output parameter count.
-
std::string ssName#
-
struct SParamInfo : public CGenContext::SCDeclInfo#
Parameter information structure.
Public Types
Public Members
-
std::string ssName#
Parameter name.
-
std::string ssDefaultValue#
Parameter default value (or empty for void return value)
-
std::string ssSize#
Parameter size.
-
enum CPSClassGeneratorBase::SParamInfo::EDirection eDirection = EDirection::ignored#
Parameter direction or return value.
-
enum CPSClassGeneratorBase::SParamInfo::EAllocType eAllocType = EAllocType::direct#
Parameter allocation type.
-
std::string ssName#
-
CPSClassGeneratorBase(sdv::IInterfaceAccess *pParser)#