|
From: Hiroo H. <hir...@co...> - 2004-10-06 04:33:36
|
Hi,
I'd like to propose another core interface change.
summary:
1. more OO (Object Oriented) interfaces for Patch related methods.
2. introduce ISinglePatch and IBankPatch interfaces instead of
ISingleDriver and IBankDriver interfaces.
3. number of interface methods was reduced by 6 (=9-3).
4. most of delegation methods in Driver class was removed. (For
example we need Driver.export(Patch) but don't need
Driver.export(IPatch) any more.
5. No affect on synth drivers (except minor changes for the XML driver
which uses new interfaces.)
I found this during I made the change for calculateChecksum() I made
last week. I see this makes code clearer and think this is the way to
go. (This may be one of proposals Rib and/or Torsten made before, but I
could not understand at that time.)
If you have any comments, let me know.
------------------------------------------------------------
IPatchDriver.export(IPatch) -> IPatch.export()
IPatchDriver.send(IPatch, int, int) -> send(int, int)
IPatchDriver.hasEditor() -> IPatch.hasEditor()
IPatchDriver.edit(IPatch) -> IPatch.edit()
IPatchDriver.isNullDriver() -> IPatch.hasNullDriver()
ISingleDriver.play(IPatch) -> ISinglePatch.play()
ISingleDriver.send(IPatch) -> ISinglePatch.send()
IBankDriver.getNumPatches() -> IBankPatch.getNumPatches()
IBankDriver.getNumColumns() -> IBankPatch.getNumColumns()
IBankDriver.getPatchName(IPatch, int) -> IBankPatch.getName(int)
IBankDriver.setPatchName(IPatch, int, String) -> IBankPatch.setName(int, String)
IBankDriver.getPatch(IPatch, int) -> IBankPatch.get(int)
IBankDriver.checkAndPutPatch(IPatch, IPatch, int) -> IBankPatch.put(IPatch, int)
IBankDriver.deletePatch(IPatcha, int) -> IBankPatch.delete(int)
new IPatch methods
getType()
isSinglePatch()
isBankPatch()
removed IPatch methods
play()
send()
getNumPatches()
getNumColumns()
getName(int)
setName(int, String)
get(int)
put(IPatch, int)
delete(int)
------------------------------------------------------------
--
Hiroo Hayashi
|