MCPcopy Create free account
hub / github.com/Autodesk/AutomaticComponentToolkit / buildGoImplementation

Function buildGoImplementation

Source/buildbindinggo.go:258–279  ·  view source on GitHub ↗
(component ComponentDefinition, implw LanguageWriter)

Source from the content-addressed store, hash-verified

256}
257
258func buildGoImplementation(component ComponentDefinition, implw LanguageWriter) {
259 NameSpace := component.NameSpace
260
261 implw.Writeln("type %sImplementation struct {", NameSpace)
262 implw.Writeln(" Initialized bool")
263 implw.Writeln(" DLLHandle syscall.Handle")
264
265 for i := 0; i < len(component.Classes); i++ {
266 class := component.Classes[i]
267 for j := 0; j < len(class.Methods); j++ {
268 method := class.Methods[j]
269 implw.Writeln(" %s_%s_%s uintptr", NameSpace, strings.ToLower(class.ClassName), strings.ToLower(method.MethodName))
270 }
271 }
272
273 for j := 0; j < len(component.Global.Methods); j++ {
274 method := component.Global.Methods[j]
275 implw.Writeln(" %s_%s uintptr", NameSpace, strings.ToLower(method.MethodName))
276 }
277 implw.Writeln("}")
278 implw.Writeln("")
279}
280
281func buildGoImplementationHandle(component ComponentDefinition, implw LanguageWriter) {
282 NameSpace := component.NameSpace

Callers 1

buildGoWrapperFunction · 0.85

Calls 1

WritelnMethod · 0.80

Tested by

no test coverage detected