big merge

This commit is contained in:
Philippe G
2021-12-18 21:04:23 -08:00
parent 955692f8ad
commit 898998efb0
583 changed files with 84472 additions and 1965 deletions

View File

@@ -0,0 +1,25 @@
package main
import (
"path/filepath"
"strings"
)
func AddIncludeForType(t GeneratableType, gen *CppGenerator) {
switch v := t.(type) {
case *ClassType:
gen.AddLocalInclude(v.ProtoName + ".h")
case *EnumType:
gen.AddLocalInclude(v.ProtoName + ".h")
case *VectorType:
gen.AddLibraryInclude("vector")
AddIncludeForType(v.InnerType, gen)
case *OptionalType:
gen.AddLibraryInclude("optional")
AddIncludeForType(v.InnerType, gen)
}
}
func StripExtenstion(filename string) string {
return strings.TrimSuffix(filename, filepath.Ext(filename))
}