Cthulhu  0.2.10
Cthulhu compiler collection

Configuration construction API. More...

Collaboration diagram for Construction:

Functions

CT_CONFIG_API cfg_group_t * config_group (cfg_group_t *group, const cfg_info_t *info)
 add a new configuration group to a configuration group More...
 
CT_CONFIG_API 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...
 
CT_CONFIG_API 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...
 
CT_CONFIG_API 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...
 
CT_CONFIG_API 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...
 
CT_CONFIG_API 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...
 
CT_CONFIG_API 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...
 

Detailed Description

Configuration construction API.

Function Documentation

◆ config_bool()

CT_CONFIG_API 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

Parameters
groupthe configuration group to add the field to
infothe information about this field
initialthe initial value for this field
Returns
the new configuration field

Definition at line 126 of file config.c.

◆ config_enum()

CT_CONFIG_API 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

Parameters
groupthe configuration group to add the field to
infothe information about this field
cfgthe configuration information for this field
Returns
the new configuration field

Definition at line 162 of file config.c.

◆ config_flags()

CT_CONFIG_API 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

Parameters
groupthe configuration group to add the field to
infothe information about this field
cfgthe configuration information for this field
Returns
the new configuration field

Definition at line 175 of file config.c.

◆ config_group()

CT_CONFIG_API cfg_group_t* config_group ( cfg_group_t *  group,
const cfg_info_t *  info 
)

add a new configuration group to a configuration group

Parameters
groupthe configuration group to add the group to
infothe information about this group
Returns
the new subgroup

Definition at line 188 of file config.c.

◆ config_int()

CT_CONFIG_API 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

Parameters
groupthe configuration group to add the field to
infothe information about this field
cfgthe configuration information for this field
Returns
the new configuration field

Definition at line 108 of file config.c.

◆ config_string()

CT_CONFIG_API 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

Parameters
groupthe configuration group to add the field to
infothe information about this field
initialthe initial value for this field
Returns
the new configuration field

Definition at line 138 of file config.c.

◆ config_vector()

CT_CONFIG_API 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

Parameters
groupthe configuration group to add the field to
infothe information about this field
initialthe initial values for this field
Returns
the new configuration field

Definition at line 150 of file config.c.