user manual

Chapter 2: iTool System Architecture 39
iTool Developer’s Guide Registering Components
iTool except for visualization types, which may have been registered with the iTool
system object.
Note
Many operations, manipulators, file readers, and file writers are registered by the
IDLitToolbase class. If you create a new iTool based on this class, these features
will be registered automatically. See “Subclassing from the IDLitToolbase Class”
on page 91 for details.
Tip
If you want some, but not all, of the functionality exposed by the IDLitToolbase
class, you may find it useful to subclass from IDLitToolbase and unregister one or
more features. See the sections on unregistering items in the chapters devoted to
creating operations, manipulators, file readers, and file writers.
To register an object with an individual iTool, use one of the Register methods of the
IDLitTool class. Register methods exist for each type of object that can be registered
(IDLitTool::RegisterOperation for operations, for example). A call to a registration
method looks something like this
self->Register
Object
,
ObjectName
,
Object_Class_Name
where Object is one of the object types that can be registered (Visualization,
Operation, Manipulator, FileReader, or FileWriter), ObjectName is the string you will
use when referring to the object, and Object_Class_Name is a string that specifies the
name of the class file that contains the object’s definition.
See the Register methods under “IDLitTool” (IDL Reference Guide) for additional
details, and “Registering a Visualization Type on page 136, “Registering an
Operation” on page 182, “Registering a Manipulator” on page 223, “Registering a
File Reader” on page 245, and “Registering a File Writer” on page 269 for examples.
Specifying Object Identifiers
You can use the IDENTIFIER keyword to any of the Register methods to specify an
object identifier for the registered object, and thus specify the objects location in the
iTool object hierarchy and in the user interface. If you do not specify a value for the
IDENTIFIER keyword, a suitable object identifier will be constructed based on the
type of object being registered and the specified ObjectName.
Proxy Registration
You can also register an object as a proxy (or alias) to another object that has already
been registered. Registering an object as a proxy places the proxy object in the iTool