Unifex.CodeGenerator behaviour (Unifex v0.5.0) View Source

Behaviour for code generation.

Link to this section Summary

Functions

Generates boilerplate code using generator implementation from Unifex.CodeGenerators.

Link to this section Types

Specs

code_t() :: String.t()

Specs

generated_code_t() ::
  {header :: code_t(), source :: code_t(), generator :: module()}

Link to this section Functions

Specs

Specs

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

Specs

interface_generator(Unifex.Specs.interface_t()) :: module()

Link to this section Callbacks

Specs

generate_header(specs :: Unifex.Specs.t()) :: code_t()

Specs

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

identification_constant()

View Source

Specs

identification_constant() :: String.t()

Specs

interface_io_name() :: String.t()