[sword-devel] Re: proposed changes to VerseKey

Joachim Ansorg nospam+sword-devel at joachim-ansorg.de
Mon Jun 20 11:56:07 MST 2005


Hi,

> > getBookName (already there)
> > getBookAbbrev (already there)

This needs to use the i18n abbrevs.

> > getChaptersInBook
> > getVersesInChapter
> >
> > For the latter 2 would the frontends prefer that they return for the
> > current book/chapter or that you pass in testament/book/chapter that
> > you want the values for?

I don't think these functions fit into VerseKey, this is module specific data.
I think it should go into another class, but I'm not aware of a public Bible 
module class for that.
I don't know.

> > This will allow changes to be made to the internals of VerseKey
> > without needing major changes in the frontends. However, the frontends
> > will need to be modified slightly to use the new API funcs rather than
> > the internal variables.
> >
> > I think GS and BT only use them to get the book names for populating
> > the books combobox.

And to get Verse and Chapter counts I think (without looking into the code).

> > BibleCS only has 1 line that needs changed in mainfrm.cpp - I think to
> > use getBookName
>
> btw if there are no objections I'll commit that later in the week.

I think Troy is offline these days, isn't he?
I don't know what he'd like.

> I've got a couple more proposals.
>
> I'd like to add NewBook() as a replacement for Book(). It will return
> the total book number within the Bible (i.e. Book()+39 for New
> Testament books). Er, maybe that should be Book()+40 to allow for a
> New Testament preface.

I don't like the name :)
What about v11n issues with this change?

> Would frontends be happy with that?
> I'd also like to deprecate Testament()
> To replace it I'd like to add a new function isInRange
> There would be some standard ranges like 'Old Testament', 'New
> Testament', 'Pentateuch' (ideas for other standard ranges would be
> good)
> To check if the key is in the Old Testament you would do something
> like key->isInRange(OLD_TESTAMENT)

Hm, I think we need the Testament and book stuff to check which testament is 
available in the Bible module to just display the book available.
I'd love an easy way to get the list of available books and their chapters, 
verses.

> Implementation details are to be decided - should it take a const
> char*, a VerseKey(range) or should both be implemented?

I'd like both.


Joachim
-- 
<>< Re: deemed
www.bibletime.info


More information about the sword-devel mailing list