From: Bill Z. <wrz...@po...> - 2005-03-11 02:40:13
|
Joe Emenaker wrote: > /** > * GENERIC - This is the most common checksum type. It adds up blah > blah blah and appends it to location XYZ. > * NONE - This calculates no checksum and doesn't add any bytes to > the message > * BOSS_DR - Most Boss and Roland drum machines use this one. It > calculcates it like... blah blah blah. > */ I got a better idea: Since we're using an object-oriented language, why not use objects? synthdrivers.Generic.Checksum synthdrivers.Boss.DRChecksum synthdrivers.Casio.CZ1000.Driver implements Checksum This way if a new checksum is developed, noone needs to go edit the existing code base, nor twiddle the double-indirection constants, nor edit documentation in multiple places (source, Wiki). -Bill |