Documentation
¶
Index ¶
- Constants
- func CNameToCamelName(s string) string
- func EnableWarningsSimpleTypeNameSkipLegacy(conFullName string) bool
- func EnableWarningsUnionNameExactSkipLegacy(conFullName string) bool
- func EnableWarningsUnionNamePrefixSkipLegacy(conName string, typePrefix string, typeSuffix string) bool
- func EnableWarningsUnionNamespaceSkipLegacy(conNamespace string, typeNamespace string) bool
- func GenerateUnusedNatTemplates(conFullName string) bool
- func IsUnionBool(tlType []*tlast.Combinator) (isBool bool, falseDesc *tlast.Combinator, trueDesc *tlast.Combinator)
- func IsUnionMaybe(tlType []*tlast.Combinator) (isMaybe bool, emptyDesc *tlast.Combinator, okDesc *tlast.Combinator)
- func ReplaceSquareBracketsElem(tl tlast.TL, forTLO bool) (tlast.TL, error)
- func ToLowerFirst(str string) string
- func ToUpperFirst(str string) string
- func TypeRWWrapperLessGlobal(a *TypeRWWrapper, b *TypeRWWrapper) int
- func TypeRWWrapperLessLocal(a *TypeRWWrapper, b *TypeRWWrapper) int
- type ActualNatArg
- type Deconflicter
- type DirectImports
- type DirectIncludesCPP
- type Field
- type Gen2
- type Gen2Options
- type HalfResolvedArgument
- type InsFile
- type InternalNamespace
- func (n *InternalNamespace) FindRecursiveImports(ri map[*InternalNamespace][]*InternalNamespace, replace *InternalNamespace)
- func (n *InternalNamespace) ImportsSingleNamedNamespace() (empty bool, name string)
- func (n *InternalNamespace) Prefix(directImports *DirectImports, in *InternalNamespace) string
- func (n InternalNamespace) String() string
- type LocalNatArg
- type LocalResolveContext
- type LocalTypeArg
- type Namespace
- type ResolvedArgument
- type TypeRW
- type TypeRWBool
- func (trw *TypeRWBool) BeforeCodeGenerationStep1()
- func (trw *TypeRWBool) BeforeCodeGenerationStep2()
- func (trw *TypeRWBool) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (trw *TypeRWBool) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...)
- func (trw *TypeRWBool) CPPHasBytesVersion() bool
- func (trw *TypeRWBool) CPPTypeReadingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWBool) CPPTypeResettingCode(bytesVersion bool, val string) string
- func (trw *TypeRWBool) CPPTypeWritingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWBool) GenerateCode(bytesVersion bool, directImports *DirectImports) string
- func (trw *TypeRWBool) IsDictKeySafe() (isSafe bool, isString bool)
- func (trw *TypeRWBool) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
- func (trw *TypeRWBool) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
- type TypeRWBrackets
- func (trw *TypeRWBrackets) BeforeCodeGenerationStep1()
- func (trw *TypeRWBrackets) BeforeCodeGenerationStep2()
- func (trw *TypeRWBrackets) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (trw *TypeRWBrackets) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...)
- func (trw *TypeRWBrackets) CPPHasBytesVersion() bool
- func (trw *TypeRWBrackets) CPPTypeReadingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWBrackets) CPPTypeResettingCode(bytesVersion bool, val string) string
- func (trw *TypeRWBrackets) CPPTypeWritingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (tuple *TypeRWBrackets) GenerateCode(bytesVersion bool, directImports *DirectImports) string
- func (trw *TypeRWBrackets) IsDictKeySafe() (isSafe bool, isString bool)
- func (tuple *TypeRWBrackets) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
- func (tuple *TypeRWBrackets) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
- type TypeRWMaybe
- func (trw *TypeRWMaybe) BeforeCodeGenerationStep1()
- func (trw *TypeRWMaybe) BeforeCodeGenerationStep2()
- func (trw *TypeRWMaybe) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (trw *TypeRWMaybe) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...)
- func (trw *TypeRWMaybe) CPPHasBytesVersion() bool
- func (trw *TypeRWMaybe) CPPTypeReadingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWMaybe) CPPTypeResettingCode(bytesVersion bool, val string) string
- func (trw *TypeRWMaybe) CPPTypeWritingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (maybe *TypeRWMaybe) GenerateCode(bytesVersion bool, directImports *DirectImports) string
- func (trw *TypeRWMaybe) IsDictKeySafe() (isSafe bool, isString bool)
- func (maybe *TypeRWMaybe) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
- func (maybe *TypeRWMaybe) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
- type TypeRWPrimitive
- func (trw *TypeRWPrimitive) BeforeCodeGenerationStep1()
- func (trw *TypeRWPrimitive) BeforeCodeGenerationStep2()
- func (trw *TypeRWPrimitive) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (trw *TypeRWPrimitive) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...)
- func (trw *TypeRWPrimitive) CPPHasBytesVersion() bool
- func (trw *TypeRWPrimitive) CPPTypeReadingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWPrimitive) CPPTypeResettingCode(bytesVersion bool, val string) string
- func (trw *TypeRWPrimitive) CPPTypeWritingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWPrimitive) GenerateCode(byteVersion bool, directImports *DirectImports) string
- func (trw *TypeRWPrimitive) IsDictKeySafe() (isSafe bool, isString bool)
- type TypeRWStruct
- func (trw *TypeRWStruct) BeforeCodeGenerationStep1()
- func (trw *TypeRWStruct) BeforeCodeGenerationStep2()
- func (trw *TypeRWStruct) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (trw *TypeRWStruct) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...)
- func (trw *TypeRWStruct) CPPHasBytesVersion() bool
- func (trw *TypeRWStruct) CPPReadFields(bytesVersion bool, hppDetInc *DirectIncludesCPP, cppDetInc *DirectIncludesCPP) string
- func (trw *TypeRWStruct) CPPResetFields(bytesVersion bool) string
- func (trw *TypeRWStruct) CPPTypeReadingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWStruct) CPPTypeResettingCode(bytesVersion bool, val string) string
- func (trw *TypeRWStruct) CPPTypeWritingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWStruct) CPPWriteFields(bytesVersion bool) string
- func (struct_ *TypeRWStruct) GenerateCode(bytesVersion bool, directImports *DirectImports) string
- func (trw *TypeRWStruct) IsDictKeySafe() (isSafe bool, isString bool)
- func (struct_ *TypeRWStruct) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
- func (struct_ *TypeRWStruct) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
- type TypeRWUnion
- func (trw *TypeRWUnion) BeforeCodeGenerationStep1()
- func (trw *TypeRWUnion) BeforeCodeGenerationStep2()
- func (trw *TypeRWUnion) CPPAllNames(bytesVersion bool) string
- func (trw *TypeRWUnion) CPPAllTags(bytesVersion bool) string
- func (trw *TypeRWUnion) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (trw *TypeRWUnion) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...)
- func (trw *TypeRWUnion) CPPGetters(bytesVersion bool) string
- func (trw *TypeRWUnion) CPPHasBytesVersion() bool
- func (trw *TypeRWUnion) CPPReadFields(bytesVersion bool, hppInc *DirectIncludesCPP, cppDetInc *DirectIncludesCPP) string
- func (trw *TypeRWUnion) CPPSetters(bytesVersion bool) string
- func (trw *TypeRWUnion) CPPTypeReadingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWUnion) CPPTypeResettingCode(bytesVersion bool, val string) string
- func (trw *TypeRWUnion) CPPTypeWritingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string
- func (trw *TypeRWUnion) CPPWriteFields(bytesVersion bool) string
- func (union *TypeRWUnion) GenerateCode(bytesVersion bool, directImports *DirectImports) string
- func (trw *TypeRWUnion) HasShortFieldCollision(wr *TypeRWWrapper) bool
- func (trw *TypeRWUnion) IsDictKeySafe() (isSafe bool, isString bool)
- func (union *TypeRWUnion) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
- func (union *TypeRWUnion) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
- type TypeRWWrapper
- func (w *TypeRWWrapper) AnnotationsMask() uint32
- func (w *TypeRWWrapper) CPPDefaultInitializer(halfResolved HalfResolvedArgument, halfResolve bool) string
- func (w *TypeRWWrapper) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (w *TypeRWWrapper) CPPTypeStringInNamespace(bytesVersion bool, hppInc *DirectIncludesCPP) string
- func (w *TypeRWWrapper) CPPTypeStringInNamespaceHalfResolved(bytesVersion bool, hppInc *DirectIncludesCPP, ...) string
- func (w *TypeRWWrapper) CanonicalString(bare bool) string
- func (w *TypeRWWrapper) CanonicalStringTop() string
- func (w *TypeRWWrapper) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (w *TypeRWWrapper) FillRecursiveUnwrap(visitedNodes map[*TypeRWWrapper]bool)
- func (w *TypeRWWrapper) HasAnnotation(str string) bool
- func (w *TypeRWWrapper) IsTrueType() bool
- func (w *TypeRWWrapper) JSONHelpFullType(bare bool, fields []Field, natArgs []ActualNatArg) string
- func (w *TypeRWWrapper) JSONHelpNatArg(fields []Field, natArg ActualNatArg) string
- func (w *TypeRWWrapper) JSONHelpString() string
- func (w *TypeRWWrapper) MarkHasBytesVersion(visitedNodes map[*TypeRWWrapper]bool) bool
- func (w *TypeRWWrapper) MarkWantsBytesVersion(visitedNodes map[*TypeRWWrapper]bool)
- func (w *TypeRWWrapper) NatArgs(result []ActualNatArg, prefix string) []ActualNatArg
- func (w *TypeRWWrapper) ShouldWriteEnumElementAlias() bool
- func (w *TypeRWWrapper) ShouldWriteTypeAlias() bool
- func (w *TypeRWWrapper) TypeJSONEmptyCondition(bytesVersion bool, val string, ref bool) string
- func (w *TypeRWWrapper) TypeJSONReadingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, ...) string
- func (w *TypeRWWrapper) TypeJSONWritingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, ...) string
- func (w *TypeRWWrapper) TypeRandomCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, ...) string
- func (w *TypeRWWrapper) TypeReadingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, ...) string
- func (w *TypeRWWrapper) TypeResettingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, ...) string
- func (w *TypeRWWrapper) TypeString2(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, ...) string
- func (w *TypeRWWrapper) TypeWritingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, ...) string
Constants ¶
View Source
const BasicTLCPPNamespaceName = "basictl" // does not contain tl prefix
View Source
const BasicTLGoPackageName = "basictl" // does not contain tl prefix
View Source
const BuiltinTupleName = "__tuple"
View Source
const BuiltinVectorName = "__vector"
View Source
const ConstantsPackageName = "constants"
View Source
const EnableWarningsSimpleTypeName = true
View Source
const EnableWarningsUnionNameExact = true
View Source
const EnableWarningsUnionNamePrefix = true
View Source
const EnableWarningsUnionNamespace = true
View Source
const FactoryGoPackageName = "factory" // does not contain tl prefix
View Source
const HeaderComment = "// Code generated by vktl/cmd/tlgen2; DO NOT EDIT."
View Source
const MetaGoPackageName = "meta" // does not contain tl prefix
View Source
const TlJSONHTML = "tljson.html"
Variables ¶
This section is empty.
Functions ¶
func CNameToCamelName ¶
TODO - investigate if this function is good
func EnableWarningsSimpleTypeNameSkipLegacy ¶ added in v1.0.6
func EnableWarningsUnionNameExactSkipLegacy ¶ added in v1.0.6
func EnableWarningsUnionNamePrefixSkipLegacy ¶ added in v1.0.6
func EnableWarningsUnionNamespaceSkipLegacy ¶ added in v1.0.6
func GenerateUnusedNatTemplates ¶ added in v1.0.6
func IsUnionBool ¶
func IsUnionBool(tlType []*tlast.Combinator) (isBool bool, falseDesc *tlast.Combinator, trueDesc *tlast.Combinator)
func IsUnionMaybe ¶
func IsUnionMaybe(tlType []*tlast.Combinator) (isMaybe bool, emptyDesc *tlast.Combinator, okDesc *tlast.Combinator)
func ReplaceSquareBracketsElem ¶
all non-trivial contents of [] is turned into new types we make copy deep anough to not affect original constructors
func ToLowerFirst ¶ added in v1.0.6
func ToUpperFirst ¶ added in v1.0.6
func TypeRWWrapperLessGlobal ¶
func TypeRWWrapperLessGlobal(a *TypeRWWrapper, b *TypeRWWrapper) int
func TypeRWWrapperLessLocal ¶
func TypeRWWrapperLessLocal(a *TypeRWWrapper, b *TypeRWWrapper) int
Types ¶
type ActualNatArg ¶
type ActualNatArg struct { Arith tlast.Arithmetic FieldIndex int // contains filtered or unexported fields }
type Deconflicter ¶
type Deconflicter struct {
// contains filtered or unexported fields
}
type DirectImports ¶
type DirectImports struct {
// contains filtered or unexported fields
}
for golang cycle detection
type DirectIncludesCPP ¶
type DirectIncludesCPP struct {
// contains filtered or unexported fields
}
for C++ includes
type Field ¶
type Field struct { BitNumber uint32 // only used when fieldMask != nil // contains filtered or unexported fields }
type Gen2 ¶
type Gen2 struct { // artifacts RootPackageName string // golang specific BasicPackageNameFull string // basic types are in separate namespace to minimize conflicts GlobalPackageName string // we generate all go types in this package, because we need circular dependencies FactoryPackageName string MetaPackageName string // c++ specific RootCPPNamespaceElements []string DetailsCPPNamespaceElements []string DetailsCPPNamespace string // basictl::details Namespaces map[string]*Namespace // Handlers Code is inside // result TLO []byte // schema represented in tlo format, described using tls.* combinator Code map[string]string // fileName->Content, split by file names relative to output dir // contains filtered or unexported fields }
func GenerateCode ¶
func GenerateCode(tl tlast.TL, options Gen2Options) (*Gen2, error)
func (*Gen2) GenerateVectorTuple ¶
func (gen *Gen2) GenerateVectorTuple(myWrapper *TypeRWWrapper, vectorLike bool, tlType *tlast.Combinator, lrc LocalResolveContext) error
func (*Gen2) InternalPrefix ¶
func (*Gen2) WriteToDir ¶
WriteToDir Most common action with generated code, so clients do not repeat it
type Gen2Options ¶
type Gen2Options struct { TypesWhileList string BytesVersions string TLPackageNameFull string BasicPackageNameFull string // if empty, will be created Verbose bool GenerateRPCCode bool BasicRPCPath string GenerateRandomCode bool SchemaDocumentation bool SplitInternal bool Language string RootCPPNamespace string CopyrightFilePath string WarningsAreErrors bool ErrorWriter io.Writer // all Errors and warnings should be redirected to this io.Writer, by default it is os.Stderr }
type HalfResolvedArgument ¶ added in v1.0.6
type HalfResolvedArgument struct { Name string // if empty, this is not argument position Args []HalfResolvedArgument // recursion }
type InternalNamespace ¶
type InternalNamespace struct { DebugID int // for identification in logs FloodCounter int64 // beware! Namespaces map[string]struct{} DirectImports *DirectImports Types []*TypeRWWrapper SubPath string Name string }
func (*InternalNamespace) FindRecursiveImports ¶
func (n *InternalNamespace) FindRecursiveImports(ri map[*InternalNamespace][]*InternalNamespace, replace *InternalNamespace)
func (*InternalNamespace) ImportsSingleNamedNamespace ¶
func (n *InternalNamespace) ImportsSingleNamedNamespace() (empty bool, name string)
func (*InternalNamespace) Prefix ¶
func (n *InternalNamespace) Prefix(directImports *DirectImports, in *InternalNamespace) string
func (InternalNamespace) String ¶
func (n InternalNamespace) String() string
type LocalNatArg ¶
type LocalNatArg struct { NamePR tlast.PositionRange TypePR tlast.PositionRange // contains filtered or unexported fields }
type LocalResolveContext ¶
type LocalResolveContext struct {
// contains filtered or unexported fields
}
type LocalTypeArg ¶
type LocalTypeArg struct { PR tlast.PositionRange // original template arg reference // contains filtered or unexported fields }
type ResolvedArgument ¶ added in v1.0.2
type ResolvedArgument struct { Arith tlast.Arithmetic // contains filtered or unexported fields }
type TypeRW ¶
type TypeRW interface { BeforeCodeGenerationStep1() // during first phase, some wr.trw are nil due to recursive types. So we delay some BeforeCodeGenerationStep2() // during second phase, union fields recursive bit is set IsDictKeySafe() (isSafe bool, isString bool) // natives are safe, other types TBD GenerateCode(bytesVersion bool, directImports *DirectImports) string CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool) CPPHasBytesVersion() bool CPPTypeResettingCode(bytesVersion bool, val string) string CPPTypeWritingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string CPPTypeReadingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, hppDet *strings.Builder, hppDetInc *DirectIncludesCPP, cppDet *strings.Builder, cppDetInc *DirectIncludesCPP, bytesVersion bool, forwardDeclaration bool) // contains filtered or unexported methods }
TODO remove skipAlias after we start generating go code like we do for C++
type TypeRWBool ¶
type TypeRWBool struct {
// contains filtered or unexported fields
}
func (*TypeRWBool) BeforeCodeGenerationStep1 ¶ added in v1.0.2
func (trw *TypeRWBool) BeforeCodeGenerationStep1()
func (*TypeRWBool) BeforeCodeGenerationStep2 ¶
func (trw *TypeRWBool) BeforeCodeGenerationStep2()
func (*TypeRWBool) CPPFillRecursiveChildren ¶
func (trw *TypeRWBool) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWBool) CPPGenerateCode ¶
func (trw *TypeRWBool) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, hppDet *strings.Builder, hppDetInc *DirectIncludesCPP, cppDet *strings.Builder, cppDetInc *DirectIncludesCPP, bytesVersion bool, forwardDeclaration bool)
func (*TypeRWBool) CPPHasBytesVersion ¶
func (trw *TypeRWBool) CPPHasBytesVersion() bool
func (*TypeRWBool) CPPTypeReadingCode ¶
func (*TypeRWBool) CPPTypeResettingCode ¶
func (trw *TypeRWBool) CPPTypeResettingCode(bytesVersion bool, val string) string
func (*TypeRWBool) CPPTypeWritingCode ¶
func (*TypeRWBool) GenerateCode ¶
func (trw *TypeRWBool) GenerateCode(bytesVersion bool, directImports *DirectImports) string
func (*TypeRWBool) IsDictKeySafe ¶
func (trw *TypeRWBool) IsDictKeySafe() (isSafe bool, isString bool)
func (*TypeRWBool) StreamGenerateCode ¶
func (trw *TypeRWBool) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
func (*TypeRWBool) WriteGenerateCode ¶
func (trw *TypeRWBool) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
type TypeRWBrackets ¶
type TypeRWBrackets struct {
// contains filtered or unexported fields
}
func (*TypeRWBrackets) BeforeCodeGenerationStep1 ¶ added in v1.0.2
func (trw *TypeRWBrackets) BeforeCodeGenerationStep1()
func (*TypeRWBrackets) BeforeCodeGenerationStep2 ¶
func (trw *TypeRWBrackets) BeforeCodeGenerationStep2()
func (*TypeRWBrackets) CPPFillRecursiveChildren ¶
func (trw *TypeRWBrackets) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWBrackets) CPPGenerateCode ¶
func (trw *TypeRWBrackets) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, hppDet *strings.Builder, hppDetInc *DirectIncludesCPP, cppDet *strings.Builder, cppDetInc *DirectIncludesCPP, bytesVersion bool, forwardDeclaration bool)
func (*TypeRWBrackets) CPPHasBytesVersion ¶
func (trw *TypeRWBrackets) CPPHasBytesVersion() bool
func (*TypeRWBrackets) CPPTypeReadingCode ¶
func (*TypeRWBrackets) CPPTypeResettingCode ¶
func (trw *TypeRWBrackets) CPPTypeResettingCode(bytesVersion bool, val string) string
func (*TypeRWBrackets) CPPTypeWritingCode ¶
func (*TypeRWBrackets) GenerateCode ¶
func (tuple *TypeRWBrackets) GenerateCode(bytesVersion bool, directImports *DirectImports) string
func (*TypeRWBrackets) IsDictKeySafe ¶
func (trw *TypeRWBrackets) IsDictKeySafe() (isSafe bool, isString bool)
func (*TypeRWBrackets) StreamGenerateCode ¶
func (tuple *TypeRWBrackets) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
func (*TypeRWBrackets) WriteGenerateCode ¶
func (tuple *TypeRWBrackets) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
type TypeRWMaybe ¶
type TypeRWMaybe struct {
// contains filtered or unexported fields
}
func (*TypeRWMaybe) BeforeCodeGenerationStep1 ¶ added in v1.0.2
func (trw *TypeRWMaybe) BeforeCodeGenerationStep1()
func (*TypeRWMaybe) BeforeCodeGenerationStep2 ¶
func (trw *TypeRWMaybe) BeforeCodeGenerationStep2()
func (*TypeRWMaybe) CPPFillRecursiveChildren ¶
func (trw *TypeRWMaybe) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWMaybe) CPPGenerateCode ¶
func (trw *TypeRWMaybe) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, hppDet *strings.Builder, hppDetInc *DirectIncludesCPP, cppDet *strings.Builder, cppDetInc *DirectIncludesCPP, bytesVersion bool, forwardDeclaration bool)
func (*TypeRWMaybe) CPPHasBytesVersion ¶
func (trw *TypeRWMaybe) CPPHasBytesVersion() bool
func (*TypeRWMaybe) CPPTypeReadingCode ¶
func (*TypeRWMaybe) CPPTypeResettingCode ¶
func (trw *TypeRWMaybe) CPPTypeResettingCode(bytesVersion bool, val string) string
func (*TypeRWMaybe) CPPTypeWritingCode ¶
func (*TypeRWMaybe) GenerateCode ¶
func (maybe *TypeRWMaybe) GenerateCode(bytesVersion bool, directImports *DirectImports) string
func (*TypeRWMaybe) IsDictKeySafe ¶
func (trw *TypeRWMaybe) IsDictKeySafe() (isSafe bool, isString bool)
func (*TypeRWMaybe) StreamGenerateCode ¶
func (maybe *TypeRWMaybe) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
func (*TypeRWMaybe) WriteGenerateCode ¶
func (maybe *TypeRWMaybe) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
type TypeRWPrimitive ¶
type TypeRWPrimitive struct {
// contains filtered or unexported fields
}
func (*TypeRWPrimitive) BeforeCodeGenerationStep1 ¶ added in v1.0.2
func (trw *TypeRWPrimitive) BeforeCodeGenerationStep1()
func (*TypeRWPrimitive) BeforeCodeGenerationStep2 ¶
func (trw *TypeRWPrimitive) BeforeCodeGenerationStep2()
func (*TypeRWPrimitive) CPPFillRecursiveChildren ¶
func (trw *TypeRWPrimitive) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWPrimitive) CPPGenerateCode ¶
func (trw *TypeRWPrimitive) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, hppDet *strings.Builder, hppDetInc *DirectIncludesCPP, cppDet *strings.Builder, cppDetInc *DirectIncludesCPP, bytesVersion bool, forwardDeclaration bool)
func (*TypeRWPrimitive) CPPHasBytesVersion ¶
func (trw *TypeRWPrimitive) CPPHasBytesVersion() bool
func (*TypeRWPrimitive) CPPTypeReadingCode ¶
func (*TypeRWPrimitive) CPPTypeResettingCode ¶
func (trw *TypeRWPrimitive) CPPTypeResettingCode(bytesVersion bool, val string) string
func (*TypeRWPrimitive) CPPTypeWritingCode ¶
func (*TypeRWPrimitive) GenerateCode ¶
func (trw *TypeRWPrimitive) GenerateCode(byteVersion bool, directImports *DirectImports) string
func (*TypeRWPrimitive) IsDictKeySafe ¶
func (trw *TypeRWPrimitive) IsDictKeySafe() (isSafe bool, isString bool)
type TypeRWStruct ¶
type TypeRWStruct struct { Fields []Field ResultType *TypeRWWrapper ResultNatArgs []ActualNatArg ResultHalfResolved HalfResolvedArgument // contains filtered or unexported fields }
func (*TypeRWStruct) BeforeCodeGenerationStep1 ¶ added in v1.0.2
func (trw *TypeRWStruct) BeforeCodeGenerationStep1()
func (*TypeRWStruct) BeforeCodeGenerationStep2 ¶
func (trw *TypeRWStruct) BeforeCodeGenerationStep2()
func (*TypeRWStruct) CPPFillRecursiveChildren ¶
func (trw *TypeRWStruct) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWStruct) CPPGenerateCode ¶
func (trw *TypeRWStruct) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, hppDet *strings.Builder, hppDetInc *DirectIncludesCPP, cppDet *strings.Builder, cppDetInc *DirectIncludesCPP, bytesVersion bool, forwardDeclaration bool)
func (*TypeRWStruct) CPPHasBytesVersion ¶
func (trw *TypeRWStruct) CPPHasBytesVersion() bool
func (*TypeRWStruct) CPPReadFields ¶
func (trw *TypeRWStruct) CPPReadFields(bytesVersion bool, hppDetInc *DirectIncludesCPP, cppDetInc *DirectIncludesCPP) string
func (*TypeRWStruct) CPPResetFields ¶
func (trw *TypeRWStruct) CPPResetFields(bytesVersion bool) string
func (*TypeRWStruct) CPPTypeReadingCode ¶
func (*TypeRWStruct) CPPTypeResettingCode ¶
func (trw *TypeRWStruct) CPPTypeResettingCode(bytesVersion bool, val string) string
func (*TypeRWStruct) CPPTypeWritingCode ¶
func (*TypeRWStruct) CPPWriteFields ¶
func (trw *TypeRWStruct) CPPWriteFields(bytesVersion bool) string
func (*TypeRWStruct) GenerateCode ¶
func (struct_ *TypeRWStruct) GenerateCode(bytesVersion bool, directImports *DirectImports) string
func (*TypeRWStruct) IsDictKeySafe ¶
func (trw *TypeRWStruct) IsDictKeySafe() (isSafe bool, isString bool)
func (*TypeRWStruct) StreamGenerateCode ¶
func (struct_ *TypeRWStruct) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
func (*TypeRWStruct) WriteGenerateCode ¶
func (struct_ *TypeRWStruct) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
type TypeRWUnion ¶
func (*TypeRWUnion) BeforeCodeGenerationStep1 ¶ added in v1.0.2
func (trw *TypeRWUnion) BeforeCodeGenerationStep1()
func (*TypeRWUnion) BeforeCodeGenerationStep2 ¶
func (trw *TypeRWUnion) BeforeCodeGenerationStep2()
func (*TypeRWUnion) CPPAllNames ¶
func (trw *TypeRWUnion) CPPAllNames(bytesVersion bool) string
func (*TypeRWUnion) CPPAllTags ¶
func (trw *TypeRWUnion) CPPAllTags(bytesVersion bool) string
func (*TypeRWUnion) CPPFillRecursiveChildren ¶
func (trw *TypeRWUnion) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWUnion) CPPGenerateCode ¶
func (trw *TypeRWUnion) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, hppDet *strings.Builder, hppDetInc *DirectIncludesCPP, cppDet *strings.Builder, cppDetInc *DirectIncludesCPP, bytesVersion bool, forwardDeclaration bool)
func (*TypeRWUnion) CPPGetters ¶
func (trw *TypeRWUnion) CPPGetters(bytesVersion bool) string
func (*TypeRWUnion) CPPHasBytesVersion ¶
func (trw *TypeRWUnion) CPPHasBytesVersion() bool
func (*TypeRWUnion) CPPReadFields ¶
func (trw *TypeRWUnion) CPPReadFields(bytesVersion bool, hppInc *DirectIncludesCPP, cppDetInc *DirectIncludesCPP) string
func (*TypeRWUnion) CPPSetters ¶
func (trw *TypeRWUnion) CPPSetters(bytesVersion bool) string
func (*TypeRWUnion) CPPTypeReadingCode ¶
func (*TypeRWUnion) CPPTypeResettingCode ¶
func (trw *TypeRWUnion) CPPTypeResettingCode(bytesVersion bool, val string) string
func (*TypeRWUnion) CPPTypeWritingCode ¶
func (*TypeRWUnion) CPPWriteFields ¶
func (trw *TypeRWUnion) CPPWriteFields(bytesVersion bool) string
func (*TypeRWUnion) GenerateCode ¶
func (union *TypeRWUnion) GenerateCode(bytesVersion bool, directImports *DirectImports) string
func (*TypeRWUnion) HasShortFieldCollision ¶ added in v1.0.2
func (trw *TypeRWUnion) HasShortFieldCollision(wr *TypeRWWrapper) bool
func (*TypeRWUnion) IsDictKeySafe ¶
func (trw *TypeRWUnion) IsDictKeySafe() (isSafe bool, isString bool)
func (*TypeRWUnion) StreamGenerateCode ¶
func (union *TypeRWUnion) StreamGenerateCode(qw422016 *qt422016.Writer, bytesVersion bool, directImports *DirectImports)
func (*TypeRWUnion) WriteGenerateCode ¶
func (union *TypeRWUnion) WriteGenerateCode(qq422016 qtio422016.Writer, bytesVersion bool, directImports *DirectImports)
type TypeRWWrapper ¶
type TypeRWWrapper struct { NatParams []string // external params of type Read/Write method, with nat_ prefix WrLong *TypeRWWrapper // long transitioning code WrWithoutLong *TypeRWWrapper // long transitioning code // contains filtered or unexported fields }
func (*TypeRWWrapper) AnnotationsMask ¶ added in v1.0.6
func (w *TypeRWWrapper) AnnotationsMask() uint32
func (*TypeRWWrapper) CPPDefaultInitializer ¶
func (w *TypeRWWrapper) CPPDefaultInitializer(halfResolved HalfResolvedArgument, halfResolve bool) string
func (*TypeRWWrapper) CPPFillRecursiveChildren ¶
func (w *TypeRWWrapper) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWWrapper) CPPTypeStringInNamespace ¶
func (w *TypeRWWrapper) CPPTypeStringInNamespace(bytesVersion bool, hppInc *DirectIncludesCPP) string
func (*TypeRWWrapper) CPPTypeStringInNamespaceHalfResolved ¶ added in v1.0.6
func (w *TypeRWWrapper) CPPTypeStringInNamespaceHalfResolved(bytesVersion bool, hppInc *DirectIncludesCPP, halfResolved HalfResolvedArgument) string
func (*TypeRWWrapper) CanonicalString ¶ added in v1.0.2
func (w *TypeRWWrapper) CanonicalString(bare bool) string
func (*TypeRWWrapper) CanonicalStringTop ¶ added in v1.0.2
func (w *TypeRWWrapper) CanonicalStringTop() string
func (*TypeRWWrapper) FillRecursiveChildren ¶
func (w *TypeRWWrapper) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWWrapper) FillRecursiveUnwrap ¶
func (w *TypeRWWrapper) FillRecursiveUnwrap(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWWrapper) HasAnnotation ¶ added in v1.0.6
func (w *TypeRWWrapper) HasAnnotation(str string) bool
func (*TypeRWWrapper) IsTrueType ¶
func (w *TypeRWWrapper) IsTrueType() bool
func (*TypeRWWrapper) JSONHelpFullType ¶ added in v1.0.2
func (w *TypeRWWrapper) JSONHelpFullType(bare bool, fields []Field, natArgs []ActualNatArg) string
func (*TypeRWWrapper) JSONHelpNatArg ¶ added in v1.0.2
func (w *TypeRWWrapper) JSONHelpNatArg(fields []Field, natArg ActualNatArg) string
func (*TypeRWWrapper) JSONHelpString ¶
func (w *TypeRWWrapper) JSONHelpString() string
func (*TypeRWWrapper) MarkHasBytesVersion ¶
func (w *TypeRWWrapper) MarkHasBytesVersion(visitedNodes map[*TypeRWWrapper]bool) bool
func (*TypeRWWrapper) MarkWantsBytesVersion ¶
func (w *TypeRWWrapper) MarkWantsBytesVersion(visitedNodes map[*TypeRWWrapper]bool)
func (*TypeRWWrapper) NatArgs ¶ added in v1.0.2
func (w *TypeRWWrapper) NatArgs(result []ActualNatArg, prefix string) []ActualNatArg
Assign structural names to external arguments
func (*TypeRWWrapper) ShouldWriteEnumElementAlias ¶
func (w *TypeRWWrapper) ShouldWriteEnumElementAlias() bool
func (*TypeRWWrapper) ShouldWriteTypeAlias ¶
func (w *TypeRWWrapper) ShouldWriteTypeAlias() bool
func (*TypeRWWrapper) TypeJSONEmptyCondition ¶
func (w *TypeRWWrapper) TypeJSONEmptyCondition(bytesVersion bool, val string, ref bool) string
func (*TypeRWWrapper) TypeJSONReadingCode ¶
func (w *TypeRWWrapper) TypeJSONReadingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, jvalue string, val string, natArgs []string, ref bool) string
func (*TypeRWWrapper) TypeJSONWritingCode ¶
func (w *TypeRWWrapper) TypeJSONWritingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, val string, natArgs []string, ref bool) string
func (*TypeRWWrapper) TypeRandomCode ¶
func (w *TypeRWWrapper) TypeRandomCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, val string, natArgs []string, ref bool) string
func (*TypeRWWrapper) TypeReadingCode ¶
func (w *TypeRWWrapper) TypeReadingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, val string, bare bool, natArgs []string, ref bool, last bool) string
func (*TypeRWWrapper) TypeResettingCode ¶
func (w *TypeRWWrapper) TypeResettingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, val string, ref bool) string
func (*TypeRWWrapper) TypeString2 ¶
func (w *TypeRWWrapper) TypeString2(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, isLocal bool, skipAlias bool) string
func (*TypeRWWrapper) TypeWritingCode ¶
func (w *TypeRWWrapper) TypeWritingCode(bytesVersion bool, directImports *DirectImports, ins *InternalNamespace, val string, bare bool, natArgs []string, ref bool, last bool) string
Source Files
¶
- builtin.go
- combined_tl_legacy.go
- helpers.go
- helpers_cpp.go
- qt_bool.qtpl.go
- qt_brackets.qtpl.go
- qt_factory.qtpl.go
- qt_maybe.qtpl.go
- qt_meta.qtpl.go
- qt_namespace.qtpl.go
- qt_struct.qtpl.go
- qt_tljson_html.qtpl.go
- qt_union.qtpl.go
- tlgen.go
- tlgen_cpp.go
- tlgen_go.go
- tlgen_kernel.go
- type_rw.go
- type_rw_bool.go
- type_rw_bool_cpp.go
- type_rw_maybe.go
- type_rw_maybe_cpp.go
- type_rw_primitive.go
- type_rw_primitive_cpp.go
- type_rw_struct.go
- type_rw_struct_cpp.go
- type_rw_tuple.go
- type_rw_tuple_cpp.go
- type_rw_union.go
- type_rw_union_cpp.go
Click to show internal directories.
Click to hide internal directories.