27 #define CONFIG_DATA_PATH "configuration_data"
28 #define CONFIG_ITEM "configuration"
30 #define DEFAULT_CONFIGURATION "default_configuration"
51 bool exists()
const {
return top_area || middle_area; }
54 arb_assert(area == TOP_AREA || area == MIDDLE_AREA);
55 return area == TOP_AREA ? top_area : middle_area;
58 arb_assert(area == TOP_AREA || area == MIDDLE_AREA);
59 char*& Area = area == TOP_AREA ? top_area : middle_area;
60 freeset(Area, new_def);
64 void set_comment(
const char *newComment) { freedup(comment, newComment); }
68 return saveAsOver(gb_main, name, name, warnIfSavingDefault);
100 : config_string(nulldup(cfg.get_definition(area))),
113 #error ad_config.h included twice
114 #endif // AD_CONFIG_H
GBT_config_parser(const GBT_config &cfg, int area)
static const int MIDDLE_AREA
GBT_config_item(GBT_CONFIG_ITEM_TYPE type_, const char *name_)
static const int TOP_AREA
void append_to_config_string(GBS_strstruct &out) const
GBT_CONFIG_ITEM_TYPE type
const char * get_comment() const
static void error(const char *msg)
void set_comment(const char *newComment)
GBDATA * GBT_find_configuration(GBDATA *gb_main, const char *name)
GB_ERROR save(GBDATA *gb_main, const char *name, bool warnIfSavingDefault) const
GB_ERROR saveAsOver(GBDATA *gb_main, const char *name, const char *oldName, bool warnIfSavingDefault) const
void GBT_get_configuration_names(struct ConstStrArray &configNames, GBDATA *gb_main)
const GBT_config_item & nextItem(GB_ERROR &error)
const char * get_definition(int area) const
void set_definition(int area, char *new_def)