Skip to content

Don't require C++17 for ClientImpl base classes #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: CrossComponentInheritance
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Source/buildimplementationcpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,7 @@ func generatePrePostCallCPPFunctionCode(component ComponentDefinition, method Co
for k := 0; k < len(method.Params); k++ {
param := method.Params[k]
variableName := getCppVariableName(param)
cppParamType := getCppParamType(param, NameSpace, true)

switch param.ParamPass {
case "in":
Expand All @@ -1806,15 +1807,19 @@ func generatePrePostCallCPPFunctionCode(component ComponentDefinition, method Co
checkInputCode = append(checkInputCode, fmt.Sprintf(" throw %s (%s_ERROR_INVALIDPARAM);", exceptionType, strings.ToUpper(NameSpace)))
callParameters = callParameters + fmt.Sprintf("n%sBufferSize, ", param.ParamName) + variableName
if (isClientImpl) {
callParameters = callParameters + fmt.Sprintf("%sInputVector(%s, n%sBufferSize)", ClassIdentifier, variableName, param.ParamName)
// note: slicing because we need to chop off the trailing " *".
inputVecTypeParam := cppParamType[:len(cppParamType)-2]
callParameters = callParameters + fmt.Sprintf("%sInputVector<%s>(%s, n%sBufferSize)", ClassIdentifier, inputVecTypeParam, variableName, param.ParamName)
} else {
callParameters = callParameters + fmt.Sprintf("n%sBufferSize, ", param.ParamName) + variableName
}
case "structarray":
checkInputCode = append(checkInputCode, fmt.Sprintf("if ( (!p%sBuffer) && (n%sBufferSize>0))", param.ParamName, param.ParamName))
checkInputCode = append(checkInputCode, fmt.Sprintf(" throw %s (%s_ERROR_INVALIDPARAM);", exceptionType, strings.ToUpper(NameSpace)))
if (isClientImpl) {
callParameters = callParameters + fmt.Sprintf("%sInputVector(%s, n%sBufferSize)", ClassIdentifier, variableName, param.ParamName)
// note: slicing because we need to chop off the trailing " *".
inputVecTypeParam := cppParamType[:len(cppParamType)-2]
callParameters = callParameters + fmt.Sprintf("%sInputVector<%s>(%s, n%sBufferSize)", ClassIdentifier, inputVecTypeParam, variableName, param.ParamName)
} else {
callParameters = callParameters + fmt.Sprintf("n%sBufferSize, ", param.ParamName) + variableName
}
Expand Down