Documentation
¶
Index ¶
- Constants
- func CNameToCamelName(s string) string
- 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 ReplaceSquareBrackets(tl *tlast.TL) error
- func ReplaceSquareBracketsElem(tl tlast.TL, forTLO bool) (tlast.TL, error)
- func TypeRWWrapperLessGlobal(a *TypeRWWrapper, b *TypeRWWrapper) bool
- func TypeRWWrapperLessLocal(a *TypeRWWrapper, b *TypeRWWrapper) bool
- type ActualNatArg
- type Deconflicter
- type DirectImports
- type DirectIncludesCPP
- type Field
- type Gen2
- type Gen2Options
- 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 ResolvedArg
- type ResolvedType
- type TypeRW
- type TypeRWBool
- func (trw *TypeRWBool) BeforeCodeGenerationStep() error
- 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) BeforeCodeGenerationStep() error
- 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) BeforeCodeGenerationStep() error
- 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) BeforeCodeGenerationStep() error
- 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) BeforeCodeGenerationStep() error
- 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) BeforeCodeGenerationStep() error
- 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) 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) CPPDefaultInitializer(resolvedType ResolvedType, halfResolve bool) string
- func (w *TypeRWWrapper) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (w *TypeRWWrapper) CPPTypeStringInNamespace(bytesVersion bool, hppInc *DirectIncludesCPP, resolvedType ResolvedType, ...) string
- func (w *TypeRWWrapper) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool)
- func (w *TypeRWWrapper) FillRecursiveUnwrap(visitedNodes map[*TypeRWWrapper]bool)
- func (w *TypeRWWrapper) IsTrueType() bool
- 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) 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) TypeString(bytesVersion bool) 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 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 OptimizeConstParameters = true // if false, they will be passed to children and ignored there
View Source
const TlJSONHTML = "tljson.html"
Variables ¶
This section is empty.
Functions ¶
func CNameToCamelName ¶
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 ReplaceSquareBrackets ¶
TODO - remove, this is legacy code, it is incorrect for many cases
func ReplaceSquareBracketsElem ¶
all non-trivial contents of [] is turned into new types we make copy deep anough to not affect original constructors
func TypeRWWrapperLessGlobal ¶
func TypeRWWrapperLessGlobal(a *TypeRWWrapper, b *TypeRWWrapper) bool
func TypeRWWrapperLessLocal ¶
func TypeRWWrapperLessLocal(a *TypeRWWrapper, b *TypeRWWrapper) bool
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, myType2 ResolvedType, goGlobalName string, 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 TLOPath string GenerateRandomCode bool SchemaDocumentation bool SplitInternal bool Language string RootCPPNamespace string CopyrightFilePath string IgnoreGeneratedCode bool // ignores generated code, tlo and documentation will be generated with related flags }
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 ResolvedArg ¶
type ResolvedArg struct { IsNat bool Arith tlast.Arithmetic T ResolvedType TRW *TypeRWWrapper TemplateArgName string // contains filtered or unexported fields }
func (ResolvedArg) DebugString ¶
func (aot ResolvedArg) DebugString() string
func (ResolvedArg) String ¶
func (aot ResolvedArg) String() string
type ResolvedType ¶
type ResolvedType struct { OriginalName string // if not empty, contains original template argument name PR tlast.PositionRange Type tlast.Name Args []ResolvedArg Bare bool }
func (ResolvedType) DebugString ¶
func (t ResolvedType) DebugString() string
func (ResolvedType) String ¶
func (t ResolvedType) String() string
type TypeRW ¶
type TypeRW interface { BeforeCodeGenerationStep() error // 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) BeforeCodeGenerationStep ¶
func (trw *TypeRWBool) BeforeCodeGenerationStep() error
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) BeforeCodeGenerationStep ¶
func (trw *TypeRWBrackets) BeforeCodeGenerationStep() error
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) BeforeCodeGenerationStep ¶
func (trw *TypeRWMaybe) BeforeCodeGenerationStep() error
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) BeforeCodeGenerationStep ¶
func (trw *TypeRWPrimitive) BeforeCodeGenerationStep() error
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 ResultResolvedType ResolvedType // contains filtered or unexported fields }
func (*TypeRWStruct) BeforeCodeGenerationStep ¶
func (trw *TypeRWStruct) BeforeCodeGenerationStep() error
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) BeforeCodeGenerationStep ¶
func (trw *TypeRWUnion) BeforeCodeGenerationStep() error
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) 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 // contains filtered or unexported fields }
func (*TypeRWWrapper) CPPDefaultInitializer ¶
func (w *TypeRWWrapper) CPPDefaultInitializer(resolvedType ResolvedType, 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, resolvedType ResolvedType, halfResolve bool) 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) IsTrueType ¶
func (w *TypeRWWrapper) IsTrueType() bool
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) 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) TypeString ¶
func (w *TypeRWWrapper) TypeString(bytesVersion 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
- 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_tlo.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.