Documentation
¶
Index ¶
- Variables
- func DeqComponent(e CEnv, rcs []*RawComponent) error
- func DeqEntity(e CEnv, res []*RawEntity) error
- func NewData(n float64) *data.Vector
- func NewRaw(e CEnv) *raw
- func SetConstructor(cns ...Constructor) error
- type CEnv
- type Component
- type Components
- type Constructor
- type ConstructorFn
- type Constructors
- type Detailer
- type EmitFn
- type Emitter
- type Entities
- type Entity
- type Feature
- type FeatureGroup
- type Features
- type Grouper
- type Informer
- type MapFn
- type Mapper
- type Parenter
- type Raw
- type RawComponent
- type RawEntity
- type RawFeature
- type Tagger
- type Transmitter
- type Valuer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ExistsError = xrr.Xrror("A %s named %s already exists.").Out DoesNotExistError = xrr.Xrror("A %s named %s does not exist.").Out NotFoundError = xrr.Xrror("%s named %s not found").Out )
View Source
var EmitTypeError = xrr.Xrror("unable to emit item as %s").Out
View Source
var NoConstructorError = xrr.Xrror("Constructor with tag %s does not exist.").Out
Functions ¶
func DeqComponent ¶
func DeqComponent(e CEnv, rcs []*RawComponent) error
func SetConstructor ¶
func SetConstructor(cns ...Constructor) error
Types ¶
type CEnv ¶
type CEnv interface {
Raw
Constructors
Features
Components
Entities
Apply([]string, *data.Vector, ...MapFn) error
}
type Components ¶
type Components interface {
SetRawComponent(...*RawComponent) error
SetComponent(...Component) error
GetComponent(float64, string, ...string) []*data.Vector
MustGetComponent(float64, string, ...string) []*data.Vector
ListComponents() []Component
}
func NewComponents ¶
func NewComponents(e CEnv) Components
type Constructor ¶
func DefaultConstructor ¶
func DefaultConstructor(tag string, fn ConstructorFn) Constructor
func GetConstructor ¶
func GetConstructor(key string) (Constructor, bool)
func ListConstructors ¶
func ListConstructors() []Constructor
func NewConstructor ¶
func NewConstructor(tag string, order int, fn ConstructorFn) Constructor
type ConstructorFn ¶
type Constructors ¶
type Constructors interface {
SetConstructor(...Constructor) error
GetConstructor(string) (Constructor, bool)
ListConstructors() []Constructor
}
var Internal Constructors
func NewConstructors ¶
func NewConstructors() Constructors
type Emitter ¶
type Emitter interface {
Emit() data.Item
EmitString() (data.StringItem, error)
EmitStrings() (data.StringsItem, error)
EmitBool() (data.BoolItem, error)
EmitInt() (data.IntItem, error)
EmitFloat() (data.Float64Item, error)
EmitVector() (data.VectorItem, error)
}
func NewEmitter ¶
type Entities ¶
type Entities interface {
SetRawEntity(...*RawEntity) error
SetEntity(...Entity) error
GetEntity(float64, string) []*data.Vector
MustGetEntity(float64, string) []*data.Vector
ListEntities() []Entity
}
func NewEntities ¶
type FeatureGroup ¶
type FeatureGroup struct {
// contains filtered or unexported fields
}
func DecodeFeatureGroup ¶
func DecodeFeatureGroup(s string) (*FeatureGroup, error)
func (*FeatureGroup) Bytes ¶
func (fg *FeatureGroup) Bytes() ([]byte, error)
func (*FeatureGroup) Compress ¶
func (fg *FeatureGroup) Compress() *bytes.Buffer
func (*FeatureGroup) List ¶
func (fg *FeatureGroup) List() []RawFeature
func (*FeatureGroup) Value ¶
func (fg *FeatureGroup) Value() string
type Features ¶
type Features interface {
AddFeature(...Feature)
SetFeature(*RawFeature) error
GetFeature(string) Feature
MustGetFeature(string) Feature
GetGroup(string) *FeatureGroup
List(string) []RawFeature
Remove(...string) error
}
func NewFeatures ¶
type Informer ¶
type Informer interface {
Detailer
Valuer
Transmitter
}
type Raw ¶
type Raw interface {
Queue([]byte) error
Dequeue(...string)
//DeqComponent([]*RawComponent) error
//DeqEntity([]*RawEntity) error
AddRaw(...*RawFeature) error
}
type RawComponent ¶
type RawComponent struct {
Tag string
Defines []*RawFeature
Features []*RawFeature
}
type RawEntity ¶
type RawEntity struct {
Tag string
Defines []*RawFeature
Components []*RawComponent
}
type RawFeature ¶
type RawFeature struct {
Group []string
Tag string
Apply string
Values []string
Constructor Constructor
}
func (*RawFeature) MustGetValues ¶
func (r *RawFeature) MustGetValues() []string
type Transmitter ¶
type Transmitter interface {
RawFeature() RawFeature
}
Click to show internal directories.
Click to hide internal directories.