[bt-devel] refactoring

Jonathan Morgan jonmmorgan at gmail.com
Fri Jul 16 07:47:42 MST 2010


On Fri, Jul 16, 2010 at 9:09 AM, Troy A. Griffitts <scribe at crosswire.org>wrote:
...


> On 07/15/2010 03:31 PM, Jaak Ristioja wrote:
> >  * which books/chapters/verses or parts are present in a module
>
> This does not exist.  You can query the versification that a module
> implements, but there is no interface for asking what 'coverage' of that
> versification is present in a module.  Do you have a suggested interface?
>

If the question is "Is there any way to find all parts of the versification
that do not have entries?", the answer is no.  However, it is possible to
find out if a module has a particular key with mod::hasEntry(key), and you
could work from there if you felt inclined.  From memory, this method only
works with the internal index rather than retrieving the complete content of
the module, and so is comparatively fast (I can iterate through the entire
ESV and check whether the verses are present in a couple of seconds using
Python, while the equivalent code using setKey() and getRawEntry() takes a
lot longer).

Jon

>  * how do I read a specific verse/part of a module
>
> module->setKey("jn.3.16");
> cout << module->RenderText();
>

...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/bt-devel/attachments/20100717/e9e768b5/attachment.html>


More information about the bt-devel mailing list