-
Notifications
You must be signed in to change notification settings - Fork 2
/
type_rw_primitive_cpp.go
46 lines (35 loc) · 1.71 KB
/
type_rw_primitive_cpp.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2022 V Kontakte LLC
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
package tlcodegen
import (
"fmt"
"strings"
)
func (trw *TypeRWPrimitive) CPPFillRecursiveChildren(visitedNodes map[*TypeRWWrapper]bool) {
}
func (trw *TypeRWPrimitive) cppTypeStringInNamespace(bytesVersion bool, hppInc *DirectIncludesCPP) string {
return trw.cppPrimitiveType
}
func (trw *TypeRWPrimitive) cppTypeStringInNamespaceHalfResolved(bytesVersion bool, hppInc *DirectIncludesCPP, halfResolved HalfResolvedArgument) string {
return trw.cppPrimitiveType
}
func (trw *TypeRWPrimitive) cppDefaultInitializer(halfResolved HalfResolvedArgument, halfResolve bool) string {
return trw.cppDefaultInit
}
func (trw *TypeRWPrimitive) CPPHasBytesVersion() bool {
return false
}
func (trw *TypeRWPrimitive) CPPTypeResettingCode(bytesVersion bool, val string) string {
return "\t" + fmt.Sprintf(trw.cppResetValue, val)
}
func (trw *TypeRWPrimitive) CPPTypeWritingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string {
return fmt.Sprintf("\ts.%s_write(%s);", trw.cppFunctionSuffix, val)
}
func (trw *TypeRWPrimitive) CPPTypeReadingCode(bytesVersion bool, val string, bare bool, natArgs []string, last bool) string {
return fmt.Sprintf("\ts.%s_read(%s);", trw.cppFunctionSuffix, val)
}
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) {
}