entity

package
v0.0.0-...-4c5ac3e Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CursorVisit

func CursorVisit(cur Cursor, f func(Id) bool)

func IsAttributeNotFoundError

func IsAttributeNotFoundError(err error) bool

Types

type Cursor

type Cursor interface {
	Fix() (Id, bool)
	Advance()
	Seek(Id)
}

func CursorFromAttribute

func CursorFromAttribute(s *Store, v Value) Cursor

func CursorFromIds

func CursorFromIds(ids ...Id) Cursor

func CursorJoin

func CursorJoin(cursors ...Cursor) Cursor

type Id

type Id struct {
	// contains filtered or unexported fields
}

func (Id) Less

func (id Id) Less(than Id) bool

func (Id) String

func (id Id) String() string

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *Store

func (*Store) Clear

func (s *Store) Clear(v Value)

func (*Store) DestroyEntity

func (s *Store) DestroyEntity(entityId Id)

func (*Store) Entities

func (s *Store) Entities(vs ...Value) Cursor

func (*Store) First

func (s *Store) First(entityId Id, vs ...Value) bool

func (*Store) Give

func (s *Store) Give(entityId Id, vs ...Value)

func (*Store) NewEntityId

func (s *Store) NewEntityId() Id

func (*Store) Next

func (s *Store) Next(entityId Id, v Value) bool

func (*Store) Remove

func (s *Store) Remove(entityId Id, vs ...Value)

type Value

type Value interface {
	Less(Value) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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