93 static const char *
const kConfigTypeNames[
eConfigCount] = {
94 #define CFG_TYPE(id, name) [id] = (name),
103 return kConfigTypeNames[type];
106 static const char *
const kConfigArgNames[
eArgCount] = {
107 #define CFG_ARG(id, name, prefix) [id] = (name),
116 return kConfigArgNames[style];
119 static const char *
const kConfigArgPrefixes[
eArgCount] = {
120 #define CFG_ARG(id, name, prefix) [id] = (prefix),
129 return kConfigArgPrefixes[style];
#define ASSERT_FIELD_TYPE(field, type)
#define STA_DECL
sal2 annotation on function implementations to copy annotations from the declaration
STA_DECL const char * cfg_string_value(const cfg_field_t *field)
get the current string value of a configuration field
STA_DECL vector_t * cfg_vector_value(const cfg_field_t *field)
get the current vector value of a configuration field
STA_DECL size_t cfg_flags_value(const cfg_field_t *field)
get the current flags value of a configuration field
STA_DECL bool cfg_bool_value(const cfg_field_t *field)
get the current boolean value of a configuration field
STA_DECL int cfg_int_value(const cfg_field_t *field)
access
STA_DECL size_t cfg_enum_value(const cfg_field_t *field)
get the current enum value of a configuration field
STA_DECL const vector_t * cfg_vector_info(const cfg_field_t *field)
get the information about a vector field
STA_DECL const char * cfg_arg_string(arg_style_t style)
get the name of an argument style
STA_DECL const char * cfg_arg_prefix(arg_style_t style)
get the prefix for an argument style
STA_DECL bool cfg_bool_info(const cfg_field_t *field)
get the information about a yes/no field
STA_DECL const cfg_info_t * cfg_group_info(const cfg_group_t *config)
get the information about a configuration group
STA_DECL const char * cfg_type_string(cfg_type_t type)
get the name of a configuration type
STA_DECL typevec_t * cfg_get_groups(const cfg_group_t *config)
get all subgroups in a configuration group
STA_DECL const cfg_int_t * cfg_int_info(const cfg_field_t *field)
get the information about an integer field
STA_DECL const cfg_enum_t * cfg_enum_info(const cfg_field_t *field)
get the information about a choice field
STA_DECL const cfg_enum_t * cfg_flags_info(const cfg_field_t *field)
get the information about a flags field
STA_DECL const char * cfg_string_info(const cfg_field_t *field)
get the information about a string field
STA_DECL vector_t * cfg_get_fields(const cfg_group_t *config)
get all fields in a configuration group
STA_DECL cfg_type_t cfg_get_type(const cfg_field_t *field)
get the type of a configuration field
STA_DECL const cfg_info_t * cfg_get_info(const cfg_field_t *field)
get the information about a configuration field
cfg_type_t
the type of a configuration field
#define CT_ASSERT_RANGE(value, min, max)
assert that a value is in a range inclusive bounds check
#define CTASSERT(expr)
assert a condition, prints the condition as a message
a choice from a set of options
const char * string_config
information about a configuration field
A vector with a fixed type size.
a generic vector of pointers