YAML configuration object
The configuration object is the root of a barectf YAML configuration document. It describes a complete barectf configuration.
The configuration object must have the YAML tag
tag:barectf.org,2020/3/config
.
The configuration object has a mandatory trace object and options.
Properties
Name | Type | Description | Req? | Default |
---|---|---|---|---|
|
Configuration options. |
No |
See Options object for default values. |
|
Configuration’s trace. |
Yes |
Options object
The options of a configuration object.
Properties
Name | Type | Description | Default |
---|---|---|---|
|
Code generation options. |
See Code generation options object for default values. |
Code generation options object
The code generation options of a configuration object.
Properties
All the properties are optional.
Name | Type | Description | Default |
---|---|---|---|
String or prefix object |
Identifier and file name prefixes. If the value is the string |
The identifier prefix |
|
|
C header generation options. |
See Code generation header options object default values. |
Prefix object
Identifier and file name prefixes.
Properties
All the properties are required.
Name | Type | Description |
---|---|---|
|
String |
Prefix of any C file which barectf generates. barectf adds This prefix must only contain valid characters for a file name. |
|
String |
Prefix of any public C identifier which barectf generates. barectf does not add anything between this prefix and the rest of the identifier. For example, if this prefix is This prefix must be a valid C identifier. |
Code generation header options object
The C header generation options of a configuration object.
Properties
All the properties are optional.
Name | Type | Description | Default |
---|---|---|---|
Boolean |
If this property is true, then barectf generates a public
C preprocessor definition named |
False |
|
Boolean |
If this property is true, then barectf generates a public
C preprocessor definition named
|
False |
Examples
The following examples omit the trace object for clarity. |
--- !<tag:barectf.org,2020/3/config>
trace:
# ...
--- !<tag:barectf.org,2020/3/config>
options:
code-generation:
prefix:
file-name: acme-corp
identifier: acme_corp_
trace:
# ...
--- !<tag:barectf.org,2020/3/config>
options:
code-generation:
header:
identifier-prefix-definition: true
default-data-stream-type-name-definition: true
trace:
# ...
This YAML directive indicates that the YAML document honours the YAML 1.2 specification.
%YAML 1.2
--- !<tag:barectf.org,2020/3/config>
trace:
# ...