[sword-devel] Mods to VerseKey

Daniel Glassey sword-devel@crosswire.org
Fri, 09 Apr 2004 18:27:38 +0100


On Thu, 2004-04-08 at 20:41, Lynn Allan wrote:
> > I'm starting at the bottom up so I'm currently looking at changing
> > VerseKey (new class VerseKey2) to support multiple versification
> > systems. I'll explain that once I get far enough to do so. But it's
> > basically going to be based on the OSIS refsys system[2] and it is going
> > to lump all the books together rather than separating into testaments.
> > Chris, I see now you've already been doing something on the
> > versification stuff[3], how is that going?
> 
> Hi Daniel,
> 
> While you're looking at possible changes to VerseKey, I would suggest
> consideration of a base-class for VerseKey that was only responsible for
> "versification". As it is, VerseKey has all kinds of related capabilities
> for parsing, search-lists, etc. The net effect is that it becomes an
> "octopus of dependencies" with the tendency to draw in a lot of semi-related
> code, and makes for a much larger exe size.
> 
> Such a class was used as an "experimental plug-in subset" of the sword-api
> for LcdBible. It allows dramatically smaller .exe's and, indirectly, much
> faster searching. VerseKey can either derive ("is-a") from the proposed
> class "CanonVersifier" or contain a CanonVersifier object ("has-a") for
> resolving the offsets within the file to fetch a specific verse using
> RawVerse or RawText.

Hi Lynn,
Sounds like a good idea :). I think it will be best to try and get
VerseKey organised and working then the core parts can be pushed down to
a base-class, or sidekick class as appropriate.

Regards,
Daniel