[sword-devel] proposed changes to VerseKey

Daniel Glassey dglassey at gmail.com
Sat Jun 18 17:11:12 MST 2005


At the moment VerseKey exposes a couple of implementation variables as
public variables.
BMAX, books, builtin_BMAX, builtin_books

I'd like to make them private and make member functions to expose these.
getBookName (already there)
getBookAbbrev (already there)
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'd also llike to make
	setBookAbbrevs and setBooks private as they are implementation
functions used by SWLocale

SWLocale will be a friend class to VerseKey so it can access these
internal bits.

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.
BibleCS only has 1 line that needs changed in mainfrm.cpp - I think to
use getBookName

Regards,
Daniel



More information about the sword-devel mailing list