本文整理汇总了Golang中server/data/datatype.Recorder类的典型用法代码示例。如果您正苦于以下问题:Golang Recorder类的具体用法?Golang Recorder怎么用?Golang Recorder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Recorder类的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: 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))
}
}
示例5: RecAppend
//表格变动同步
func (gd *GlobalDataHelper) RecAppend(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.GlobalDataRecAppend", gd.OnDataChanged, self.GetIndex(), v, rec.GetName(), row, rowvalues)
}
}
示例6: RecClear
func (ts *PBTableCodec) RecClear(rec datatype.Recorder) interface{} {
out := &s2c.RecordClear{}
out.Record = proto.String(rec.GetName())
return out
}
示例7: 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
}