Skip to content

Commit 8cdae44

Browse files
Fix string cache comp. error (#148)
1 parent 728cff8 commit 8cdae44

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Source/buildimplementationcpp.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ func buildCPPInterfaceWrapper(component ComponentDefinition, w LanguageWriter, N
874874
}
875875

876876

877-
func buildOutCacheTemplateParameters (method ComponentDefinitionMethod, NameSpace string) (string, error) {
877+
func buildOutCacheTemplateParameters (method ComponentDefinitionMethod, NameSpace string, BaseClassName string, ClassIdentifier string) (string, error) {
878878
result := "";
879879

880880
for i := 0; i < len (method.Params); i++ {
@@ -886,6 +886,9 @@ func buildOutCacheTemplateParameters (method ComponentDefinitionMethod, NameSpac
886886
}
887887

888888
cppParamType := getCppParamType(param, NameSpace, true);
889+
if param.ParamType == "class" || param.ParamType == "optionalclass" {
890+
cppParamType = fmt.Sprintf("I%s%s*", ClassIdentifier, BaseClassName)
891+
}
889892
result += cppParamType;
890893
}
891894

@@ -975,7 +978,7 @@ func writeCImplementationMethod(component ComponentDefinition, method ComponentD
975978
return errors.New ("String out parameter without being the string out base class.");
976979
}
977980

978-
templateParameters, err := buildOutCacheTemplateParameters (method, NameSpace);
981+
templateParameters, err := buildOutCacheTemplateParameters (method, NameSpace, BaseClassName, ClassIdentifier);
979982
if err != nil {
980983
return err
981984
}

0 commit comments

Comments
 (0)