Versions in this module Expand all Collapse all v1 v1.4.2 Mar 20, 2026 v1.4.1 Mar 20, 2026 v1.4.0 Mar 19, 2026 Changes in this version + const BasicTLCPPNamespaceName + const BasicTLCodePHP + const BasicTlPathPHP + const BuiltinTupleName + const BuiltinVectorName + const CommonGroup + const CppPrintGraphvizRepresentation + const CppPrintNamespaceDependencies + const EnableWarningsSimpleTypeName + const EnableWarningsUnionNameExact + const EnableWarningsUnionNamePrefix + const EnableWarningsUnionNamespace + const GhostTypes + const HeaderComment + const IndependentTypes + const NoNamespaceGroup + const PHPFileStart + const PHPRPCFunctionMock + const PHPRPCFunctionResultMock + const PHPRPCResponseMock + const RpcFunctionFetchersPHP + const RpcFunctionPHP + const RpcFunctionWithFetchersPHP + const RpcResponsePHP + const SpecialGroupPrefix + const TL2ContextPHP + const TL2SupportPHP + const TLInterfacesCodePHP + const TLInterfacesPathPHP + const TLSwitcherPHP + var DEBUG = false + var PHPNamesToIgnoreForLinterCheck = []string + var TypeComparator = func(a, b *TypeRWWrapper) int + func CheckBackwardCompatibility(newTL, oldTL *tlast.TL) *tlast.ParseError + func CppBasicTLIOStreamsPath(gen2 *Gen2) string + func CppBasicTLIOThrowableStreamsPath(gen2 *Gen2) string + func CppBasictlPackage(gen2 *Gen2) string + func CppCopingStreamFiles() []string + func CppCopingStreamFilesText() map[string]string + func Debugf(format string, args ...interface{}) + 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 PHPGetAllReachableTypes(startTypes []*TypeRWWrapper) map[*TypeRWWrapper]bool + func PHPMockTypesToIgnore() map[string]bool + func PHPSpecialMembersTypes(wrapper *TypeRWWrapper) string + func PhpGenerateInterfaceCode(code *strings.Builder, bytes bool, targetType *TypeRWWrapper, ...) error + func ToLowerFirst(str string) string + func ToUpperFirst(str string) string + func TypeRWWrapperLessGlobal(a *TypeRWWrapper, b *TypeRWWrapper) int + type ActualNatArg struct + Arith tlast.Arithmetic + FieldIndex int + func (arg *ActualNatArg) IsField() bool + func (arg *ActualNatArg) IsNumber() bool + func (arg *ActualNatArg) IsTL2() bool + func (arg *ActualNatArg) Number() uint32 + type BitUsageInfo struct + AffectedFields map[*TypeRWStruct][]int + type Constructor struct + Fields []tlast.Field + Id uint + Name ConstructorName + Result *tlast.TypeRef + Type *TypeDefinition + type ConstructorName = tlast.Name + type CppIncludeInfo struct + type Deconflicter struct + type DirectIncludesCPP struct + type EvaluatedType struct + Constant uint32 + Index EvaluatedTypeVariant + Type *TypeReduction + TypeVariable string + Variable string + VariableActsAsConstant bool + type EvaluatedTypeVariant = int + const NumberConstant + const NumberVariable + const TypeConstant + const TypeVariable + type Field struct + BitNumber uint32 + MaskTL2Bit *int + func (f *Field) Bare() bool + func (f *Field) HasNatArguments() bool + func (f *Field) IsAffectedByExternalFieldMask() bool + func (f *Field) IsAffectingLocalFieldMasks() bool + func (f *Field) IsBit() bool + func (f *Field) IsTL2Omitted() bool + func (f *Field) TL2MaskForOP(op string) string + type FieldNatProperties = int + const FieldIsNat + const FieldIsNotNat + const FieldUsedAsFieldMask + const FieldUsedAsSize + type FileToWrite struct + Ast tlast.TL2File + Path string + type Gen2 struct + Code map[string]string + DetailsCPPNamespace string + DetailsCPPNamespaceElements []string + Namespaces map[string]*Namespace + RootCPPNamespaceElements []string + TLO []byte + func GenerateCode(tl tlast.TL, tl2 tlast.TL2File, options Gen2Options) (*Gen2, error) + func (gen *Gen2) GenerateTuple(myWrapper *TypeRWWrapper, tlType *tlast.Combinator, lrc LocalResolveContext) error + func (gen *Gen2) GenerateVector(myWrapper *TypeRWWrapper, tlType *tlast.Combinator, lrc LocalResolveContext, ...) error + func (gen *Gen2) InternalPrefix() string + func (gen *Gen2) MigrateToTL2(prevState []FileToWrite) (newState []FileToWrite, _ error) + func (gen *Gen2) PHPSplitTLByNamespaces(originalTL tlast.TL) map[string]tlast.TL + func (gen *Gen2) PhpAdditionalFiles() error + func (gen *Gen2) PhpChoosePaths() + func (gen *Gen2) PhpMarkAllInternalTypes() + func (gen *Gen2) PhpSelectTypesForGeneration() []*TypeRWWrapper + func (gen *Gen2) ReplaceSquareBracketsElem(tl tlast.TL) (tlast.TL, error) + func (gen *Gen2) WriteToDir(outdir string) error + type Gen2Options struct + AddFactoryData bool + AddFetchers bool + AddFetchersEchoComments bool + AddFunctionBodies bool + AddMetaData bool + AddRPCTypes bool + AddSwitcher bool + AddTypeComments bool + BasicTLNamespace string + BytesWhiteList string + CanonicalFormPath string + CopyrightFilePath string + CreateTLFilesWithAllTypesInReturn bool + CreateTLSplitedFilesForEachNamespace bool + CreateTLSplitedFilesForEachNamespaceFolder string + DeleteUnrelatedFiles bool + ErrorWriter io.Writer + FunctionsBodiesWhiteList string + GenerateCommonMakefile bool + GenerateFieldMasks bool + GenerateLegacyJsonRead bool + GenerateRPCCode bool + GenerateRandomCode bool + IgnoreUnusedInFunctionsTypes bool + InplaceSimpleStructs bool + Language string + LinterPHPCheck bool + LinterPHPNonPolymorphicBoxedRef bool + Outdir string + PrintDiff bool + PrintVersion bool + RootCPP string + RootCPPNamespace string + Schema2Compare string + SchemaCommit string + SchemaDocumentation bool + SchemaTimestamp uint + SchemaURL string + SeparateFiles bool + SplitInternal bool + TL2WhiteList string + TLOPath string + TypesWhiteList string + UseBuiltinDataProviders bool + UseCheckLengthSanity bool + Verbose bool + WarningsAreErrors bool + func (opt *Gen2Options) GenerateTL2() bool + type HalfResolvedArgument struct + Args []HalfResolvedArgument + Name string + type LanguageTypeSystemInfo struct + AllowedCompileTimeConstantGenerics bool + AllowedTypeGenerics bool + func (lti LanguageTypeSystemInfo) OnlyFullyResolvedTypes() bool + type LocalNatArg struct + NamePR tlast.PositionRange + TypePR tlast.PositionRange + type LocalResolveContext struct + type LocalTypeArg struct + PR tlast.PositionRange + type Namespace struct + type NamespaceFiles struct + Includes DirectIncludesCPP + Namespace string + type NatUsagesInfo struct + CombinatorsNatFieldIndexToBitsUsed map[tlast.Name]map[int]map[int]bool + CombinatorsNatFieldsToArraySizeReference map[tlast.Name]map[int]map[tlast.Name]map[int][]RefEdge + TypeArgumentToArraySizeReference map[tlast.Name]map[int]map[tlast.Name]map[int][]RefEdge + TypeNameAndArgIndexToBitsUsedByNat map[tlast.Name]map[int]map[int]bool + TypeNameAndArgIndexToBitsUsedInLayout map[tlast.Name]map[int]map[int]bool + TypeNameAndArgToAffectingCombinatorsNatFields map[tlast.Name]map[int]map[tlast.Name]map[int]bool + TypeNameAndArgToAffectingConstants map[tlast.Name]map[int]map[uint32]bool + func (info *NatUsagesInfo) GetAffectedBitsNatField(combinator tlast.Name, fieldId int) map[int]bool + func (info *NatUsagesInfo) GetArgumentUsagesAsSize(typeName tlast.Name, templateId int) map[tlast.Name]map[int][]RefEdge + func (info *NatUsagesInfo) GetArraySizeReferenceForField(combinator tlast.Name, fieldId int) map[tlast.Name]map[int][]RefEdge + func (info *NatUsagesInfo) GetConstantsPassingThroughArgument(typeName tlast.Name, templateId int) map[uint32]bool + func (info *NatUsagesInfo) GetInfluencedNatFieldsToTemplate(typeName tlast.Name, templateId int) map[tlast.Name]map[int]bool + type Pair struct + type PhpClassMeta struct + IsDuplicate bool + MappingOrigin *TypeRWWrapper + RequireFunctionBodies bool + UsedInFunctions bool + UsedOnlyInInternal bool + type RefEdge struct + ArgIndex int + FieldIndex int + IsArgField bool + Type tlast.Name + type ResolvedArgument struct + Arith tlast.Arithmetic + type ResolvedTL2References struct + ResolvedNats map[string]uint32 + ResolvedTypes map[string]tlast.TL2TypeRef + type TypeArgumentsTree struct + func (t *TypeArgumentsTree) CloneValuesFrom(src *TypeArgumentsTree) + func (t *TypeArgumentsTree) EnumerateSubTreeWithPrefixes(childIndex int) []string + func (t *TypeArgumentsTree) EnumerateWithPrefixes() []string + func (t *TypeArgumentsTree) FillAllLeafs() + func (t *TypeArgumentsTree) FillAllLeafsWithValues(values []string) + func (t *TypeArgumentsTree) IsEmpty() bool + func (t *TypeArgumentsTree) ListAllValues() []string + type TypeDefinition struct + Constructors []*Constructor + IsBasic bool + Name TypeName + TypeArguments []tlast.TemplateArgument + type TypeDefinitionVariation struct + NeedBytesVersion bool + type TypeName = tlast.Name + type TypeRW interface + AllPossibleRecursionProducers func() []*TypeRWWrapper + AllTypeDependencies func(generic, countFunctions bool) []*TypeRWWrapper + BeforeCodeGenerationStep1 func() + BeforeCodeGenerationStep2 func() + CanBeBareBoxed func() (canBare bool, canBoxed bool) + ContainsUnion func(visitedNodes map[*TypeRWWrapper]bool) bool + FillRecursiveChildren func(visitedNodes map[*TypeRWWrapper]int, generic bool) + IsDictKeySafe func() (isSafe bool, isString bool) + IsWrappingType func() bool + type TypeRWBool struct + func (trw *TypeRWBool) AllPossibleRecursionProducers() []*TypeRWWrapper + func (trw *TypeRWBool) AllTypeDependencies(generic, countFunctions bool) []*TypeRWWrapper + func (trw *TypeRWBool) BeforeCodeGenerationStep1() + func (trw *TypeRWBool) BeforeCodeGenerationStep2() + func (trw *TypeRWBool) CPPAllowCurrentDefinition() bool + 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) CPPTypeJSONEmptyCondition(bytesVersion bool, val string, ref bool, deps []string) string + 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) CPPTypeWritingJsonCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + func (trw *TypeRWBool) CanBeBareBoxed() (canBare bool, canBoxed bool) + func (trw *TypeRWBool) ContainsUnion(visitedNodes map[*TypeRWWrapper]bool) bool + func (trw *TypeRWBool) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]int, generic bool) + func (trw *TypeRWBool) IsDictKeySafe() (isSafe bool, isString bool) + func (trw *TypeRWBool) IsWrappingType() bool + func (trw *TypeRWBool) PhpCalculateSizesTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + func (trw *TypeRWBool) PhpClassName(withPath bool, bare bool) string + func (trw *TypeRWBool) PhpClassNameReplaced() bool + func (trw *TypeRWBool) PhpDefaultInit() string + func (trw *TypeRWBool) PhpDefaultValue() string + func (trw *TypeRWBool) PhpGenerateCode(code *strings.Builder, bytes bool) error + func (trw *TypeRWBool) PhpIterateReachableTypes(reachableTypes *map[*TypeRWWrapper]bool) + func (trw *TypeRWBool) PhpReadMethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWBool) PhpReadTL2MethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWBool) PhpTypeName(withPath bool, bare bool) string + func (trw *TypeRWBool) PhpWriteMethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string) []string + func (trw *TypeRWBool) PhpWriteTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + type TypeRWBrackets struct + func (trw *TypeRWBrackets) AllPossibleRecursionProducers() []*TypeRWWrapper + func (trw *TypeRWBrackets) AllTypeDependencies(generic, countFunctions bool) (res []*TypeRWWrapper) + func (trw *TypeRWBrackets) BeforeCodeGenerationStep1() + func (trw *TypeRWBrackets) BeforeCodeGenerationStep2() + func (trw *TypeRWBrackets) CPPAllowCurrentDefinition() bool + func (trw *TypeRWBrackets) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool) + func (trw *TypeRWBrackets) CPPGenerateCode(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...) + func (trw *TypeRWBrackets) CPPGenerateCodeMap(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...) + func (trw *TypeRWBrackets) CPPHasBytesVersion() bool + func (trw *TypeRWBrackets) CPPTypeJSONEmptyCondition(bytesVersion bool, val string, ref bool, deps []string) string + 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 (trw *TypeRWBrackets) CPPTypeWritingJsonCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + func (trw *TypeRWBrackets) CanBeBareBoxed() (canBare bool, canBoxed bool) + func (trw *TypeRWBrackets) ContainsUnion(visitedNodes map[*TypeRWWrapper]bool) bool + func (trw *TypeRWBrackets) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]int, generic bool) + func (trw *TypeRWBrackets) IsBuiltinVector() bool + func (trw *TypeRWBrackets) IsDictKeySafe() (isSafe bool, isString bool) + func (trw *TypeRWBrackets) IsWrappingType() bool + func (trw *TypeRWBrackets) PhpCalculateSizesTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + func (trw *TypeRWBrackets) PhpClassName(withPath bool, bare bool) string + func (trw *TypeRWBrackets) PhpClassNameReplaced() bool + func (trw *TypeRWBrackets) PhpDefaultInit() string + func (trw *TypeRWBrackets) PhpDefaultValue() string + func (trw *TypeRWBrackets) PhpGenerateCode(code *strings.Builder, bytes bool) error + func (trw *TypeRWBrackets) PhpHasPrimitiveInnerElement() bool + func (trw *TypeRWBrackets) PhpIterateReachableTypes(reachableTypes *map[*TypeRWWrapper]bool) + func (trw *TypeRWBrackets) PhpReadMethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWBrackets) PhpReadTL2MethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWBrackets) PhpTypeName(withPath bool, bare bool) string + func (trw *TypeRWBrackets) PhpWriteMethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string) []string + func (trw *TypeRWBrackets) PhpWriteTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + type TypeRWCPPData interface + CPPAllowCurrentDefinition func() bool + CPPFillRecursiveChildren func(visitedNodes map[*TypeRWWrapper]bool) + CPPGenerateCode func(hpp *strings.Builder, hppInc *DirectIncludesCPP, hppIncFwd *DirectIncludesCPP, ...) + CPPHasBytesVersion func() bool + CPPTypeJSONEmptyCondition func(bytesVersion bool, val string, ref bool, deps []string) string + CPPTypeReadingCode func(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + CPPTypeResettingCode func(bytesVersion bool, val string) string + CPPTypeWritingCode func(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + CPPTypeWritingJsonCode func(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + type TypeRWMaybe struct + func (trw *TypeRWMaybe) AllPossibleRecursionProducers() []*TypeRWWrapper + func (trw *TypeRWMaybe) AllTypeDependencies(generic, countFunctions bool) (res []*TypeRWWrapper) + func (trw *TypeRWMaybe) BeforeCodeGenerationStep1() + func (trw *TypeRWMaybe) BeforeCodeGenerationStep2() + func (trw *TypeRWMaybe) CPPAllowCurrentDefinition() bool + 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) CPPTypeJSONEmptyCondition(bytesVersion bool, val string, ref bool, deps []string) string + 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 (trw *TypeRWMaybe) CPPTypeWritingJsonCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + func (trw *TypeRWMaybe) CanBeBareBoxed() (canBare bool, canBoxed bool) + func (trw *TypeRWMaybe) ContainsUnion(visitedNodes map[*TypeRWWrapper]bool) bool + func (trw *TypeRWMaybe) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]int, generic bool) + func (trw *TypeRWMaybe) IsDictKeySafe() (isSafe bool, isString bool) + func (trw *TypeRWMaybe) IsWrappingType() bool + func (trw *TypeRWMaybe) PhpCalculateSizesTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + func (trw *TypeRWMaybe) PhpClassName(withPath bool, bare bool) string + func (trw *TypeRWMaybe) PhpClassNameReplaced() bool + func (trw *TypeRWMaybe) PhpDefaultInit() string + func (trw *TypeRWMaybe) PhpDefaultValue() string + func (trw *TypeRWMaybe) PhpGenerateCode(code *strings.Builder, bytes bool) error + func (trw *TypeRWMaybe) PhpIterateReachableTypes(reachableTypes *map[*TypeRWWrapper]bool) + func (trw *TypeRWMaybe) PhpReadMethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWMaybe) PhpReadTL2MethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWMaybe) PhpTypeName(withPath bool, bare bool) string + func (trw *TypeRWMaybe) PhpWriteMethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string) []string + func (trw *TypeRWMaybe) PhpWriteTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + type TypeRWPHPData interface + PhpCalculateSizesTL2MethodCall func(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + PhpClassName func(withPath bool, bare bool) string + PhpClassNameReplaced func() bool + PhpDefaultInit func() string + PhpDefaultValue func() string + PhpGenerateCode func(code *strings.Builder, bytes bool) error + PhpIterateReachableTypes func(reachableTypes *map[*TypeRWWrapper]bool) + PhpReadMethodCall func(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + PhpReadTL2MethodCall func(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + PhpTypeName func(withPath bool, bare bool) string + PhpWriteMethodCall func(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string) []string + PhpWriteTL2MethodCall func(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + type TypeRWPrimitive struct + func (trw *TypeRWPrimitive) AllPossibleRecursionProducers() []*TypeRWWrapper + func (trw *TypeRWPrimitive) AllTypeDependencies(generic, countFunctions bool) []*TypeRWWrapper + func (trw *TypeRWPrimitive) BeforeCodeGenerationStep1() + func (trw *TypeRWPrimitive) BeforeCodeGenerationStep2() + func (trw *TypeRWPrimitive) CPPAllowCurrentDefinition() bool + 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) CPPTypeJSONEmptyCondition(bytesVersion bool, val string, ref bool, deps []string) string + 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) CPPTypeWritingJsonCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + func (trw *TypeRWPrimitive) CanBeBareBoxed() (canBare bool, canBoxed bool) + func (trw *TypeRWPrimitive) ContainsUnion(visitedNodes map[*TypeRWWrapper]bool) bool + func (trw *TypeRWPrimitive) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]int, generic bool) + func (trw *TypeRWPrimitive) IsDictKeySafe() (isSafe bool, isString bool) + func (trw *TypeRWPrimitive) IsWrappingType() bool + func (trw *TypeRWPrimitive) PhpCalculateSizesTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + func (trw *TypeRWPrimitive) PhpClassName(withPath bool, bare bool) string + func (trw *TypeRWPrimitive) PhpClassNameReplaced() bool + func (trw *TypeRWPrimitive) PhpDefaultInit() string + func (trw *TypeRWPrimitive) PhpDefaultValue() string + func (trw *TypeRWPrimitive) PhpGenerateCode(code *strings.Builder, bytes bool) error + func (trw *TypeRWPrimitive) PhpIterateReachableTypes(reachableTypes *map[*TypeRWWrapper]bool) + func (trw *TypeRWPrimitive) PhpReadMethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWPrimitive) PhpReadTL2MethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWPrimitive) PhpTypeName(withPath bool, bare bool) string + func (trw *TypeRWPrimitive) PhpWriteMethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string) []string + func (trw *TypeRWPrimitive) PhpWriteTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + type TypeRWStruct struct + Fields []Field + ResultHalfResolved HalfResolvedArgument + ResultNatArgs []ActualNatArg + ResultType *TypeRWWrapper + func (trw *TypeRWStruct) AllAffectedFieldMasks(f Field) (nats []Field, bits []uint32) + func (trw *TypeRWStruct) AllNewTL2Masks() []string + func (trw *TypeRWStruct) AllPossibleRecursionProducers() []*TypeRWWrapper + func (trw *TypeRWStruct) AllTypeDependencies(generic, countFunctions bool) (res []*TypeRWWrapper) + func (trw *TypeRWStruct) BeforeCodeGenerationStep1() + func (trw *TypeRWStruct) BeforeCodeGenerationStep2() + func (trw *TypeRWStruct) CPPAllowCurrentDefinition() bool + 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) CPPTypeJSONEmptyCondition(bytesVersion bool, val string, ref bool, deps []string) 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) CPPTypeWritingJsonCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + func (trw *TypeRWStruct) CPPWriteFields(bytesVersion bool) string + func (trw *TypeRWStruct) CPPWriteJsonFields(bytesVersion bool) string + func (trw *TypeRWStruct) CanBeBareBoxed() (canBare bool, canBoxed bool) + func (trw *TypeRWStruct) ContainsUnion(visitedNodes map[*TypeRWWrapper]bool) bool + func (trw *TypeRWStruct) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]int, generic bool) + func (trw *TypeRWStruct) GetAllLocallyAffectedByTrueTypeFieldMasks() []Field + func (trw *TypeRWStruct) GetAllLocallyAffectedFieldMasks() []Field + func (trw *TypeRWStruct) GetFieldNatProperties(fieldId int) (FieldNatProperties, []uint32) + func (trw *TypeRWStruct) GetFieldNatPropertiesAsUsageMap(fieldId int, inStruct, inReturnType bool) (FieldNatProperties, map[uint32]BitUsageInfo) + func (trw *TypeRWStruct) IsDictKeySafe() (isSafe bool, isString bool) + func (trw *TypeRWStruct) IsWrappingType() bool + func (trw *TypeRWStruct) PHPFindNatByName(name string) (localNat bool, indexInDeps int) + func (trw *TypeRWStruct) PHPGetFieldMask(targetName string, calculatedArgs *TypeArgumentsTree, fieldIndex int) string + func (trw *TypeRWStruct) PHPGetFieldNatDependenciesValuesAsTypeTree(fieldIndex int, calculatedArgs *TypeArgumentsTree) TypeArgumentsTree + func (trw *TypeRWStruct) PHPGetResultNatDependenciesValuesAsTypeTree() (TypeArgumentsTree, bool) + func (trw *TypeRWStruct) PHPStructConstructor(code *strings.Builder, necessaryFieldsInConstructor []Field) + func (trw *TypeRWStruct) PHPStructFieldMaskCalculators(code *strings.Builder, usedFieldMasksIndecies []int, ...) + func (trw *TypeRWStruct) PHPStructFieldMasks(code *strings.Builder) + func (trw *TypeRWStruct) PHPStructFields(code *strings.Builder) + func (trw *TypeRWStruct) PHPStructFunctionSpecificMethods(code *strings.Builder) + func (trw *TypeRWStruct) PHPStructFunctionSpecificTypes(code *strings.Builder) + func (trw *TypeRWStruct) PHPStructHeader(code *strings.Builder) + func (trw *TypeRWStruct) PHPStructRPCSpecialGetters(code *strings.Builder) + func (trw *TypeRWStruct) PHPStructReadMethods(code *strings.Builder) + func (trw *TypeRWStruct) PHPStructResultType(code *strings.Builder) + func (trw *TypeRWStruct) PHPStructWriteMethods(code *strings.Builder) + func (trw *TypeRWStruct) PhpCalculateSizesTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + func (trw *TypeRWStruct) PhpCanBeSimplify() bool + func (trw *TypeRWStruct) PhpClassName(withPath bool, bare bool) string + func (trw *TypeRWStruct) PhpClassNameReplaced() bool + func (trw *TypeRWStruct) PhpConstructorNeedsUnion() (unionParent *TypeRWWrapper) + func (trw *TypeRWStruct) PhpDefaultInit() string + func (trw *TypeRWStruct) PhpDefaultValue() string + func (trw *TypeRWStruct) PhpGenerateCode(code *strings.Builder, bytes bool) error + func (trw *TypeRWStruct) PhpIterateReachableTypes(reachableTypes *map[*TypeRWWrapper]bool) + func (trw *TypeRWStruct) PhpReadMethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWStruct) PhpReadTL2MethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWStruct) PhpTypeName(withPath bool, bare bool) string + func (trw *TypeRWStruct) PhpWriteMethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string) []string + func (trw *TypeRWStruct) PhpWriteTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + type TypeRWTL2 interface + type TypeRWUnion struct + Fields []Field + IsEnum bool + func (trw *TypeRWUnion) AllPossibleRecursionProducers() []*TypeRWWrapper + func (trw *TypeRWUnion) AllTypeDependencies(generic, countFunctions bool) (res []*TypeRWWrapper) + 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) CPPAllowCurrentDefinition() bool + 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) CPPTypeJSONEmptyCondition(bytesVersion bool, val string, ref bool, deps []string) 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) CPPTypeWritingJsonCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string + func (trw *TypeRWUnion) CPPWriteFields(bytesVersion bool) string + func (trw *TypeRWUnion) CPPWriteJSONFields(bytesVersion bool) string + func (trw *TypeRWUnion) CanBeBareBoxed() (canBare bool, canBoxed bool) + func (trw *TypeRWUnion) ContainsUnion(visitedNodes map[*TypeRWWrapper]bool) bool + func (trw *TypeRWUnion) FillRecursiveChildren(visitedNodes map[*TypeRWWrapper]int, generic bool) + func (trw *TypeRWUnion) HasShortFieldCollision(wr *TypeRWWrapper) bool + func (trw *TypeRWUnion) IsDictKeySafe() (isSafe bool, isString bool) + func (trw *TypeRWUnion) IsWrappingType() bool + func (trw *TypeRWUnion) PhpCalculateSizesTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + func (trw *TypeRWUnion) PhpClassName(withPath bool, bare bool) string + func (trw *TypeRWUnion) PhpClassNameReplaced() bool + func (trw *TypeRWUnion) PhpDefaultInit() string + func (trw *TypeRWUnion) PhpDefaultValue() string + func (trw *TypeRWUnion) PhpGenerateCode(code *strings.Builder, bytes bool) error + func (trw *TypeRWUnion) PhpIterateReachableTypes(reachableTypes *map[*TypeRWWrapper]bool) + func (trw *TypeRWUnion) PhpReadMethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWUnion) PhpReadTL2MethodCall(targetName string, bare bool, initIfDefault bool, args *TypeArgumentsTree, ...) []string + func (trw *TypeRWUnion) PhpTypeName(withPath bool, bare bool) string + func (trw *TypeRWUnion) PhpWriteMethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string) []string + func (trw *TypeRWUnion) PhpWriteTL2MethodCall(targetName string, bare bool, args *TypeArgumentsTree, supportSuffix string, ...) []string + type TypeRWWrapper struct + NatParams []string + WrLong *TypeRWWrapper + WrWithoutLong *TypeRWWrapper + func (trw *TypeRWWrapper) PhpTL2TrivialSize(targetObject string, canDependOnLocalBit bool, refObject bool) (isConstant bool, size string) + func (w *TypeRWWrapper) ActualTypeDependencies(evalType EvaluatedType) (res []*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) CPPTypeStringInNamespaceHalfResolved2(bytesVersion bool, typeReduction EvaluatedType) string + func (w *TypeRWWrapper) CanonicalString(bare bool) string + func (w *TypeRWWrapper) CanonicalStringTop() string + func (w *TypeRWWrapper) DoArgumentsContainUnionTypes() bool + func (w *TypeRWWrapper) DoesReturnTypeContainUnionTypes() bool + 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) IsFunction() bool + func (w *TypeRWWrapper) IsTopLevel() 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) NatArgs(result []ActualNatArg, prefix string) []ActualNatArg + func (w *TypeRWWrapper) PHPDefaultValue() string + func (w *TypeRWWrapper) PHPFilePath(bare bool) []string + func (w *TypeRWWrapper) PHPGenCoreType() *TypeRWWrapper + func (w *TypeRWWrapper) PHPGenerateCode(code *strings.Builder, bytes bool) error + func (w *TypeRWWrapper) PHPGetNatTypeDependenciesDecl(tree *TypeArgumentsTree) + func (w *TypeRWWrapper) PHPGetNatTypeDependenciesDeclAsArray() []string + func (w *TypeRWWrapper) PHPIsBare() bool + func (w *TypeRWWrapper) PHPIsPrimitiveType(recursiveCheck bool) bool + func (w *TypeRWWrapper) PHPIsTrueType() bool + func (w *TypeRWWrapper) PHPNeedsCode() bool + func (w *TypeRWWrapper) PHPTypePath() string + func (w *TypeRWWrapper) PHPTypePathElements() []string + func (w *TypeRWWrapper) PHPUnionParent() *TypeRWWrapper + func (w *TypeRWWrapper) PhpIterateReachableTypes(reachableTypes *map[*TypeRWWrapper]bool) + func (w *TypeRWWrapper) ShouldWriteEnumElementAlias() bool + func (w *TypeRWWrapper) ShouldWriteTypeAlias() bool + func (w *TypeRWWrapper) TransformNatArgsToChild(natArgs []ActualNatArg, childNatArgs []ActualNatArg) []ActualNatArg + func (wr *TypeRWWrapper) CPPNamespaceParts() []string + func (wr *TypeRWWrapper) Namespace() string + type TypeReduction struct + Arguments []EvaluatedType + Constructor *Constructor + IsType bool + Type *TypeDefinition + func (tr *TypeReduction) AncestorTemplateInTypeSystem(info LanguageTypeSystemInfo) TypeReduction + func (tr *TypeReduction) EraseConstants() TypeReduction + func (tr *TypeReduction) EraseConstantsAndTypes() TypeReduction + func (tr *TypeReduction) EraseTypes() TypeReduction + func (tr *TypeReduction) IsFullyResolved() bool + func (tr *TypeReduction) ReferenceName() (name tlast.Name) + func (tr *TypeReduction) ReferenceType() *TypeDefinition + func (tr *TypeReduction) String() string + type TypesInfo struct + Constructors map[ConstructorName]*Constructor + Types map[TypeName]*TypeDefinition + func (ti *TypesInfo) FieldTypeReduction(tr *TypeReduction, fieldId int) EvaluatedType + func (ti *TypesInfo) ResultTypeReduction(tr *TypeReduction) EvaluatedType + func (ti *TypesInfo) TypeNameToGenericTypeReduction(t TypeName) TypeReduction + func (ti *TypesInfo) TypeRWWrapperToTypeReduction(t *TypeRWWrapper) TypeReduction + type VisitResult = int + const VisitFail + const VisitInProgress + const VisitSuccess + type VisitedTypeNatParam struct + NatIndex int + Type_ string