1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.zmpp.vm;
24
25 /***
26 * This is the interface definition of the object tree.
27 *
28 * @author Wei-ju Wu
29 * @version 1.0
30 */
31 public interface ObjectTree {
32
33 /***
34 * Returns the property default value at the specified position in the
35 * property defaults table.
36 *
37 * @param propertyNum the default entry's propery number
38 * @return the property default value
39 */
40 short getPropertyDefault(int propertyNum);
41
42 /***
43 * Returns the Z-object with the specified object number. The index is
44 * 1 based
45 *
46 * @param objectNum object number
47 * @return the z object with the specified number
48 */
49 ZObject getObject(int objectNum);
50
51 /***
52 * Returns the total number of objects.
53 *
54 * @return the number of objects
55 */
56 int getNumObjects();
57
58 /***
59 * Removes an object from its parent.
60 *
61 * @param objectNum the object number
62 */
63 void removeObject(int objectNum);
64
65 /***
66 * Inserts an object to a new parent.
67 *
68 * @param parentNum the parent number
69 * @param objectNum the object number
70 */
71 void insertObject(int parentNum, int objectNum);
72
73 /***
74 * Determines the length of the property at the specified address.
75 * The address is an address returned by ZObject.getPropertyAddress,
76 * i.e. it is starting after the length byte.
77 *
78 * @param propertyAddress the property address
79 * @return the length
80 */
81 int getPropertyLength(int propertyAddress);
82 }