[bt-devel] class hierarchies

Gary Holmlund gary.holmlund at gmail.com
Wed Dec 8 21:52:12 MST 2010


I have looked at the Display and Display Window functions before and 
decided that the class hierarchy in them does make a lot of sense. The 
CBibleReadWindow, CBookReadWindow, and CCommentaryReadWindows all have 
unique functionality. A lot of that is in the toolbar widgets and their 
corresponding slot functions. I think that combining any of these will 
lead to larger functions with a lot of "if bibleWindow do xxx else do 
yyy. I would not think that combining these would be an improvement.

On 12/08/2010 01:57 PM, Patrick Sebastian Zimmermann wrote:
> After reading into the CReadWindow hierarchy a little more I don't think it is
> a good idea to merge CReadWindow/CLexiconReadWindow. It might make more sense
> to make CBibleReadWindow, CCommentaryReadWindow and CBookReadWindow derivates
> of CReadWindow directly and then move all common functions up to the base
> class. If I see it correctly most of the functions in CLexiconWindow are
> overwritten by the sub classes.
>
> Patrick
>
> On Wednesday, December 08, 2010 09:53:49 pm Patrick Sebastian Zimmermann
> wrote:
>> Hi,
>> I don't know the code well enough to have a substantiated opinion, but
>> "squashing" the classes together that only have a single derivate and for
>> which there are no possible other use cases or possible new derivates
>> should be save I'd say. From first look the only classes I don't see the
>> point in keeping the inheritance at first sight are
>> CReadWindow/CLexiconReadWindow.
>>
>> When doing such a change one should as well change the name of all
>> participated classes to Bt* as suggested here:
>> http://devel.bibletime.info/wiki/BibleTime1Refactoring#Class_naming_convent
>> ion.
>>

Yes, I have thought for a while that we should complete the Bt* naming 
convention for all classes.



>> I know there were plans for refactoring the html read display code since it
>> is fragile. I guess it makes sense to see what has already been thought
>> about.
>>
>> Greetings,
>> Patrick
>>
>> On Wednesday, December 08, 2010 08:37:22 pm Olaf Radicke wrote:
>>> Hi,
>>>
>>> any proposals, which class hierarchies could be reduced?
>>>
>>> My favorite is...
>>>
>>> http://sourcearchives.com/doxygen/bibletime/de/d17/classCDisplay.html
>>>
>>> and
>>>
>>> http://sourcearchives.com/doxygen/bibletime/dc/dc1/classCDisplayWindow.ht
>>> ml
>>>
>>>
>>> Olaf
>>
Gary



More information about the bt-devel mailing list