Documentation ¶
Index ¶
- func RegisterPrinter(ext string, p Printer)
- type Globals
- type Printer
- type PrinterContext
- type Stream
- func (self *Stream) Buffer() *bytes.Buffer
- func (self *Stream) Len() int
- func (self *Stream) Printf(format string, args ...interface{})
- func (self *Stream) WriteBytes(v []byte)
- func (self *Stream) WriteFile(outfile string) error
- func (self *Stream) WriteInt32(v int32)
- func (self *Stream) WriteNodeValue(ft model.FieldType, value *model.Node)
- func (self *Stream) WriteRawBytes(b []byte)
- func (self *Stream) WriteString(v string)
- type TableIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPrinter ¶
Types ¶
type Globals ¶
type Globals struct { Version string InputFileList []interface{} ParaMode bool ProtoVersion int LuaEnumIntValue bool LuaTabHeader string GenCSSerailizeCode bool PackageName string Printers []*PrinterContext CombineStructName string // 不包含路径, 用作 *model.FileDescriptor // 类型信息.用于添加各种导出结构 Tables []*model.Table // 数据信息.表格数据 GlobalIndexes []TableIndex // 类型信息.全局索引 CombineStruct *model.Descriptor // 类型信息.Combine结构体 BuildID string // contains filtered or unexported fields }
func NewGlobals ¶
func NewGlobals() *Globals
func (*Globals) AddOutputType ¶
type PrinterContext ¶
type PrinterContext struct {
// contains filtered or unexported fields
}
func (*PrinterContext) Start ¶
func (self *PrinterContext) Start(g *Globals) bool
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) WriteBytes ¶
func (*Stream) WriteInt32 ¶
func (*Stream) WriteNodeValue ¶
func (*Stream) WriteRawBytes ¶
func (*Stream) WriteString ¶
type TableIndex ¶
type TableIndex struct { Index *model.FieldDescriptor // 表头里的索引 Row *model.FieldDescriptor // 索引的数据 }
Click to show internal directories.
Click to hide internal directories.