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

Function paramFunction

Source/buildbindinggo.go:661–686  ·  view source on GitHub ↗
(paramType string, paramPass string)

Source from the content-addressed store, hash-verified

659}
660
661func paramFunction(paramType string, paramPass string) (string, error) {
662 paramFunctionStr := ""
663 switch paramType {
664 case "uint8": paramFunctionStr = "UInt8"
665 case "uint16": paramFunctionStr = "UInt16"
666 case "uint32": paramFunctionStr = "UInt32"
667 case "uint64": paramFunctionStr = "UInt64"
668 case "int8": paramFunctionStr = "Int8"
669 case "int16": paramFunctionStr = "Int16"
670 case "int32": paramFunctionStr = "Int32"
671 case "int64": paramFunctionStr = "Int64"
672 case "bool": paramFunctionStr = "bool"
673 case "single": paramFunctionStr = "Float32"
674 case "double": paramFunctionStr = "Float64"
675 case "pointer": paramFunctionStr = "UInt64"
676 default:
677 return "", errors.New("Invalid basic type: " + paramType)
678 }
679
680 if paramPass == "in" {
681 paramFunctionStr += "InValue"
682 } else {
683 paramFunctionStr += "OutValue"
684 }
685 return paramFunctionStr , nil
686}
687
688func writeGoMethod(method ComponentDefinitionMethod, w LanguageWriter, implw LanguageWriter, NameSpace string, ClassName string, isGlobal bool, classdefinitions* []string) error {
689

Callers 1

writeGoMethodFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected