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

Function BuildBindingC

Source/languagec.go:44–60  ·  view source on GitHub ↗

BuildBindingC builds C-bindings of a library's API in form of automatically generated C functions

(component ComponentDefinition, outputFolderBindingC string)

Source from the content-addressed store, hash-verified

42
43// BuildBindingC builds C-bindings of a library's API in form of automatically generated C functions
44func BuildBindingC(component ComponentDefinition, outputFolderBindingC string) error {
45 CTypesHeaderName := path.Join(outputFolderBindingC, component.BaseName + "_types.h")
46 log.Printf("Creating \"%s\"", CTypesHeaderName)
47 err := CreateCTypesHeader(component, CTypesHeaderName)
48 if (err != nil) {
49 return err;
50 }
51
52 CHeaderName := path.Join(outputFolderBindingC, component.BaseName + ".h")
53 log.Printf("Creating \"%s\"", CTypesHeaderName)
54 err = CreateCAbiHeader(component, CHeaderName)
55 if (err != nil) {
56 return err
57 }
58
59 return nil
60}
61
62// CreateCTypesHeader creates a C header file for the types in component's API
63func CreateCTypesHeader (component ComponentDefinition, CTypesHeaderName string) (error) {

Callers 1

createComponentFunction · 0.85

Calls 3

CreateCTypesHeaderFunction · 0.85
CreateCAbiHeaderFunction · 0.85
PrintfMethod · 0.80

Tested by

no test coverage detected