gdnativewrapper

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package gdnativewrapper generates C code to wrap all of the gdnative methods to call functions on the gdnative_api_structs to work around the cgo C function pointer limitation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(packagePath string)

Types

type View

type View struct {
	ApiVersions []gdnativeapijson.APIVersion
	Type        string
	StructType  string
	Name        string
}

View is a structure that holds the api struct, so it can be used inside our template.

func (View) HasArgs

func (v View) HasArgs(args []gdnativeapijson.Argument) bool

HasArgs is a function we use inside the template to test whether or not the function has arguments. This is so we can determine if we need to place a comma.

func (View) NotLastElement

func (v View) NotLastElement(n int, slice []gdnativeapijson.Argument) bool

NotLastElement is a function we use inside the template to test whether or not the given element is the last in the slice or not. This is so we can correctly insert commas for argument lists.

func (View) NotVoid

func (v View) NotVoid(ret string) bool

NotVoid checks to see if the return string is void or not. This is used inside our template so we can determine if we need to use the `return` keyword in the function body.

func (View) ToCDefine

func (v View) ToCDefine() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL