[Biococoa-dev] NSMutableData vs malloc
Charles Parnot
charles.parnot at gmail.com
Sun Jul 10 19:40:19 EDT 2005
On Jul 10, 2005, at 3:28 PM, John Timmer wrote:
> So, if I'm going to start putting things together in terms of unsigned
> char's without breaking a lot of stuff, I'm going to have to do a
> lot at
> once, including at least creating the NSData ivar. I'll try to get
> started
> tonight, and just wanted to clear my plan with everyone:
>
> Change unichar methods in BCSymbol classes to use unsigned char's
> Change SymbolSet methods to handle unsigned char's
> Add an NSMutableData ivar to BCSequence hold the char array
> Modify BCSequence initialization methods to create the char array
> Add new methods to BCSequence to start working with the unsigned chars
You don't have to modify the code in BCSequence, as it will be
dropped. I suppose you meant BCSequenceAbstract ;-)
Just FYI: when I changed the code to simplify the init methods, I had
to make a choice for a designated initializer. Of course, at the
time, I chose the init with the symbol array... I suppose this could
still be the designated initializer for the time being, and you could
change code there. This is the ONLY place that code needs to be
changed to support the char array in the init methods, as all the
other init method depend on it (and in fact, there is just a few
lines to change). Then all the tests for the init should still work,
if you did a good job ;-) Let me know if the comments I put in the
init methods helped.
At some point (soon), we should then change the designated
initializer. And maybe have that be a new initializer '...withData:',
and remove the symbol array initializer. All the tests should still
work and should not require changes, as they are all based on NSString.
Then adding the other methods won't break anything as nothing exists
yet...
Thanks, John!
charles
--
Xgrid-at-Stanford
Help science move fast forward:
http://cmgm.stanford.edu/~cparnot/xgrid-stanford
Charles Parnot
charles.parnot at gmail.com
More information about the Biococoa-dev
mailing list