Documentation ¶
Overview ¶
Package testcmd provides fake commands used for testing.
Index ¶
- Variables
- type A
- func (a *A) API() api.API
- func (a *A) Caller() api.CmdID
- func (a *A) CmdFlags(context.Context, api.CmdID, *api.GlobalState) api.CmdFlags
- func (a *A) CmdName() string
- func (a *A) Extras() *api.CmdExtras
- func (a *A) Mutate(context.Context, api.CmdID, *api.GlobalState, *builder.Builder) error
- func (a *A) SetCaller(api.CmdID)
- func (a *A) SetThread(uint64)
- func (a *A) Thread() uint64
- type API
- func (API) ConstantSets() *constset.Pack
- func (API) Context(*api.GlobalState, uint64) api.Context
- func (API) CreateCmd(name string) api.Cmd
- func (API) GetFramebufferAttachmentInfo(ctx context.Context, after []uint64, state *api.GlobalState, thread uint64, ...) (width, height, index uint32, format *image.Format, err error)
- func (API) ID() api.ID
- func (API) Index() uint8
- func (API) Name() string
- type B
- func (*B) API() api.API
- func (*B) Caller() api.CmdID
- func (*B) CmdFlags(context.Context, api.CmdID, *api.GlobalState) api.CmdFlags
- func (*B) CmdName() string
- func (*B) Extras() *api.CmdExtras
- func (*B) Mutate(context.Context, api.CmdID, *api.GlobalState, *builder.Builder) error
- func (*B) SetCaller(api.CmdID)
- func (*B) SetThread(uint64)
- func (*B) Thread() uint64
- type CmdAndID
- type CmdAndIDList
- type IntːStructPtr
- type Pointer
- func (p Pointer) Address() uint64
- func (p *Pointer) Assign(o interface{}) bool
- func (p Pointer) ElementSize(m *device.MemoryLayout) uint64
- func (p Pointer) ElementType() reflect.Type
- func (p Pointer) ISlice(start, end uint64, m *device.MemoryLayout) memory.Slice
- func (p Pointer) IsNullptr() bool
- func (p Pointer) Offset(n uint64) memory.Pointer
- func (p Pointer) Pool() memory.PoolID
- func (p Pointer) String() string
- type RawIntːStructPtr
- type StringːString
- type Struct
- type Writer
- type X
- func (X) API() api.API
- func (X) Caller() api.CmdID
- func (X) CmdFlags(context.Context, api.CmdID, *api.GlobalState) api.CmdFlags
- func (X) CmdName() string
- func (X) Extras() *api.CmdExtras
- func (X) Mutate(context.Context, api.CmdID, *api.GlobalState, *builder.Builder) error
- func (X) SetCaller(api.CmdID)
- func (X) SetThread(uint64)
- func (X) Thread() uint64
Constants ¶
This section is empty.
Variables ¶
View Source
var ( APIID = api.ID{1, 2, 3} P = &X{ Str: "aaa", Sli: []bool{true, false, true}, Ref: &Struct{Str: "ccc", Ref: &Struct{Str: "ddd"}}, Ptr: Pointer{0x123, 0x456}, Map: StringːString{map[string]string{"cat": "meow", "dog": "woof"}}, PMap: IntːStructPtr{map[int]*Struct{}}, RMap: map[string]string{"eyes": "see", "nose": "smells"}, } Q = &X{ Str: "xyz", Sli: []bool{false, true, false}, Ptr: Pointer{0x321, 0x654}, Map: StringːString{map[string]string{"bird": "tweet", "fox": "?"}}, PMap: IntːStructPtr{map[int]*Struct{ 100: &Struct{Str: "baldrick"}, }}, RMap: map[string]string{"ears": "hear", "tongue": "taste"}, } )
Functions ¶
This section is empty.
Types ¶
type CmdAndIDList ¶
type CmdAndIDList []CmdAndID
func List ¶
func List(cmds ...interface{}) CmdAndIDList
List takes a mix of Cmds and CmdIDsAndCmd and returns a CmdIDListAndCmd. Cmds are transformed into CmdIDsAndCmd by using the ID field as the command id.
type IntːStructPtr ¶
func (*IntːStructPtr) Assign ¶ added in v0.9.0
func (m *IntːStructPtr) Assign(v interface{}) bool
func (IntːStructPtr) Dictionary ¶ added in v0.9.0
func (m IntːStructPtr) Dictionary() dictionary.I
type Pointer ¶
type Pointer struct {
// contains filtered or unexported fields
}
func (Pointer) ElementSize ¶
func (p Pointer) ElementSize(m *device.MemoryLayout) uint64
func (Pointer) ElementType ¶
type RawIntːStructPtr ¶ added in v0.9.0
type StringːString ¶
func (*StringːString) Assign ¶ added in v0.9.0
func (m *StringːString) Assign(v interface{}) bool
func (StringːString) Dictionary ¶ added in v0.9.0
func (m StringːString) Dictionary() dictionary.I
type Writer ¶
type Writer struct { S *api.GlobalState Cmds []api.Cmd CmdsAndIDs []CmdAndID }
Writer is a transform.Writer that record all commands that pass through it.
func (*Writer) MutateAndWrite ¶
func (*Writer) State ¶
func (w *Writer) State() *api.GlobalState
type X ¶
type X struct { Str string `param:"Str"` Sli []bool `param:"Sli"` Ref *Struct `param:"Ref"` Ptr Pointer `param:"Ptr"` Map StringːString `param:"Map"` PMap IntːStructPtr `param:"PMap"` RMap RawIntːStructPtr `param:"RMap"` }
Click to show internal directories.
Click to hide internal directories.