[Biococoa-dev] (no subject)
biococoa at bioworxx.com
Mon Jul 4 04:01:47 EDT 2005
Am 04.07.2005 um 07:48 schrieb Charles Parnot:
>> There is a structural failure in our implementation, the user
>> thinks he will get a BCSequence object, when he calls a init or
>> convenient method of BCSequence, but he gets a BCAbstractSequence.
>> So we have to fix the inheritance model.
> Hi Phil,
> Can you clarify this? I don't understand what you mean :-)
Sure. We have to make one class out of BCSequence and
BCAbstractSequence, i would suggest to name it BCSequence.
And now to the big "WHY??":
The problem is, that a user writes in his code:
BCSequence *seq = [[BCSequence alloc] initWithString:anySeqString];
seq will be for example of type BCSequenceRNA, but BCSequenceRNA
doesn't inherit from BCSequence.
Objective-C allows our current implementation, but it is a structural
failure. We need to subclass the BCSequenceNucleotide etc. from
BCSequence and put the code of BCAbstractSequence in BCSequence.
It's hard to explain, the easiest thing is to look at the NSValue &
NSNumber implementation of GNUStep.
If you looked at the implementation and then read my message
again ;-) you will hopefully understand.
i hope that helps :-), although i'm pretty sure it is confusing
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Biococoa-dev