Step 2: Define the class attributes
To add attributes to a class, select the class name from
the main list and select Modify from the
Class menu.
Edit Class dialog
-
Use the Add button to add a new attribute.
The first attribute you should define an object class is its naming
attribute -- its value is used as the name of the object
itself.
-
To edit an attribute, select it in the list and use the
description, type, syntax, operations, and filter controls. See
``About attributes''
for a complete description of these controls.
-
Some controls may
stippled (unavailable) because they do not apply in certain
circumstances. For example, some operations and filters
are not valid for single-valued attributes.
-
If you have selected a syntax of enum, you can use the
Values button to access a dialog that allows you to
edit the list of available values for your attribute.
``Edit Class dialog''
shows the sco UUCPsystems
example class with attributes
set up as follows:
-
each of the six fields (site, schedule, type, phone, speed, script)
constitute an attribute of the object, with the system attribute
specified first because it determines the name of the object.
-
all attributes have a single type and no syntax.
-
all attributes have a get and replace operation.
-
an equal filter for the type attribute, since we may want
to search for specific types of system connections (such as
ACU).
-
another possibility would be to divide the speed field into a minSpeed
and maxSpeed attribute, and supply equal, greater, and less filters for
these attributes.
Next topic:
About attributes
Previous topic:
Step 1: Create the new class
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004