go2cpp

package module
v0.0.0-...-460ecb5 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: MIT Imports: 12 Imported by: 4

README

go2cpp : 将go接口方便导出为c++接口的一个工具

支持的函数:

  • 入参个数无限制
  • 出参个数为0或者1

支持的类型(golang):

  • bool
  • int8/uint8(byte)
  • int16/uint16
  • int32/uint32
  • int64/uint64
  • int
  • string
  • slice/切片
  • struct
  • map
  • float32/float64

TODO:

  • 支持go调用c++

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Go2cppContext

type Go2cppContext struct {
	// contains filtered or unexported fields
}

func NewGo2cppContext

func NewGo2cppContext(req NewGo2cppContext_Req) *Go2cppContext

func (*Go2cppContext) Generate1

func (this *Go2cppContext) Generate1(methodFn interface{})

func (*Go2cppContext) GetDotCppContent

func (this *Go2cppContext) GetDotCppContent(implDotHContent []byte) []byte

func (*Go2cppContext) GetDotGoContent

func (this *Go2cppContext) GetDotGoContent() []byte

func (*Go2cppContext) GetDotHContent

func (this *Go2cppContext) GetDotHContent() []byte

func (*Go2cppContext) MustCreateLibrary

func (this *Go2cppContext) MustCreateLibrary(dir string, goarch string, buildMode string, buildOptionList ...string)

MustCreateLibrary(dir, "386", "c-archive") MustCreateLibrary(dir, "amd64", "c-archive") MustCreateLibrary(dir, "amd64", "c-shared")

type NewGo2cppContext_Req

type NewGo2cppContext_Req struct {
	CppBaseName                 string
	EnableQtClass_RunOnUiThread bool
	EnableQtClass_Toast         bool
	NotRemoveImplDotGo          bool
}

Jump to

Keyboard shortcuts

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