Documentation ¶
Index ¶
- Constants
- func Format(path string)
- func InputFormat(varName string, typ types.Type) string
- func IsReservedWord(word string) bool
- func NewBinder(pkg *cgo.Package) core.Binder
- type Binder
- func (p Binder) Bind(outDir, libName string) error
- func (p Binder) Classes() []*Class
- func (p Binder) Funcs() []*Func
- func (p Binder) Interfaces() []*Interface
- func (p Binder) Lists() []*List
- func (p Binder) NewClass(s *cgo.Struct) *Class
- func (p Binder) NewInterface(i *cgo.Interface) *Interface
- func (p Binder) NewList(slice *cgo.Slice) *List
- func (p *Binder) NewParam(v *types.Var, defaultName string) *Param
- func (p Binder) ToConstructor(class *cgo.Struct, f *cgo.Func) *Func
- func (p Binder) ToFunc(f *cgo.Func) *Func
- func (p Binder) ToGenericFunc(f *cgo.Func) *Func
- type Class
- type Func
- func (f Func) Call() string
- func (f Func) CallbackAttribute() string
- func (f Func) InputTransforms() []string
- func (f Func) IsBound() bool
- func (f Func) ParamsLength() int
- func (f Func) PrintArgs() string
- func (f Func) PrintReturns() string
- func (f Func) RegistrationName() string
- func (f Func) ResultsLength() int
- type Interface
- type List
- type Param
- func (p Param) InputFormat() string
- func (p Param) InputFormatWithName(name string) string
- func (p Param) IsError() bool
- func (p Param) Name() string
- func (p Param) ReturnFormat() string
- func (p Param) ReturnFormatUntracked() string
- func (p Param) ReturnFormatWithName(varName string) string
- func (p Param) ReturnFormatWithNameAndTracked(varName string, tracked bool) string
- type TemplateData
Constants ¶
View Source
const ( RETURN_VAR_NAME = "cret" CFFI_HELPER_NAME = "_CffiHelper" HEADER_FILE_NAME = "output.h" FILE_NAME = "generated.py" )
View Source
const ( STRING_OUTPUT_TRANSFORM = "_CffiHelper.c2py_string(%s)" STRING_INPUT_TRANSFORM = "%s = _CffiHelper.py2c_string(%s)" STRUCT_INPUT_TRANSFORM = "%s = _CffiHelper.py2c_veil_object(%s)" STRUCT_OUTPUT_TRANSFORM = "%s(uuid_ptr=%s, tracked=%s)" )
View Source
const (
PYTHON_TEMPLATE = `` /* 8821-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
func IsReservedWord ¶
Types ¶
type Binder ¶
type Binder struct {
// contains filtered or unexported fields
}
Binder contains the data for generating a python 3 binding
func (Binder) Interfaces ¶
type Class ¶
type Class struct { *cgo.Struct Fields []*Param Constructors []*Func Methods []*Func // contains filtered or unexported fields }
func (Class) MethodName ¶
func (Class) NewMethodName ¶
type Func ¶
type Func struct { Name string Params []*Param Results []*Param // contains filtered or unexported fields }
func (Func) CallbackAttribute ¶
func (Func) InputTransforms ¶
func (Func) ParamsLength ¶
func (Func) PrintReturns ¶
func (Func) RegistrationName ¶
func (Func) ResultsLength ¶
ResultsLength returns the length of the results array
type List ¶
type List struct { *cgo.Slice MethodPrefix string InputFormat func() string OutputFormat func(string) string }
func (List) ListTypeName ¶
type Param ¶
type Param struct { DefaultName string // contains filtered or unexported fields }
func (Param) InputFormat ¶
func (Param) InputFormatWithName ¶
func (Param) ReturnFormat ¶
func (Param) ReturnFormatUntracked ¶
func (Param) ReturnFormatWithName ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.