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

Function generateCTypeParemeters

Source/buildbindingpython.go:383–400  ·  view source on GitHub ↗
(method ComponentDefinitionMethod, w LanguageWriter, NameSpace string, ClassName string, isGlobal bool)

Source from the content-addressed store, hash-verified

381
382
383func generateCTypeParemeters(method ComponentDefinitionMethod, w LanguageWriter, NameSpace string, ClassName string, isGlobal bool)([]ctypesParameter, error) {
384 parameters := []ctypesParameter{}
385 if (!isGlobal) {
386 cParams := make([]ctypesParameter,1)
387 cParams[0].ParamName = "Object"
388 cParams[0].ParamType = "ctypes.c_void_p"
389 cParams[0].ParamComment = "#"
390 parameters = append(parameters, cParams...);
391 }
392 for k:=0; k<len(method.Params); k++ {
393 cParams, err := generateCTypesParameter(method.Params[k], ClassName, method.MethodName, NameSpace)
394 if (err != nil) {
395 return nil, err
396 }
397 parameters = append(parameters, cParams...);
398 }
399 return parameters, nil
400}
401
402func writeCDLLFunctionTableMethod(method ComponentDefinitionMethod, w LanguageWriter, NameSpace string, ClassName string, isGlobal bool) error {
403 exportName := GetCExportName(NameSpace, ClassName, method, isGlobal)

Callers

nothing calls this directly

Calls 1

generateCTypesParameterFunction · 0.85

Tested by

no test coverage detected