@@ -246,7 +246,7 @@ func buildDynamicCCPPHeader(component ComponentDefinition, w LanguageWriter, Nam
246
246
w .Writeln (" Function Table Structure" )
247
247
w .Writeln ("**************************************************************************************************************************/" )
248
248
w .Writeln ("" )
249
- w .Writeln ("typedef struct {" )
249
+ w .Writeln ("typedef struct s%sDynamicWrapperTableStruct {" , NameSpace )
250
250
w .Writeln (" void * m_LibraryHandle;" )
251
251
252
252
for i := 0 ; i < len (component .Classes ); i ++ {
@@ -267,22 +267,24 @@ func buildDynamicCCPPHeader(component ComponentDefinition, w LanguageWriter, Nam
267
267
268
268
for i := 0 ; i < len (component .Classes ); i ++ {
269
269
class := component .Classes [i ]
270
+ structName := fmt .Sprintf ("s%sFunctionTable%sStruct" , NameSpace , class .ClassName )
271
+ typedefName := fmt .Sprintf ("s%sFunctionTable%s" , NameSpace , class .ClassName )
270
272
if len (class .ParentClass ) > 0 {
271
273
paramNameSpace , paramClassName , _ := decomposeParamClassName (class .ParentClass )
272
274
if len (paramNameSpace ) == 0 {
273
- w .Writeln ("typedef struct : s%sFunctionTable%s {" , NameSpace , class .ParentClass )
275
+ w .Writeln ("typedef struct %s : s%sFunctionTable%s {" , structName , NameSpace , class .ParentClass )
274
276
} else {
275
- w .Writeln ("typedef struct : s%sFunctionTable%s {" , component .ImportedComponentDefinitions [paramNameSpace ].NameSpace , paramClassName )
277
+ w .Writeln ("typedef struct %s : s%sFunctionTable%s {" , structName , component .ImportedComponentDefinitions [paramNameSpace ].NameSpace , paramClassName )
276
278
}
277
279
} else {
278
- w .Writeln ("typedef struct {" )
280
+ w .Writeln ("typedef struct %s {" , structName )
279
281
}
280
282
281
283
for j := 0 ; j < len (class .Methods ); j ++ {
282
284
method := class .Methods [j ]
283
285
w .Writeln (" P%s%s_%sPtr m_%s_%s;" , NameSpace , class .ClassName , method .MethodName , class .ClassName , method .MethodName )
284
286
}
285
- w .Writeln ("} s%sFunctionTable% s;" , NameSpace , class . ClassName )
287
+ w .Writeln ("} % s;" , typedefName )
286
288
w .Writeln ("" )
287
289
}
288
290
0 commit comments