mcore

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseReader

type BaseReader[T IHashModel] struct {
	File *os.File

	ReadText func() string
	// contains filtered or unexported fields
}

func (*BaseReader[T]) Close

func (r *BaseReader[T]) Close()

func (*BaseReader[T]) DecodeBytes

func (r *BaseReader[T]) DecodeBytes(fbytes []byte, encoding encoding.Encoding) (string, error)

func (*BaseReader[T]) DecodeShiftJIS

func (r *BaseReader[T]) DecodeShiftJIS(fbytes []byte) (string, error)

func (*BaseReader[T]) DecodeText

func (r *BaseReader[T]) DecodeText(mainEncoding encoding.Encoding, fbytes []byte) string

func (*BaseReader[T]) DefineEncoding

func (r *BaseReader[T]) DefineEncoding(encoding encoding.Encoding)

func (*BaseReader[T]) Open

func (r *BaseReader[T]) Open(path string) error

func (*BaseReader[T]) ReadByFilepath

func (r *BaseReader[T]) ReadByFilepath(path string) (T, error)

func (*BaseReader[T]) ReadHashByFilePath

func (r *BaseReader[T]) ReadHashByFilePath(path string) (string, error)

func (*BaseReader[T]) ReadNameByFilepath

func (r *BaseReader[T]) ReadNameByFilepath(path string) (string, error)

func (*BaseReader[T]) UnpackByte

func (r *BaseReader[T]) UnpackByte() (byte, error)

バイナリデータから byte を読み出す

func (*BaseReader[T]) UnpackBytes

func (r *BaseReader[T]) UnpackBytes(size int) ([]byte, error)

バイナリデータから bytes を読み出す

func (*BaseReader[T]) UnpackFloat

func (r *BaseReader[T]) UnpackFloat() (float64, error)

バイナリデータから float64 を読み出す

func (*BaseReader[T]) UnpackInt

func (r *BaseReader[T]) UnpackInt() (int, error)

バイナリデータから int を読み出す

func (*BaseReader[T]) UnpackQuaternion

func (r *BaseReader[T]) UnpackQuaternion(isConvertGl bool) (mmath.MQuaternion, error)

func (*BaseReader[T]) UnpackSByte

func (r *BaseReader[T]) UnpackSByte() (int8, error)

バイナリデータから sbyte を読み出す

func (*BaseReader[T]) UnpackShort

func (r *BaseReader[T]) UnpackShort() (int16, error)

バイナリデータから int16 を読み出す

func (*BaseReader[T]) UnpackUInt

func (r *BaseReader[T]) UnpackUInt() (uint, error)

バイナリデータから uint を読み出す

func (*BaseReader[T]) UnpackUShort

func (r *BaseReader[T]) UnpackUShort() (uint16, error)

バイナリデータから uint16 を読み出す

func (*BaseReader[T]) UnpackVec2

func (r *BaseReader[T]) UnpackVec2() (mmath.MVec2, error)

func (*BaseReader[T]) UnpackVec3

func (r *BaseReader[T]) UnpackVec3(isConvertGl bool) (mmath.MVec3, error)

func (*BaseReader[T]) UnpackVec4

func (r *BaseReader[T]) UnpackVec4(isConvertGl bool) (mmath.MVec4, error)

type HashModel

type HashModel struct {
	Path string
	Hash string
}

func NewHashModel

func NewHashModel(path string) *HashModel

func (*HashModel) Delete

func (m *HashModel) Delete()

func (*HashModel) GetHash

func (m *HashModel) GetHash() string

func (*HashModel) GetName

func (m *HashModel) GetName() string

func (*HashModel) GetPath

func (m *HashModel) GetPath() string

func (*HashModel) IsEmpty

func (m *HashModel) IsEmpty() bool

func (*HashModel) IsNotEmpty

func (m *HashModel) IsNotEmpty() bool

func (*HashModel) SetName

func (m *HashModel) SetName(name string)

func (*HashModel) SetPath

func (m *HashModel) SetPath(path string)

type IHashModel

type IHashModel interface {
	GetName() string
	SetName(name string)
	IsNotEmpty() bool
	IsEmpty() bool
	GetHash() string
	GetPath() string
	SetPath(path string)
	Delete()
}

type IIndexModel

type IIndexModel interface {
	IsValid() bool
	Copy() IIndexModel
	GetIndex() int
	SetIndex(index int)
}

type IIndexNameModel

type IIndexNameModel interface {
	IsValid() bool
	Copy() IIndexNameModel
	GetIndex() int
	SetIndex(index int)
	GetName() string
	SetName(name string)
}

type IndexModel

type IndexModel struct {
	Index int
}

INDEXを持つ基底クラス

func (*IndexModel) Copy

func (v *IndexModel) Copy() IIndexModel

func (*IndexModel) GetIndex

func (v *IndexModel) GetIndex() int

func (*IndexModel) IsValid

func (v *IndexModel) IsValid() bool

func (*IndexModel) SetIndex

func (v *IndexModel) SetIndex(index int)

type IndexModels

type IndexModels[T IIndexModel] struct {
	Data []T
	// contains filtered or unexported fields
}

Tのリスト基底クラス

func NewIndexModels

func NewIndexModels[T IIndexModel](count int, nilFunc func() T) *IndexModels[T]

func (*IndexModels[T]) Append

func (c *IndexModels[T]) Append(value T)

func (*IndexModels[T]) Contains

func (c *IndexModels[T]) Contains(key int) bool

func (*IndexModels[T]) DeleteItem

func (c *IndexModels[T]) DeleteItem(index int)

func (*IndexModels[T]) Get

func (c *IndexModels[T]) Get(index int) T

func (*IndexModels[T]) IsDirty

func (c *IndexModels[T]) IsDirty() bool

func (*IndexModels[T]) Len

func (c *IndexModels[T]) Len() int

func (*IndexModels[T]) SetDirty

func (c *IndexModels[T]) SetDirty(dirty bool)

func (*IndexModels[T]) SetItem

func (c *IndexModels[T]) SetItem(index int, v T)

func (*IndexModels[T]) Update

func (c *IndexModels[T]) Update(value T)

type IndexNameModel

type IndexNameModel struct {
	Index       int
	Name        string
	EnglishName string
}

INDEXを持つ基底クラス

func (*IndexNameModel) Copy

func (v *IndexNameModel) Copy() IIndexNameModel

func (*IndexNameModel) GetIndex

func (v *IndexNameModel) GetIndex() int

func (*IndexNameModel) GetName

func (v *IndexNameModel) GetName() string

func (*IndexNameModel) IsValid

func (v *IndexNameModel) IsValid() bool

func (*IndexNameModel) SetIndex

func (v *IndexNameModel) SetIndex(index int)

func (*IndexNameModel) SetName

func (v *IndexNameModel) SetName(name string)

type IndexNameModels

type IndexNameModels[T IIndexNameModel] struct {
	Data        []T
	NameIndexes map[string]int
	// contains filtered or unexported fields
}

Tのリスト基底クラス

func NewIndexNameModels

func NewIndexNameModels[T IIndexNameModel](count int, nilFunc func() T) *IndexNameModels[T]

func (*IndexNameModels[T]) Append

func (c *IndexNameModels[T]) Append(value T)

func (*IndexNameModels[T]) Contains

func (v *IndexNameModels[T]) Contains(index int) bool

func (*IndexNameModels[T]) ContainsByName

func (v *IndexNameModels[T]) ContainsByName(name string) bool

func (*IndexNameModels[T]) ContainsIndex

func (c *IndexNameModels[T]) ContainsIndex(key int) bool

func (*IndexNameModels[T]) ContainsName

func (c *IndexNameModels[T]) ContainsName(key string) bool

func (*IndexNameModels[T]) DeleteItem

func (c *IndexNameModels[T]) DeleteItem(index int)

func (*IndexNameModels[T]) Get

func (c *IndexNameModels[T]) Get(index int) T

func (*IndexNameModels[T]) GetByName

func (c *IndexNameModels[T]) GetByName(name string) T

func (*IndexNameModels[T]) GetIndexes

func (c *IndexNameModels[T]) GetIndexes() []int

func (*IndexNameModels[T]) GetNames

func (c *IndexNameModels[T]) GetNames() []string

func (*IndexNameModels[T]) IsDirty

func (v *IndexNameModels[T]) IsDirty() bool

func (*IndexNameModels[T]) IsEmpty

func (c *IndexNameModels[T]) IsEmpty() bool

func (*IndexNameModels[T]) IsNotEmpty

func (c *IndexNameModels[T]) IsNotEmpty() bool

func (*IndexNameModels[T]) LastIndex

func (c *IndexNameModels[T]) LastIndex() int

func (*IndexNameModels[T]) Len

func (c *IndexNameModels[T]) Len() int

func (*IndexNameModels[T]) SetDirty

func (v *IndexNameModels[T]) SetDirty(dirty bool)

func (*IndexNameModels[T]) SetItem

func (c *IndexNameModels[T]) SetItem(index int, v T)

func (*IndexNameModels[T]) Update

func (c *IndexNameModels[T]) Update(value T)

type Int

type Int int

func NewInt

func NewInt(v int) Int

func (Int) Less

func (v Int) Less(than llrb.Item) bool

type IntIndexes

type IntIndexes struct {
	*llrb.LLRB
}

func NewIntIndexes

func NewIntIndexes() *IntIndexes

func (IntIndexes) Has

func (i IntIndexes) Has(index int) bool

func (IntIndexes) Len

func (i IntIndexes) Len() int

func (IntIndexes) List

func (i IntIndexes) List() []int

func (IntIndexes) Max

func (i IntIndexes) Max() int

func (IntIndexes) Min

func (i IntIndexes) Min() int

func (IntIndexes) Next

func (i IntIndexes) Next(index int) int

func (IntIndexes) Prev

func (i IntIndexes) Prev(index int) int

type ReaderInterface

type ReaderInterface interface {
	ReadNameByFilepath(path string) (string, error)
	ReadByFilepath(path string) (IHashModel, error)
	ReadHashByFilePath(path string) (string, error)
}

Jump to

Keyboard shortcuts

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