Initial commit.
[amiga/xmodule.git] / Autodocs / songclass
1 @DATABASE "songclass"
2 @MASTER   "Work:SC/XM/Autodocs/songclass.doc"
3 @REMARK   This file was created by ADtoHT 2.1 on 08-Apr-97 12:17:15
4 @REMARK   Do not edit
5 @REMARK   ADtoHT is © 1993-1995 Christian Stieber
6
7 @NODE MAIN "songclass.doc"
8
9                                   @{b}songclass@{ub}
10
11 @{"background" LINK "background"}
12
13
14 @ENDNODE
15 @NODE "background" "songclass/background (information)"
16
17
18     NAME
19         songclass -- XModule 'boopsi'-oriented song implementation.
20
21     DESCRIPTION
22         The song class is an object oriented way to handle a song.  The song
23         class handles all data storing mechanisms for you and adds a layer
24         of abstraction between the song internal data structures and the
25         application.  The advantage is that the internal structures can be
26         changed while keeping compatibility with existing software.
27
28         Another great advantage of being a 'boopsi' class is that the song
29         can notify other boopsi objects whenever its attributes change.
30         This simplifies the task of keeping the user interface updated each
31         time the user (or an ARexx macro, or whatever) changes something.
32
33         For speed reasons, the song class does also allow 'white box'
34         istance access.  This means that you can also directly access
35         the internal data structures of the song, without using standard
36         boopsi methods.  You are ONLY allowed to READ public fields, but not
37         to write any of them.  The main reason to forbid direct writing is
38         that the song class must send notifications to its targets, but it
39         does also allow the song implementation to change in future version
40         without breaking existing applications.
41
42         When you create a new istance of the song class, the object handle
43         you get is actually a SongInfo structure.  This is only possible
44         because the song class is a subclass of the rootclass, whose istance
45         is placed at a negative offset in the object handle.
46         Future song class implementations could require to be subclasses
47         of other classes, such as the gadget class or even the datatypes
48         class.  This problem will be probably got around by keeping the
49         root class as the real superclass of the song and creating an
50         istance of the other superclass which will be passed all the
51         methods which are not recognized by the song its-self.  Call this
52         boopsi polymorphism, if you like to :-)
53
54     QUOTATION
55         Don't be a tuna head.
56
57 @ENDNODE