#include "base/util.h"
#include "common.h"
#include "arena/arena.h"
#include "std/str.h"
#include "std/typed/vector.h"
#include "std/vector.h"
Go to the source code of this file.
|
STA_DECL cfg_group_t * | config_root (const cfg_info_t *info, arena_t *arena) |
| create a new configuration group More...
|
|
STA_DECL cfg_field_t * | config_int (cfg_group_t *group, const cfg_info_t *info, cfg_int_t cfg) |
| add a new integer field to a configuration group More...
|
|
STA_DECL cfg_field_t * | config_bool (cfg_group_t *group, const cfg_info_t *info, bool initial) |
| add a new yes/no field to a configuration group More...
|
|
STA_DECL cfg_field_t * | config_string (cfg_group_t *group, const cfg_info_t *info, const char *initial) |
| add a new string field to a configuration group More...
|
|
STA_DECL cfg_field_t * | config_vector (cfg_group_t *group, const cfg_info_t *info, vector_t *initial) |
| add a new vector field to a configuration group More...
|
|
STA_DECL cfg_field_t * | config_enum (cfg_group_t *group, const cfg_info_t *info, cfg_enum_t cfg) |
| add a new choice field to a configuration group More...
|
|
STA_DECL cfg_field_t * | config_flags (cfg_group_t *group, const cfg_info_t *info, cfg_enum_t cfg) |
| add a new flags field to a configuration group More...
|
|
STA_DECL cfg_group_t * | config_group (cfg_group_t *group, const cfg_info_t *info) |
| add a new configuration group to a configuration group More...
|
|
◆ ASSERT_CONFIG_VALID
#define ASSERT_CONFIG_VALID |
( |
|
config, |
|
|
|
info |
|
) |
| |
Value:
ASSERT_INFO_VALID(info); \
CT_PARANOID_ASSERTF(config_find(config, (info)->name) == NULL, "duplicate config field `%s`", \
(info)->name);
#define CTASSERT(expr)
assert a condition, prints the condition as a message
Definition at line 63 of file config.c.
◆ ASSERT_INFO_VALID
#define ASSERT_INFO_VALID |
( |
|
info | ) |
|
Value:
CT_PARANOID(info_validate(info));
#define ASSERT_INFO_VALID_GROUP(info)
Definition at line 59 of file config.c.
◆ ASSERT_INFO_VALID_GROUP
#define ASSERT_INFO_VALID_GROUP |
( |
|
info | ) |
|
Value:
CTASSERT((info)->name != NULL);
Definition at line 55 of file config.c.
◆ ASSERT_OPTIONS_VALID
#define ASSERT_OPTIONS_VALID |
( |
|
options, |
|
|
|
count |
|
) |
| |
Value:
CTASSERT((count) > 0); \
CT_PARANOID(options_validate(options, count));
Definition at line 50 of file config.c.