Documentation
¶
Index ¶
- Variables
- func ShiftJisToUnicode(uint8Array []byte) (str string, err error)
- type DataView
- func (D *DataView) GetChars(size int) (str string)
- func (D *DataView) GetFloat32() float32
- func (D *DataView) GetFloat64() float64
- func (D *DataView) GetIndex(Type int64) (size int32)
- func (D *DataView) GetSjisStringsAsUnicode(size int) string
- func (D *DataView) GetTextBuffer() string
- func (D *DataView) GetUnicodeStrings(size int) string
- func (D *DataView) Read(v interface{}) error
- func (D *DataView) ReadInterface(v interface{}) error
- func (D *DataView) SetFloat32(v float32) error
- func (D *DataView) SetFloat64(v float64) error
- func (D *DataView) Write(v interface{}) error
- type DataViewEx
- type DataViewExFunc
- type DataViewExParseTag
- type DataViewExViewFunc
- type DataViewParseFunc
- type TagProcess
Constants ¶
This section is empty.
Variables ¶
View Source
var DataViewParse map[string]DataViewParseFunc
DataViewParse 视图解析过程
View Source
var ParseTag map[string]DataViewExFunc
ParseTag 标签解析
Functions ¶
func ShiftJisToUnicode ¶
ShiftJisToUnicode ShiftJis转Unicode
Types ¶
type DataView ¶
type DataView struct { binary.ByteOrder Parse map[string]DataViewParseFunc //! 扩展信息 ExpandFunc map[string]DataViewExViewFunc ExpandValue map[string]reflect.Value // contains filtered or unexported fields }
DataView 数据视图 ? 转换数据: ! bool ! int8 ! uint8 ! int16 ! uint16 ! int32 ! uint32 ! int64 ! uint64 ! float32 ! float64
func NweDataView ¶
func NweDataView(buf io.ReadWriter, LittleEndian bool) *DataView
NweDataView 创建数据视图
func (*DataView) GetFloat64 ¶
GetFloat64 处获取一个64-bit数(双精度浮点型)
func (*DataView) GetSjisStringsAsUnicode ¶
GetSjisStringsAsUnicode 得到数据
func (*DataView) GetUnicodeStrings ¶
GetUnicodeStrings 得到数据
func (*DataView) ReadInterface ¶
ReadInterface 接口转换
func (*DataView) SetFloat32 ¶
SetFloat32 处储存一个32-bit数(浮点型)
func (*DataView) SetFloat64 ¶
SetFloat64 处储存一个64-bit数(双精度浮点型)
type DataViewEx ¶
type DataViewEx struct {
DataView
}
DataViewEx 数据视图扩展
func NweDataViewEx ¶
func NweDataViewEx(buf io.ReadWriter, LittleEndian bool) (dv *DataViewEx)
NweDataViewEx 创建数据视图扩展
type DataViewExFunc ¶
type DataViewExFunc func(tag string, itself *DataViewExParseTag)
DataViewExFunc 扩展标签解析过程
type DataViewExParseTag ¶
type DataViewExParseTag struct { //! 运行信息 Position int Process TagProcess //! 数据信息 View *DataView //? 指向数据视图 Itself *reflect.Value //? 指向结构体 ItselfType reflect.Type //? 指向结构体类型 Value reflect.Value //? 指向当前解析的结构体成员 ValueStructField reflect.StructField //! 返回信息 Error error }
DataViewExParseTag 扩展标签解析过程
type DataViewExViewFunc ¶
type DataViewExViewFunc func(itself *DataViewExParseTag)
DataViewExViewFunc 扩展标签解析过程
type DataViewParseFunc ¶
DataViewParseFunc 解析过程
type TagProcess ¶
type TagProcess uint
TagProcess 标签流程控制
const ( TagPatientia TagProcess = iota TagBreak //? 跳过剩余标签处理 TagMainContinue //? 跳过当前解析 TagMainBreak //? 跳过全部解析 )
Click to show internal directories.
Click to hide internal directories.