org.zmpp.vm
Interface ObjectTree

All Known Implementing Classes:
Objects

public interface ObjectTree

This is the interface definition of the object tree.

Version:
1.0
Author:
Wei-ju Wu

Method Summary
 int getNumObjects()
          Returns the total number of objects.
 ZObject getObject(int objectNum)
          Returns the Z-object with the specified object number.
 short getPropertyDefault(int propertyNum)
          Returns the property default value at the specified position in the property defaults table.
 int getPropertyLength(int propertyAddress)
          Determines the length of the property at the specified address.
 void insertObject(int parentNum, int objectNum)
          Inserts an object to a new parent.
 void removeObject(int objectNum)
          Removes an object from its parent.
 

Method Detail

getPropertyDefault

short getPropertyDefault(int propertyNum)
Returns the property default value at the specified position in the property defaults table.

Parameters:
propertyNum - the default entry's propery number
Returns:
the property default value

getObject

ZObject getObject(int objectNum)
Returns the Z-object with the specified object number. The index is 1 based

Parameters:
objectNum - object number
Returns:
the z object with the specified number

getNumObjects

int getNumObjects()
Returns the total number of objects.

Returns:
the number of objects

removeObject

void removeObject(int objectNum)
Removes an object from its parent.

Parameters:
objectNum - the object number

insertObject

void insertObject(int parentNum,
                  int objectNum)
Inserts an object to a new parent.

Parameters:
parentNum - the parent number
objectNum - the object number

getPropertyLength

int getPropertyLength(int propertyAddress)
Determines the length of the property at the specified address. The address is an address returned by ZObject.getPropertyAddress, i.e. it is starting after the length byte.

Parameters:
propertyAddress - the property address
Returns:
the length


Copyright © 2005 . All Rights Reserved.