View Source Unifex.CodeGenerator behaviour (Unifex v1.0.0)

Behaviour for code generation.

Link to this section Summary

Functions

Generates boilerplate code using generator implementation from Unifex.CodeGenerators.

Link to this section Types

@type code_t() :: String.t()
@type generated_code_t() :: {header :: code_t(), source :: code_t(), generator :: t()}
@type t() :: module()

Link to this section Callbacks

@callback generate_header(specs :: Unifex.Specs.t()) :: code_t()
@callback generate_source(specs :: Unifex.Specs.t()) :: code_t()
Link to this callback

identification_constant()

View Source
@callback identification_constant() :: String.t()
@callback interface_io_name() :: String.t()

Link to this section Functions

@spec bundlex_interface(Bundlex.Native.interface_t()) :: Unifex.Specs.interface_t()
@spec generate_code(Unifex.Specs.t()) :: [generated_code_t()]

Generates boilerplate code using generator implementation from Unifex.CodeGenerators.

Link to this function

interface_generator(interface)

View Source
@spec interface_generator(Unifex.Specs.interface_t()) :: t()