void InstanceConfig :: loadForwardList(IniConfigFile& config) { ConfigCategoryIterator it = config.getCategoryIt(FORWARD_CATEGORY); while (!it.Eof()) { const char* key = it.key(); const char* value = (const char*)*it; // if it is a wildcard if (key[getlength(key) - 1] == '*') { NamespaceName alias(key); NamespaceName module(value); moduleForwards.erase(alias); moduleForwards.add(alias, StringHelper::clone(module)); } else { forwards.erase(key); forwards.add(key, StringHelper::clone(value)); } it++; } }
void InstanceConfig :: loadList(IniConfigFile& config, const char* category, const wchar_t* path, Map<ident_t, ident_c*>* list) { ConfigCategoryIterator it = config.getCategoryIt(category); while (!it.Eof()) { const char* key = it.key(); const char* value = (const char*)*it; if(emptystr(value)) value = key; // add path if provided if (!emptystr(path)) { Path filePath(path); Path::combinePath(filePath, value); list->add(key, IdentifierString::clonePath(filePath)); } else list->add(key, StringHelper::clone(value)); it++; } }
void RecentList :: load(IniConfigFile& file, const char* section) { for(ConfigCategoryIterator it = file.getCategoryIt(section) ; !it.Eof() ; it++) { _list.add(text_str(TextString(it.key())).clone()); } }