本文整理汇总了Golang中server/data/datatype.Recorder.GetName方法的典型用法代码示例。如果您正苦于以下问题:Golang Recorder.GetName方法的具体用法?Golang Recorder.GetName怎么用?Golang Recorder.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类server/data/datatype.Recorder
的用法示例。
在下文中一共展示了Recorder.GetName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: RecModify
func (ts *PBTableCodec) RecModify(rec datatype.Recorder, row, col int) interface{} {
out := &s2c.RecordGrid{}
out.Record = proto.String(rec.GetName())
out.Row = proto.Int32(int32(row))
out.Col = proto.Int32(int32(col))
value, _ := rec.Get(row, col)
ar := util.NewStoreArchiver(nil)
ar.Write(value)
out.Gridinfo = ar.Data()
return out
}
示例2: RecSetRow
func (ts *PBTableCodec) RecSetRow(rec datatype.Recorder, row int) interface{} {
out := &s2c.RecordSetRow{}
out.Record = proto.String(rec.GetName())
out.Row = proto.Int32(int32(row))
data, err := rec.SerialRow(row)
if err != nil {
log.LogError(err)
return nil
}
out.Rowinfo = data
return out
}
示例3: SyncTable
func (ts *PBTableCodec) SyncTable(rec datatype.Recorder) interface{} {
data, err := rec.Serial()
if err != nil {
return nil
}
out := &s2c.CreateRecord{}
out.Record = proto.String(rec.GetName())
out.Rows = proto.Int32(int32(rec.GetRows()))
out.Cols = proto.Int32(int32(rec.GetCols()))
out.Recinfo = data
return out
}
示例4: RecClear
func (ts *PBTableCodec) RecClear(rec datatype.Recorder) interface{} {
out := &s2c.RecordClear{}
out.Record = proto.String(rec.GetName())
return out
}
示例5: RecDelete
func (ts *PBTableCodec) RecDelete(rec datatype.Recorder, row int) interface{} {
out := &s2c.RecordDelRow{}
out.Record = proto.String(rec.GetName())
out.Row = proto.Int32(int32(row))
return out
}
示例6: RecSetRow
func (gd *GlobalDataHelper) RecSetRow(self datatype.Entityer, rec datatype.Recorder, row int) {
if !gd.isServer {
return
}
v := gd.dataChange()
for _, client := range gd.globalclients {
if client.disable || client.status == STATUS_NONE { //没有开启
continue
}
app := GetAppById(client.appid)
if app == nil {
continue
}
rowvalues, _ := rec.SerialRow(row)
app.CallBack(nil, "GlobalHelper.GlobalDataRecSetRow", gd.OnDataChanged, self.GetIndex(), v, rec.GetName(), row, rowvalues)
}
}
示例7: RecModify
func (gd *GlobalDataHelper) RecModify(self datatype.Entityer, rec datatype.Recorder, row, col int) {
if !gd.isServer {
return
}
v := gd.dataChange()
for _, client := range gd.globalclients {
if client.disable || client.status == STATUS_NONE { //没有开启
continue
}
app := GetAppById(client.appid)
if app == nil {
continue
}
val, _ := rec.Get(row, col)
app.CallBack(nil, "GlobalHelper.GlobalDataRecModify", gd.OnDataChanged, self.GetIndex(), v, rec.GetName(), row, col, datatype.NewAny(0, val))
}
}