当前位置: 首页>>代码示例>>Golang>>正文


Golang Buffer.ReadRef方法代码示例

本文整理汇总了Golang中golang.org/x/mobile/bind/seq.Buffer.ReadRef方法的典型用法代码示例。如果您正苦于以下问题:Golang Buffer.ReadRef方法的具体用法?Golang Buffer.ReadRef怎么用?Golang Buffer.ReadRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在golang.org/x/mobile/bind/seq.Buffer的用法示例。


在下文中一共展示了Buffer.ReadRef方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: proxy_CallSSum

func proxy_CallSSum(out, in *seq.Buffer) {
	// Must be a Go object
	param_s_ref := in.ReadRef()
	param_s := param_s_ref.Get().(*testpkg.S)
	res := testpkg.CallSSum(param_s)
	out.WriteFloat64(res)
}
开发者ID:0x90sled,项目名称:mobile,代码行数:7,代码来源:go_testpkg.go

示例2: proxyI_Times

func proxyI_Times(out, in *seq.Buffer) {
	ref := in.ReadRef()
	v := ref.Get().(testpkg.I)
	param_v := in.ReadInt32()
	res := v.Times(param_v)
	out.WriteInt64(res)
}
开发者ID:0x90sled,项目名称:mobile,代码行数:7,代码来源:go_testpkg.go

示例3: proxyS_TryTwoStrings

func proxyS_TryTwoStrings(out, in *seq.Buffer) {
	ref := in.ReadRef()
	v := ref.Get().(*testpkg.S)
	param_first := in.ReadString()
	param_second := in.ReadString()
	res := v.TryTwoStrings(param_first, param_second)
	out.WriteString(res)
}
开发者ID:0x90sled,项目名称:mobile,代码行数:8,代码来源:go_testpkg.go

示例4: proxyNode_Err_Get

func proxyNode_Err_Get(out, in *seq.Buffer) {
	ref := in.ReadRef()
	v := ref.Get().(*testpkg.Node).Err
	if v == nil {
		out.WriteString("")
	} else {
		out.WriteString(v.Error())
	}
}
开发者ID:0x90sled,项目名称:mobile,代码行数:9,代码来源:go_testpkg.go

示例5: proxyIE

func proxyIE(out, in *seq.Buffer) {
	ref := in.ReadRef()
	v := ref.Get().(testpkg.I)
	err := v.E()
	if err == nil {
		out.WriteUTF16("")
	} else {
		out.WriteUTF16(err.Error())
	}
}
开发者ID:Miaque,项目名称:mojo,代码行数:10,代码来源:go_testpkg.go

示例6: var_setInterfaceVar

func var_setInterfaceVar(out, in *seq.Buffer) {
	var v testpkg.I
	v_ref := in.ReadRef()
	if v_ref.Num < 0 { // go object
		v = v_ref.Get().(testpkg.I)
	} else { // foreign object
		v = (*proxyI)(v_ref)
	}
	testpkg.InterfaceVar = v
}
开发者ID:nadiasvertex,项目名称:mobile,代码行数:10,代码来源:go_testpkg.go

示例7: proxy_Keep

func proxy_Keep(out, in *seq.Buffer) {
	var param_i testpkg.I
	param_i_ref := in.ReadRef()
	if param_i_ref.Num < 0 {
		param_i = param_i_ref.Get().(testpkg.I)
	} else {
		param_i = (*proxyI)(param_i_ref)
	}
	testpkg.Keep(param_i)
}
开发者ID:dylanpoe,项目名称:golang.org,代码行数:10,代码来源:go_testpkg.go

示例8: proxy_CallF

func proxy_CallF(out, in *seq.Buffer) {
	var param_i testpkg.I
	param_i_ref := in.ReadRef()
	if param_i_ref.Num < 0 { // go object
		param_i = param_i_ref.Get().(testpkg.I)
	} else { // foreign object
		param_i = (*proxyI)(param_i_ref)
	}
	testpkg.CallF(param_i)
}
开发者ID:Miaque,项目名称:mojo,代码行数:10,代码来源:go_testpkg.go

示例9: proxyI_Error

func proxyI_Error(out, in *seq.Buffer) {
	ref := in.ReadRef()
	v := ref.Get().(testpkg.I)
	param_triggerError := in.ReadBool()
	err := v.Error(param_triggerError)
	if err == nil {
		out.WriteString("")
	} else {
		out.WriteString(err.Error())
	}
}
开发者ID:0x90sled,项目名称:mobile,代码行数:11,代码来源:go_testpkg.go

示例10: proxyStructThatStartsWithLetterBeforeZ_Value_Set

func proxyStructThatStartsWithLetterBeforeZ_Value_Set(out, in *seq.Buffer) {
	ref := in.ReadRef()
	var v testpkg.Z
	v_ref := in.ReadRef()
	if v_ref.Num < 0 { // go object
		v = v_ref.Get().(testpkg.Z)
	} else { // foreign object
		v = (*proxyZ)(v_ref)
	}
	ref.Get().(*testpkg.StructThatStartsWithLetterBeforeZ).Value = v
}
开发者ID:Christeefym,项目名称:lantern,代码行数:11,代码来源:go_testpkg.go

示例11: proxy_RegisterI

func proxy_RegisterI(out, in *seq.Buffer) {
	param_idx := in.ReadInt32()
	var param_i testpkg.I
	param_i_ref := in.ReadRef()
	if param_i_ref.Num < 0 { // go object
		param_i = param_i_ref.Get().(testpkg.I)
	} else { // foreign object
		param_i = (*proxyI)(param_i_ref)
	}
	testpkg.RegisterI(param_idx, param_i)
}
开发者ID:0x90sled,项目名称:mobile,代码行数:11,代码来源:go_testpkg.go

示例12: proxyI_StringError

func proxyI_StringError(out, in *seq.Buffer) {
	ref := in.ReadRef()
	v := ref.Get().(testpkg.I)
	param_s := in.ReadString()
	res, err := v.StringError(param_s)
	out.WriteString(res)
	if err == nil {
		out.WriteString("")
	} else {
		out.WriteString(err.Error())
	}
}
开发者ID:0x90sled,项目名称:mobile,代码行数:12,代码来源:go_testpkg.go

示例13: proxy_CallE

func proxy_CallE(out, in *seq.Buffer) {
	var param_i testpkg.I
	param_i_ref := in.ReadRef()
	if param_i_ref.Num < 0 { // go object
		param_i = param_i_ref.Get().(testpkg.I)
	} else { // foreign object
		param_i = (*proxyI)(param_i_ref)
	}
	err := testpkg.CallE(param_i)
	if err == nil {
		out.WriteUTF16("")
	} else {
		out.WriteUTF16(err.Error())
	}
}
开发者ID:Miaque,项目名称:mojo,代码行数:15,代码来源:go_testpkg.go

示例14: proxy_CallIError

func proxy_CallIError(out, in *seq.Buffer) {
	var param_i testpkg.I
	param_i_ref := in.ReadRef()
	if param_i_ref.Num < 0 { // go object
		param_i = param_i_ref.Get().(testpkg.I)
	} else { // foreign object
		param_i = (*proxyI)(param_i_ref)
	}
	param_triggerError := in.ReadBool()
	err := testpkg.CallIError(param_i, param_triggerError)
	if err == nil {
		out.WriteString("")
	} else {
		out.WriteString(err.Error())
	}
}
开发者ID:0x90sled,项目名称:mobile,代码行数:16,代码来源:go_testpkg.go

示例15: proxyIF

func proxyIF(out, in *seq.Buffer) {
	ref := in.ReadRef()
	v := ref.Get().(testpkg.I)
	v.F()
}
开发者ID:Miaque,项目名称:mojo,代码行数:5,代码来源:go_testpkg.go


注:本文中的golang.org/x/mobile/bind/seq.Buffer.ReadRef方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。