parser

package
v0.0.0-...-caf82ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

NOTE: This file is generated by tool/update_pbem.rb

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtoUnmarshal

func ProtoUnmarshal(data []byte, obj proto.Message) error

func ReadFile

func ReadFile(path string) []byte

func ReadStringZ

func ReadStringZ(datas []byte, offset int) string

func SnappyUncompress

func SnappyUncompress(compressed []byte) []byte

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type ItemType

type ItemType int

type Parser

type Parser struct {
	Sequence int64
	Items    map[int64]*ParserItem
	// contains filtered or unexported fields
}

func NewParser

func NewParser(data []byte) *Parser

func ParserFromFile

func ParserFromFile(path string) *Parser

func (*Parser) Analyze

func (p *Parser) Analyze(callback func(*ParserBaseItem))

func (*Parser) AnalyzePacket

func (p *Parser) AnalyzePacket(callback func(*ParserBaseItem), fromEvent dota.EDemoCommands, tick int, data []byte)

func (*Parser) AsBaseEvent

func (p *Parser) AsBaseEvent(commandName string) (proto.Message, error)

func (*Parser) AsBaseEventBUMDUM

func (p *Parser) AsBaseEventBUMDUM(value int) (proto.Message, error)

func (*Parser) AsBaseEventNETSVC

func (p *Parser) AsBaseEventNETSVC(value int) (proto.Message, error)

type ParserBaseEvent

type ParserBaseEvent int

type ParserBaseEventMapType

type ParserBaseEventMapType int
const (
	DEM ParserBaseEventMapType = iota
	NET
	SVC
	BUM
	DUM
)

type ParserBaseItem

type ParserBaseItem struct {
	Sequence int64
	Tick     int
	From     dota.EDemoCommands
	Object   proto.Message
}

type ParserBaseItems

type ParserBaseItems []*ParserBaseItem

ParserBaseItems attaches the methods of Interface to []*ParserBaseItem, sorting in increasing order by Sequence.

func (ParserBaseItems) Len

func (p ParserBaseItems) Len() int

func (ParserBaseItems) Less

func (p ParserBaseItems) Less(i, j int) bool

func (ParserBaseItems) Swap

func (p ParserBaseItems) Swap(i, j int)

type ParserItem

type ParserItem struct {
	Sequence int64
	Tick     int
	Data     []byte
	From     dota.EDemoCommands
	Object   proto.Message
}

type ParserItems

type ParserItems []*ParserItem

ParserItems attaches the methods of Interface to []*ParserItem, sorting in increasing order by Sequence.

func (ParserItems) Len

func (p ParserItems) Len() int

func (ParserItems) Less

func (p ParserItems) Less(i, j int) bool

func (ParserItems) Swap

func (p ParserItems) Swap(i, j int)

type SignonPacket

type SignonPacket struct{}

func (SignonPacket) ProtoMessage

func (s SignonPacket) ProtoMessage()

func (SignonPacket) Reset

func (s SignonPacket) Reset()

func (SignonPacket) String

func (s SignonPacket) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL