Skip to content

Commit e2901d1

Browse files
Fix some minor glitches
1 parent e61d31f commit e2901d1

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Source/buildbindingccpp.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ func BuildBindingCppExplicit(component ComponentDefinition, outputFolder string,
16881688
}
16891689

16901690

1691-
clientImplHeader := path.Join(outputFolderExample, strings.ToLower(baseName)+"_dynamic_client.hpp")
1691+
clientImplHeader := path.Join(outputFolderExample, baseName+"_dynamic_client.hpp")
16921692
log.Printf("Creating \"%s\"", clientImplHeader)
16931693
dynclientfile, err := CreateLanguageFile(clientImplHeader, indentString)
16941694
if err != nil {
@@ -1698,7 +1698,7 @@ func BuildBindingCppExplicit(component ComponentDefinition, outputFolder string,
16981698
fmt.Sprintf("This is an autogenerated C++-Header file in order to allow an easy\n use of %s", libraryname),
16991699
true)
17001700

1701-
clientImplSource := path.Join(outputFolderExample, strings.ToLower(baseName)+"_dynamic_client.cpp")
1701+
clientImplSource := path.Join(outputFolderExample, baseName+"_dynamic_client.cpp")
17021702
log.Printf("Creating \"%s\"", clientImplSource)
17031703
dynclientfilesource, err := CreateLanguageFile(clientImplSource, indentString)
17041704
if err != nil {
@@ -1721,9 +1721,9 @@ func buildDynamicCppExample(componentdefinition ComponentDefinition, w LanguageW
17211721

17221722
w.Writeln("#include <iostream>")
17231723
if (ExplicitLinking) {
1724-
w.Writeln("#include \"%s_dynamic.hpp\"", strings.ToLower(BaseName))
1724+
w.Writeln("#include \"%s_dynamic.hpp\"", BaseName)
17251725
} else {
1726-
w.Writeln("#include \"%s_implicit.hpp\"", strings.ToLower(BaseName))
1726+
w.Writeln("#include \"%s_implicit.hpp\"", BaseName)
17271727
}
17281728

17291729
w.Writeln("")
@@ -1816,7 +1816,7 @@ func buildDynamicCExample(componentdefinition ComponentDefinition, w LanguageWri
18161816

18171817
w.Writeln("#include <stdio.h>")
18181818
w.Writeln("#include <stdlib.h>")
1819-
w.Writeln("#include \"%s_dynamic.h\"", strings.ToLower(BaseName))
1819+
w.Writeln("#include \"%s_dynamic.h\"", BaseName)
18201820

18211821
w.Writeln("")
18221822
w.Writeln("")
@@ -1980,7 +1980,7 @@ func buildCppClientImplementations(component ComponentDefinition, w LanguageWrit
19801980
for i := 0; i < len(component.Classes); i++ {
19811981
class := component.Classes[i]
19821982
if (class.IsAbstract()) {
1983-
clientImplHeader := path.Join(outputFolder, strings.ToLower(BaseName)+"_dynamic_client_"+strings.ToLower(class.ClassName)+".hpp")
1983+
clientImplHeader := path.Join(outputFolder, BaseName+"_dynamic_client_"+strings.ToLower(class.ClassName)+".hpp")
19841984
log.Printf("Creating \"%s\"", clientImplHeader)
19851985
dynclientfile, err := CreateLanguageFile(clientImplHeader, w.IndentString)
19861986
if err != nil {
@@ -1990,7 +1990,7 @@ func buildCppClientImplementations(component ComponentDefinition, w LanguageWrit
19901990
fmt.Sprintf("This is an autogenerated C++-Header file in order to allow an easy\n use of %s", libraryname),
19911991
true)
19921992

1993-
clientImplSource := path.Join(outputFolder, strings.ToLower(BaseName)+"_dynamic_client_"+strings.ToLower(class.ClassName)+".cpp")
1993+
clientImplSource := path.Join(outputFolder, BaseName+"_dynamic_client_"+strings.ToLower(class.ClassName)+".cpp")
19941994
log.Printf("Creating \"%s\"", clientImplSource)
19951995
dynclientfilesource, err := CreateLanguageFile(clientImplSource, w.IndentString)
19961996
if err != nil {
@@ -2025,9 +2025,9 @@ func buildCppClientImplementationClass(component ComponentDefinition, class Comp
20252025
w.Writeln("")
20262026

20272027
if (bIsBaseClass) {
2028-
w.Writeln("#include \"%s_dynamic.hpp\"", strings.ToLower(BaseName))
2028+
w.Writeln("#include \"%s_dynamic.hpp\"", BaseName)
20292029
} else {
2030-
w.Writeln("#include \"%s_dynamic_client.hpp\"", strings.ToLower(BaseName))
2030+
w.Writeln("#include \"%s_dynamic_client.hpp\"", BaseName)
20312031
}
20322032

20332033
if (bIsBaseClass) {
@@ -2086,14 +2086,14 @@ func buildCppClientImplementationClass(component ComponentDefinition, class Comp
20862086
w.Writeln("")
20872087
w.Writeln("")
20882088

2089-
w.Writeln("#define %s_IMPL_LOOKUP_IMPLEMENT_BEGIN(NAME, BASE) \\", NameSpaceUpper)
2089+
w.Writeln("#define %s_IMPL_LOOKUP_IMPLEMENT_BEGIN(NAME, BASE, RAWNAME) \\", NameSpaceUpper)
20902090
w.Writeln(" %sResult NAME::SymbolLookupFunction_ABI( \\", NameSpace)
20912091
w.Writeln(" const char* pProcName, \\")
20922092
w.Writeln(" void** ppProcAddress \\")
20932093
w.Writeln(" ) \\")
20942094
w.Writeln(" { \\")
20952095
w.Writeln(" using tBASE = BASE; \\")
2096-
w.Writeln(" std::string className = #NAME; \\")
2096+
w.Writeln(" std::string className = #RAWNAME; \\")
20972097
w.Writeln(" static std::map<std::string, void*> sProcAddressMap; \\")
20982098
w.Writeln(" if (sProcAddressMap.empty()) {")
20992099
w.Writeln("")
@@ -2136,7 +2136,7 @@ func buildCppClientImplementationClass(component ComponentDefinition, class Comp
21362136
} else {
21372137
w.Writeln("class %s : public %s {", clientImplClassName, "ClientImpl" + component.baseClass().ClassName)
21382138
w.Writeln("")
2139-
w.Writeln(" %s_IMPL_DECLARE(%s, C%s)", NameSpaceUpper, clientImplClassName, theClassName)
2139+
w.Writeln(" %s_IMPL_DECLARE(%s, %s)", NameSpaceUpper, clientImplClassName, theClassName)
21402140
w.Writeln("")
21412141
}
21422142
w.Writeln("public:")
@@ -2145,22 +2145,22 @@ func buildCppClientImplementationClass(component ComponentDefinition, class Comp
21452145
w.Writeln("")
21462146

21472147
if (bIsBaseClass) {
2148-
wImpl.Writeln("#include \"%s_dynamic_client.hpp\"", strings.ToLower(BaseName))
2148+
wImpl.Writeln("#include \"%s_dynamic_client.hpp\"", BaseName)
21492149
wImpl.Writeln("")
21502150
wImpl.Writeln("")
21512151
wImpl.Writeln("using namespace %s;", NameSpace)
21522152
wImpl.Writeln("using namespace %s::ClientImpl;", NameSpace)
21532153
wImpl.Writeln("")
21542154
} else {
2155-
wImpl.Writeln("#include \"%s_dynamic_client_%s.hpp\"", strings.ToLower(BaseName), strings.ToLower(theClassName))
2155+
wImpl.Writeln("#include \"%s_dynamic_client_%s.hpp\"", BaseName, strings.ToLower(theClassName))
21562156
wImpl.Writeln("")
21572157
wImpl.Writeln("")
21582158
wImpl.Writeln("using namespace %s;", NameSpace)
21592159
wImpl.Writeln("using namespace %s::ClientImpl;", NameSpace)
21602160
wImpl.Writeln("")
21612161

21622162
wImpl.Writeln("%s_IMPL_IMPLEMENT(%s)", NameSpaceUpper, clientImplClassName)
2163-
wImpl.Writeln("%s_IMPL_LOOKUP_IMPLEMENT_BEGIN(%s, %s)", NameSpaceUpper, clientImplClassName, "ClientImpl" + component.baseClass().ClassName)
2163+
wImpl.Writeln("%s_IMPL_LOOKUP_IMPLEMENT_BEGIN(%s, %s, %s)", NameSpaceUpper, clientImplClassName, "ClientImpl" + component.baseClass().ClassName, theClassName)
21642164
for j := 0; j < len(class.Methods); j++ {
21652165
method := class.Methods[j]
21662166
wImpl.Writeln("%s_IMPL_LOOKUP_ADD(%s)", NameSpaceUpper, method.MethodName)

0 commit comments

Comments
 (0)