Settings storage

Imagines setting system is a convenient system for storing application settings in an XML file. An application can both set and get a settings value. If an application is using any of the "get" functions requesting a non existent setting, then the setting will be automaticaly created using the default value. This makes the system very robust as a deleter file, or even part of a file, can be recreated by the setting sytem system. An application also has the abillity to provide comments to make the settings file easier for humans to read.

imagine_setting_boolean_get

boolean imagine_setting_boolean_get(const char *setting, boolean default_value, const char *comment);

Description: Get boolean setting. The function will return default_value if the setting is not available, and create the setting in the setting li

imagine_setting_boolean_set

void imagine_setting_boolean_set(const char *setting, boolean value, const char *comment);

Description: set boolean setting

imagine_setting_integer_get

int imagine_setting_integer_get(const char *setting, int default_value, const char *comment);

Description: get uint setting

imagine_setting_integer_set

void imagine_setting_integer_set(const char *setting, int value, const char *comment);

Description: set uint setting

imagine_setting_double_get

double imagine_setting_double_get(const char *setting, double default_value, const char *comment);

Description: get double setting

imagine_setting_double_set

void imagine_setting_double_set(const char *setting, double value, const char *comment);

Description: set double setting

imagine_setting_text_get

char *imagine_setting_text_get(const char *setting, char *default_text, const char *comment);

Description: get text setting

imagine_setting_text_set

void imagine_setting_text_set(const char *setting, char *text, const char *comment);

Description: set text setting

imagine_settings_save

void imagine_settings_save(const char *file_name);

Description: saves all settings to a file

imagine_settings_load

void imagine_settings_load(const char *file_name);

Description: loads all settings from a file

imagine_setting_test

boolean imagine_setting_test(const char *setting);

Description: Test if a setting exists