Documentation ¶
Index ¶
- Constants
- Variables
- func AsBool(v Value) bool
- func AssertType(v Value, path TypePath)
- func Chunk(v Value, ref string) interface{}
- func Del(v Value)
- func IsType(v Value, path TypePath) bool
- func Unint(i Value) int
- func Unstring(b Value) string
- func Unuint(i Value) uint
- type Datum
- func (d *Datum) Dump(o *debug.Output)
- func (d *Datum) Invoke(usr *Datum, name string, params ...Value) Value
- func (d *Datum) Realm() *Realm
- func (d *Datum) SetVar(name string, value Value)
- func (d *Datum) String() string
- func (d *Datum) SuperInvoke(usr *Datum, chunk string, name string, params ...Value) Value
- func (d *Datum) Type() TypePath
- func (d *Datum) UID() uint64
- func (d *Datum) Var(name string) Value
- type DatumImpl
- type Int
- type ProcSettings
- type Realm
- func (r *Realm) FindAll(predicate func(*Datum) bool) (out []Value)
- func (r *Realm) FindOne(predicate func(*Datum) bool) Value
- func (realm *Realm) IsSubType(path TypePath, of TypePath) bool
- func (r *Realm) Lookup(uid uint64) Value
- func (realm *Realm) New(path TypePath, usr *Datum, params ...Value) *Datum
- func (realm *Realm) NewDatum(impl DatumImpl) *Datum
- func (realm *Realm) NewPlain(path TypePath, params ...Value) *Datum
- func (realm *Realm) SetWorldRef(worldRef interface{})
- func (realm *Realm) WorldRef() interface{}
- type Ref
- type SetResult
- type SrcSetting
- type SrcSettingType
- type String
- type TypePath
- type TypeTree
- type Value
Constants ¶
View Source
const SrcDistUnspecified int = -1
Variables ¶
View Source
var TRACE = false
Functions ¶
func AssertType ¶
Types ¶
type Datum ¶
type Datum struct {
// contains filtered or unexported fields
}
func (*Datum) SuperInvoke ¶
type DatumImpl ¶
type DatumImpl interface { Type() TypePath Var(src *Datum, name string) (Value, bool) SetVar(src *Datum, name string, value Value) SetResult Proc(src *Datum, usr *Datum, name string, params ...Value) (Value, bool) SuperProc(src *Datum, usr *Datum, chunk string, name string, params ...Value) (Value, bool) ProcSettings(name string) (ProcSettings, bool) Chunk(ref string) interface{} }
func UnpackDatum ¶
type ProcSettings ¶
type ProcSettings struct {
Src SrcSetting
}
really just used for verbs (except background which isn't supported yet)
func (ProcSettings) IsZero ¶
func (p ProcSettings) IsZero() bool
type Realm ¶
type Realm struct { TreePrivateState interface{} // populated by the TypeTree // contains filtered or unexported fields }
func (*Realm) SetWorldRef ¶
func (realm *Realm) SetWorldRef(worldRef interface{})
type Ref ¶
type Ref struct {
// contains filtered or unexported fields
}
long-lived pointers to Values need to be Refs
func (*Ref) Dereference ¶
type SrcSetting ¶
type SrcSetting struct { Type SrcSettingType Dist int In bool }
func (SrcSetting) IsZero ¶
func (s SrcSetting) IsZero() bool
type SrcSettingType ¶
type SrcSettingType int
const ( SrcSettingTypeUsr SrcSettingType = iota SrcSettingTypeUsrContents SrcSettingTypeUsrLoc SrcSettingTypeUsrGroup SrcSettingTypeWorld SrcSettingTypeWorldContents SrcSettingTypeView SrcSettingTypeOView )
func (SrcSettingType) String ¶
func (s SrcSettingType) String() string
Click to show internal directories.
Click to hide internal directories.