<html><head></head><body>While Peter is correct about how to find all the options that any loaded module might allow for toggling by an end user... and if this is your purpose, you should certainly use the methods Peter suggested... your question as to more generally how to read config entries which have the same key values is answered by how to iterate a multimap in C++. SWModule::getConfig returns the full multimap of config entries. Something like this should work:<br><br>ConfigEntMap::const_iterator begin = module->getConfig().lower_bound("Key");<br>ConfigEntMap::const_iterator end = module->getConfig().upper_bound("Key");<br><br>for(; begin !=end; ++begin) {<br> cout << begin->first.c_str() << " = " << begin->second.c_str() << endl;<br>}<br><br>But I've never needed to do this as a client of the library. Maybe if you tell us your use case, we can recommend a facility in the system which might make things easier for you.<br><br>Troy<br><br><div class="gmail_quote">On May 5, 2019 2:04:11 AM MST, Peter von Kaehne <refdoc@gmx.net> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On Sun, 2019-05-05 at 08:49 +0200, Tobias Klein wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Hi,<br>how is SWModule::getConfigEntry(const char *key) supposed to behave<br>when there are multiple entries with the same key?<br></blockquote><br>There is a set of separate methods for those.<br><br>Check out ./examples/cmdline/listoptions.cpp<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> {<br> SWMgr library;<br><br> StringList options = library.getGlobalOptions();<br> for (StringList::const_iterator it = options.begin(); it !=<br> options.end(); ++it) {<br> cout << *it << " (" <<<br> library.getGlobalOptionTip(*it) << ")\n";<br> StringList optionValues =<br> library.getGlobalOptionValues(*it);<br> for (StringList::const_iterator it2 =<br> optionValues.begin(); it2 != optionValues.end(); ++it2) {<br> cout << "\t" << *it2 << "\n";<br> }<br> }<br><br></blockquote><hr>sword-devel mailing list: sword-devel@crosswire.org<br><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page<br></pre></blockquote></div><br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>