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

Behaviour for code generation.

Summary

Functions

Generates boilerplate code using generator implementation from Unifex.CodeGenerators.

Types

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

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()

Functions

@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()