home *** CD-ROM | disk | FTP | other *** search
/ Set of Apple II Hard Drive Images / eric.hdv / OBJSRC / CLASS.SPEC.txt < prev    next >
Text File  |  2020-08-13  |  4KB  |  65 lines

  1. Object/Class System Specification: (using CRC cards)
  2.  
  3. CLASS:
  4. Definition: a template for creating objects
  5. Responsibilities: construct object, destroy object, locate method, execute method, locate instance variable
  6. Collaborators: class tree, memory manager, method searcher, object
  7. Attributes: instance variable list, method list, method code, parent class
  8.  
  9. OBJECT: (parent = CLASS)
  10. Definition: an instance of a class
  11. Responsibilities: receive incoming message, send outgoing message
  12. Collaborators: class
  13. Attributes: member_class, instance variable pointer
  14. Outgoing Messages: member_class.locate_method(incoming_method_name)
  15.  
  16. MESSAGE: (parent = OBJECT)
  17. Definition: a message that is to be passed from one object to another
  18. Responsibilities: send message to receiver object
  19. Collaborators: memory manager
  20. Attributes: sender, receiver, method_name, message_length, message_pointer
  21. Note: data at message pointer contains a list of argument names followed by their values.  ex: var1 8 var2 16.  this data area was acquired from the memory manager, who ensures that nobody else can access it.
  22.  
  23. MEMORY MANAGER:
  24. Definition: a resource controller which controls all allocation, deallocation, reading, and writing of memory blocks.  You are assigned an access key when you request a block, and must supply that key in order to read or write the block.  You can pass the key to another object if that object needs to access the block.
  25. Responsibilities: allocate block, deallocate block, write bytes to block, read bytes from block, move data from one block to another block, garbage collection
  26. Collaborators: none
  27. Attributes: block name, block access key, block address, block length, memory map
  28. Example messages: 
  29. mem_mgr.POKE (block name='eric', block access key='123',
  30. offset=5,bytevalue=7f) - stores the value 7f in address of 'eric'+5 assuming proper validations: block access key correct, offset within range.
  31. mem_mgr.PEEK (block_name='eric', block access key='123',
  32. offset=5,myvariable='ericvalue') - returns value in address 'eric'+5 assuming
  33. proper validations: block access key correct, offset within range.
  34. If validations fail, sends message to Error Handler, which will decide whether to abend program, log the error, or ignore the error, or notify the user that a system problem occurred and give her the option to continue (with possible unpredictable conseqences) or ignore it.  Default course of action should be to take a dump of the object, preserve the instruction pointer, abend the task gracefully, log the violation, sound an alarm in the support center, and beep the programmer responsible for maintenance of the module.  of course, it may not be possible to find the cause of the problem - but a clue should be found in the last message received by the object, or the system trace table which would be searched to find all previous messages sent to that object.  We are also assuming that every program in the system is conforming to this memory management protocol, and that it has become a standard which is enforced by a quality control group that is effective in banning programs which don't follow standards from creeping into the sacred production environment.
  35.  
  36. INTERRUPT MANAGER:
  37. Definition: a resource controller which detects all hardware interrupts and
  38. sends messages to the appropriate interrupt handlers.
  39.  
  40.  
  41. APPLICATION CLASSES:
  42. ====================
  43. MIDI FILE FORMAT PLAYER
  44.          MF FORMAT 0 PLAYER
  45.          MF FORMAT 1 PLAYER
  46. MIDI FILE FORMAT 1 TRACK MANAGER
  47. MIDI FILE FORMAT 1 TEMPO MAP READER
  48. MIDI FILE FORMAT 1 TRACK LOADER/RELOADER
  49. Track Loader/Reloader (collaborator: memory manager)
  50. Prodos MLI Interface
  51. MIDI Output Queue
  52. MIDI Output Filter/Router
  53. MIDI OUT interface
  54. MIDI Display Manager (can control several types of displays: piano, music notation, midi events, control changes, program changes)
  55. User Control Panel
  56. MIDI IN interface
  57. Sequencer
  58. MIDI Mapper
  59. Timer
  60. System Interrupt Manager
  61. MIDI IN Interrupt Handler
  62. Timer Interrupt Handler
  63. System Activity Scheduler
  64. MIDI Input Queue
  65.