Workbench Library
0.1b
|
Configuration settings and macros for Workbench audio and MIDI applications. More...
Go to the source code of this file.
Macros | |
#define | WORKBENCH_CONFIG_DEFINE_STRUCT(type, field, default) type field; |
Macro to define a field in the configuration structure. More... | |
#define | WORKBENCH_CONFIG_SET_DEFAULTS(type, field, default) .field = default, |
Macro to set default values for configuration fields. More... | |
#define | WORKBENCH_CONFIG_DEFINE_SETTERS(type, field, default) void config_set_##field(type field); |
Macro to define setter function declarations for configuration fields. More... | |
#define | WORKBENCH_CONFIG_IMPLEMENT_SETTERS(type, field, default) |
Macro to implement setter functions for configuration fields. More... | |
#define | WORKBENCH_CONFIG_PARSE_ARGUMENTS(type, field, default) |
Macro to parse configuration arguments. More... | |
#define | WORKBENCH_CONFIG_PARSE_STRING(type, field, default) |
Macro to parse configuration field values from strings. More... | |
#define | WORKBENCH_FLAG_DEFINE(FLAG) FLAG = (1 << FLAG##_BIT), |
Defines actual values for feature flags. More... | |
Configuration settings and macros for Workbench audio and MIDI applications.
This header file defines the configuration structure and related macros for managing audio and MIDI settings in Workbench applications. It includes default values, flag enumerations, and macros for initializing and managing the configuration.
#define WORKBENCH_CONFIG_DEFINE_SETTERS | ( | type, | |
field, | |||
default | |||
) | void config_set_##field(type field); |
Macro to define setter function declarations for configuration fields.
The WORKBENCH_CONFIG_DEFINE_SETTERS
macro generates the declaration of setter functions for each field in the configuration structure. Each generated function allows setting the value of a specific configuration field.
This macro is intended to be passed to the CONFIG
macro to generate the setter function declarations.
type | The data type of the field. |
field | The name of the field. |
default | The default value of the field (not used in this macro, but included for consistency). |
#define WORKBENCH_CONFIG_DEFINE_STRUCT | ( | type, | |
field, | |||
default | |||
) | type field; |
Macro to define a field in the configuration structure.
The WORKBENCH_CONFIG_DEFINE_STRUCT
macro specifies how each field in the configuration structure should be declared.
This macro is intended to be passed to the CONFIG
macro to generate the structure definition.
type | The data type of the field. |
field | The name of the field. |
default | The default value of the field (not used here). |
#define WORKBENCH_CONFIG_IMPLEMENT_SETTERS | ( | type, | |
field, | |||
default | |||
) |
Macro to implement setter functions for configuration fields.
The WORKBENCH_CONFIG_IMPLEMENT_SETTERS
macro generates the implementation of setter functions for each field in the configuration structure. Each generated function allows setting the value of a specific configuration field.
type | The data type of the field. |
field | The name of the field. |
default | The default value of the field (not used here). |
#define WORKBENCH_CONFIG_PARSE_ARGUMENTS | ( | type, | |
field, | |||
default | |||
) |
Macro to parse configuration arguments.
The WORKBENCH_CONFIG_PARSE_ARGUMENTS
macro adds parsed arguments to an array if they match a configuration field name. This is used during the configuration parsing process.
type | The data type of the field. |
field | The name of the field. |
default | The default value of the field (not used here). |
#define WORKBENCH_CONFIG_PARSE_STRING | ( | type, | |
field, | |||
default | |||
) |
Macro to parse configuration field values from strings.
The WORKBENCH_CONFIG_PARSE_STRING
macro parses the value of a configuration field from a string representation and assigns it to the appropriate field in the configuration structure.
type | The data type of the field. |
field | The name of the field. |
default | The default value of the field. |
#define WORKBENCH_CONFIG_SET_DEFAULTS | ( | type, | |
field, | |||
default | |||
) | .field = default, |
Macro to set default values for configuration fields.
The WORKBENCH_CONFIG_SET_DEFAULTS
macro initializes the fields of the configuration structure with default values.
This macro is intended to be used when defining the default configuration settings.
type | The data type of the field. |
field | The name of the field. |
default | The default value of the field. |
#define WORKBENCH_FLAG_DEFINE | ( | FLAG | ) | FLAG = (1 << FLAG##_BIT), |
Defines actual values for feature flags.
The DEFINE
macro assigns bitwise values to each feature flag by shifting 1
left by the corresponding bit index from the flag_bits
enumeration.
FLAG | The macro parameter representing a feature flag. |