29 #ifndef __CCL_CONFIG_TABLE_H__
30 # define __CCL_CONFIG_TABLE_H__
45 # define ccl_config_table_create() ccl_config_table_inherits (NULL)
void ccl_config_table_del_reference(ccl_config_table *conf)
Removes one reference to conf.
void ccl_config_table_save(ccl_config_table *conf, FILE *output)
Writes the content of conf onto the output stream.
void ccl_config_table_display(ccl_config_table *conf)
Display on the CCL_LOG_DISPLAY stream the entries of conf.
Generic simple linked list.
ccl_config_table * ccl_config_table_inherits(ccl_config_table *parent)
Builds a locally empty table but inherits content from parent.
int ccl_config_table_has(ccl_config_table *conf, const char *name)
Checks if the table conf contains an entry for the option name.
int ccl_config_table_get_boolean(ccl_config_table *conf, const char *name)
Returns the value for the configuration option name but the value is interpreted as a Boolean value...
ccl_list * ccl_config_table_get_names(ccl_config_table *conf)
Returns the list of valued options.
const char * ccl_config_table_get(ccl_config_table *conf, const char *name)
Returns the value for the configuration option name.
void ccl_config_table_add(ccl_config_table *conf, ccl_config_table *others)
Adds all (local) preferences of others to conf.
int ccl_config_table_is_changed(ccl_config_table *conf)
Checks if the content of the table has changed.
struct ccl_config_table_st ccl_config_table
Abstract type for "preferences" table.
struct ccl_list_st ccl_list
Type of a generic list.
const char * ccl_config_table_set_if_null(ccl_config_table *conf, const char *name, const char *value)
Add the couple (name, value) if the entry does not exist.
Some useful and common macros.
void ccl_config_table_load(ccl_config_table *conf, FILE *input)
Reads configuration options from the input stream and adds them into the conf table.
void ccl_config_table_set(ccl_config_table *conf, const char *name, const char *value)
Adds the couple (name, value) into conf.
int ccl_config_table_get_integer(ccl_config_table *conf, const char *name)
Returns the value for the configuration option name but the value is interpreted as an integer...
ccl_config_table * ccl_config_table_add_reference(ccl_config_table *conf)
Adds one reference to conf.