Documentation
¶
Overview ¶
Package dotc implements code-generation tools for dot.changes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
Name, Key, Type string
Atomic bool
ToValueFmt, FromValueFmt, ToStreamFmt, FromStreamValueFmt string
}
Field holds info for a struct field
func (Field) FromStreamValue ¶
FromStreamValue returns the name of the associated stream type
func (Field) ToStreamType ¶
ToStreamType returns the name of the associated stream type
type Info ¶
type Info struct { Package string Imports [][2]string Structs []Struct Unions []Union Slices []Slice StructStreams []Struct UnionStreams []Union SliceStreams []Slice }
Info tracks all information used for code generation
func (Info) GenerateTests ¶
GenerateTests generates the tests
type Slice ¶
Slice has the type information of a slice for code generation of the Apply(), ApplyCollection() and Splice() methods
func (Slice) GenerateApply ¶
GenerateApply generates the code for the changes.Value Apply() method and the ApplyCollection() method
func (Slice) GenerateSetters ¶
GenerateSetters generates the code for the field setters
type SliceStream ¶
type SliceStream Slice
SliceStream implements code generation for streams of slices
func (SliceStream) Elem ¶
func (s SliceStream) Elem() Field
Elem simply proxies to Slice, needed because of template limitation
func (SliceStream) GenerateStream ¶
func (s SliceStream) GenerateStream(w io.Writer) error
GenerateStream generates the stream implementation
func (SliceStream) GenerateStreamTests ¶
func (s SliceStream) GenerateStreamTests(w io.Writer) error
GenerateStreamTests generates the stream tests
func (SliceStream) Pointer ¶
func (s SliceStream) Pointer() bool
Pointer simply proxies to Slice, needed because of template limitation
func (SliceStream) RawType ¶
func (s SliceStream) RawType() string
RawType simply proxies to Slice, needed because of template limitation
func (SliceStream) StreamType ¶
func (s SliceStream) StreamType() string
StreamType provides the stream type of the struct
type Struct ¶
Struct has the type information of a struct for code generation of the Apply() and SetField(..) methods
func (Struct) GenerateApply ¶
GenerateApply generates the code for the changes.Value Apply() method
func (Struct) GenerateSetters ¶
GenerateSetters generates the code for the field setters
type StructStream ¶
type StructStream Struct
StructStream implements code generation for streams of structs
func (StructStream) GenerateStream ¶
func (s StructStream) GenerateStream(w io.Writer) error
GenerateStream generates the stream implementation
func (StructStream) GenerateStreamTests ¶
func (s StructStream) GenerateStreamTests(w io.Writer) error
GenerateStreamTests generates the stream tests
func (StructStream) StreamType ¶
func (s StructStream) StreamType() string
StreamType provides the stream type of the struct
type Union ¶
Union has the type information of a union for code generation of the Apply() and SetField(..) methods
func (Union) GenerateApply ¶
GenerateApply generates the code for the changes.Value Apply() method
func (Union) GenerateSetters ¶
GenerateSetters generates the code for the field setters
type UnionStream ¶
type UnionStream Union
UnionStream implements stream functionality for unions
func (UnionStream) GenerateStream ¶
func (s UnionStream) GenerateStream(w io.Writer) error
GenerateStream generates the stream implementation
func (UnionStream) GenerateStreamTests ¶
func (s UnionStream) GenerateStreamTests(w io.Writer) error
GenerateStreamTests generates the stream tests
func (UnionStream) Pointer ¶
func (s UnionStream) Pointer() bool
Pointer specifies if the struct type is itself a pointer
func (UnionStream) StreamType ¶
func (s UnionStream) StreamType() string
StreamType provides the stream type of the struct