(component ComponentDefinition, implw LanguageWriter)
| 256 | } |
| 257 | |
| 258 | func 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 | |
| 281 | func buildGoImplementationHandle(component ComponentDefinition, implw LanguageWriter) { |
| 282 | NameSpace := component.NameSpace |
no test coverage detected