goitf2lang

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoItfToLang = map[string]FuncWritePkg{
	"cpp":  WriteCppPkg,
	"java": WriteJavaPkg,
	"go":   writeGoPkg,
}

Functions

func CppBuiltInType

func CppBuiltInType(t string) bool

func CppNeedInc

func CppNeedInc(itf *smn_pglang.ItfDef, openRet bool, needPrmPkg bool, init ...string) map[string]bool

CppNeedInc cpp func need include.

func JavaBuiltInType

func JavaBuiltInType(t string) bool

func ToCppParam

func ToCppParam(param []*smn_pglang.VarDef, clt ...bool) string

func ToCppType

func ToCppType(goType string, clt ...bool) string

func ToCppVarDef

func ToCppVarDef(vd *smn_pglang.VarDef, clt ...bool) *smn_pglang.VarDef

func ToJavaParam

func ToJavaParam(param []*smn_pglang.VarDef) string

func ToJavaRet

func ToJavaRet(param []*smn_pglang.VarDef, pkg, itfName, fName string) string

func ToJavaType

func ToJavaType(goType string) string

func ToJavaVarDef

func ToJavaVarDef(vd *smn_pglang.VarDef) *smn_pglang.VarDef

func TooCppRet

func TooCppRet(rets []*smn_pglang.VarDef, pkg, itfName, fName string) string

func WriteCppItf

func WriteCppItf(dir, pkg string, itf *smn_pglang.ItfDef)

WriteCppItf write cpp interface from go-interface-define.

func WriteCppPkg

func WriteCppPkg(out, pkg string, list []*smn_pglang.ItfDef)

func WriteInterface

func WriteInterface(lang, out, pkg string, list []*smn_pglang.ItfDef)

not exception-safe, it will panic when err happened.

func WriteJavaItf

func WriteJavaItf(out, pkg string, itf *smn_pglang.ItfDef)

func WriteJavaPkg

func WriteJavaPkg(out, pkg string, list []*smn_pglang.ItfDef)

Types

type FuncWriteItf

type FuncWriteItf func(out, pkg string, itf *smn_pglang.ItfDef)

type FuncWritePkg

type FuncWritePkg func(out, pkg string, list []*smn_pglang.ItfDef)

type ItfTrans

type ItfTrans func(itf *smn_pglang.ItfDef) string

type ParamTrans

type ParamTrans func(param []*smn_pglang.VarDef) string

type TypeTrans

type TypeTrans func(goType string) string

type VarDefTrans

type VarDefTrans func(vd *smn_pglang.VarDef) *smn_pglang.VarDef

Jump to

Keyboard shortcuts

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