Chris Bitmead wrote:
>Oliver Elphick wrote:
>
>> This is in line with standard OO treatment of inherited classes.
>> Class aaa only has a single feature, a; it knows nothing about additional
>> features of descendant classes.
>
>But if you are say, using postgres to construct some C++ classes for
>types bbb and ccc, you would want to be able to get access to fields b
>and c so that you can construct your classes appropriately. This is how
>real object databases work.
[bbb and ccc both inherit from aaa.]
If you need features of bbb and ccc you must use those classes, not their
ancestor.
Class bbb knows about a and b and class ccc knows about a and c, but
aaa doesn't know about b and c because they are not defined in aaa.
`Vertebrate' is a descendant class of `animal'. `Vertebrate' has a feature
`bones', but `animal' doesn't, because the majority of animals don't have
bones at all.
This is how inheritance works in the Eiffel language, at least.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"But seek ye first the kingdom of God, and his
righteousness; and all these things shall be added
unto you." Matthew 6:33