Class Documentation

Name:ClassInfo
Version:1.0
ID:ID_CLASSINFO
Status:Beta
Category:System
Date:August 2004
Author:Rocklyte Systems
Copyright:  Rocklyte Systems (c) 2004. All rights reserved.
Short:  Provides support for scanning classes and objects in the system.



Description

The ClassInfo class is provided for object script developers that need to be able to scan the system for classes and retrieve information on the objects that they have allocated.

Actions

The ClassInfo class supports the following actions:

GetUnlistedField  Support is provided for unlisted fields.
Refresh  Refreshes the list of objects associated with the class.

Structure

The ClassInfo object consists of the following public fields:

Class  The name of the class to be targetted.
ClassID  The ID of the class to be targetted.
Objects  Lists all objects by ID number.
TotalObjects  The total number of objects listed in the Objects array.
Action:GetUnlistedField
Short:Support is provided for unlisted fields.

Unlisted fields are supported by the ClassInfo class in order to aid script usage.

To retrieve the ID of any object in the Objects array, use a field name of "object(index)" where 'index' is the array index that you are interested in. You can use this feature to scan the Objects array within a repeat loop, for example:

   <repeat count="[classinfo.totalobjects]">
     <xml>
       <item>[classinfo.object({index})]</item>
     </xml>
   </repeat>

Field:Class
Short:The name of the class to be targetted.
Type:STRING
Status:Get/Set

The name of the class that you want to target for examination must be indicated here. If this field is set after the classinfo object has been initialised, the Objects array will be refreshed immediately.


Field:ClassID
Short:The ID of the class to be targetted.
Type:STRING
Status:Read/Set

The ID of the class that you want to target for examination can be indicated here (if you aren't setting the Class field). If this field is set after the classinfo object has been initialised, the Objects array will be refreshed immediately.


Field:Objects
Short:Lists all objects by ID number.
Type:OBJECTID *
Status:Read

Following the initialisation of a classinfo object, the Objects field can be read to get a complete list of objects that exist for the targetted class. Each object is referenced by its unique ID number. Both public and private objects are included in the list, which is sorted by the order of creation (oldest to youngest). Public objets are easily identifiable by their negative object ID numbers.

The total number of objects listed in the array can be determined from the TotalObjects field.


Field:TotalObjects
Short:The total number of objects listed in the Objects array.
Type:LONG
Status:Read

This field indicates the total number of objects that are listed in the Objects array.