Documentation
¶
Index ¶
- type CodeGenerationMode
- type Config
- type FidlGenerator
- func (gen *FidlGenerator) GenerateFidl(fidl fidl.Root, config *Config, clangFormatPath string) error
- func (gen *FidlGenerator) GenerateHeader(wr io.Writer, tree cpp.Root) error
- func (gen *FidlGenerator) GenerateSource(wr io.Writer, tree cpp.Root) error
- func (gen *FidlGenerator) GenerateTestBase(wr io.Writer, tree cpp.Root) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeGenerationMode ¶
type CodeGenerationMode int
CodeGenerationMode controls which subset of bindings code to generate.
const ( // Monolithic generates all of HLCPP bindings in one header/source pair. Monolithic CodeGenerationMode // OnlyGenerateDomainObjects generates only the domain objects // (structs, tables, unions, enums, bits, request/response codecs, etc.) OnlyGenerateDomainObjects )
type Config ¶
type Config struct { // The base file name for files generated by this generator. OutputBase string // The directory to which C and C++ includes should be relative. IncludeBase string // The path suffix after the library path when referencing includes. IncludeStem string }
Config is the configuration data passed to the HLCPP generator.
type FidlGenerator ¶
type FidlGenerator struct { CodeGenerationMode // contains filtered or unexported fields }
func NewFidlGenerator ¶
func NewFidlGenerator(mode CodeGenerationMode) *FidlGenerator
func (*FidlGenerator) GenerateFidl ¶
func (gen *FidlGenerator) GenerateFidl(fidl fidl.Root, config *Config, clangFormatPath string) error
GenerateFidl generates all files required for the C++ bindings.
func (*FidlGenerator) GenerateHeader ¶
GenerateHeader generates the C++ bindings header.
func (*FidlGenerator) GenerateSource ¶
GenerateSource generates the C++ bindings source, i.e. implementation.
func (*FidlGenerator) GenerateTestBase ¶
Source Files
¶
- codegen.go
- header.tmpl.go
- implementation.tmpl.go
- natural_types_bits.tmpl.go
- natural_types_const.tmpl.go
- natural_types_enum.tmpl.go
- natural_types_protocol.tmpl.go
- natural_types_struct.tmpl.go
- natural_types_table.tmpl.go
- natural_types_union.tmpl.go
- proxies_and_stubs_protocol.tmpl.go
- proxies_and_stubs_service.tmpl.go
- test_base.tmpl.go
Click to show internal directories.
Click to hide internal directories.