codegen

package
v0.0.0-...-e669dbf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

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

func (gen *FidlGenerator) GenerateHeader(wr io.Writer, tree cpp.Root) error

GenerateHeader generates the C++ bindings header.

func (*FidlGenerator) GenerateSource

func (gen *FidlGenerator) GenerateSource(wr io.Writer, tree cpp.Root) error

GenerateSource generates the C++ bindings source, i.e. implementation.

func (*FidlGenerator) GenerateTestBase

func (gen *FidlGenerator) GenerateTestBase(wr io.Writer, tree cpp.Root) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL