Progress
ADM 2 Guide
SmartObject File Relationships
Within the overall SmartObject class hierarchy, the class files described in the "General Structure of a SmartObject" section relate to other files of the same type in certain very specific ways. These relationships establish what characteristics and properties a specific SmartObject type inherits. Figure 5–2, which is based on the SmartDataViewer, illustrates these relationships.
Figure 5–2: Include File Structure for SmartDataViewer
![]()
In Figure 5–2, note the following:
- The
smrtprop.i
file, at the lower left, defines an ADMProps temp–table that in turn defines the basic properties that apply to all SmartObjects. Each include file above thesmrtprop.i
file adds properties specific to the class with which it is associated. For details on the ADMProps temp–table, see the "ADMProps Temp–table and Object Properties" section.- The
viewer.w
file includes onlyviewer.i
.- The
viewer.i
file includesdatavis.i
, because a SmartDataViewer is a data visualization object. It also includesviewprop.i
, which includes the prototype include fileviewprto.i
.- The
datavis.i
file includesvisual.i
because a SmartDataViewer is a visual object. It also includesdvisprop.i
, which includesdvisprto.i
.- The
visual.i
file includessmart.i
, because a visual object is a SmartObject. Thevisual.i
file also includesvisprop.i
, which includesvisprto.i
.- The
smart.i
file includes onlysmrtprop.i
(which includessmrtprto.i
).Note that when SmartObject code is preprocessed, the preprocessors limit the full expansion of the include files to exactly one branch of the class hierarchy, to avoid duplication of the SmartObject code.
Each SmartObject type uses a different part of the class hierarchy (different branches), but the The tree for any SmartObject type always ends with
smart.i
.Figure 5–3 expands on Figure 5–2 to illustrate how super procedures are started.
Figure 5–3: Super Procedure Schematic for SmartDataViewer
![]()
In Figure 5–3, note the following:
- The
smart.i
file startssmart.p
, if it is not already running, and adds it as a super procedure for the SmartDataViewer. Thesmart.p
file should be the top-level super procedure for all SmartObjects.- The
visual.i
file startsvisual.p
, if it is not already running, and adds it as a super procedure for the SmartDataViewer.- The
datavis.i
file then startsdatavis.p
, if it is not already running, and adds it as a super procedure for the SmartDataViewer.- The
viewer.i
file startsviewer.p
, if it is not already running, and adds it as a super procedure.NOTE: The object’s own super procedure must always be added last. This is because super procedures are searched in last-in, first-out (LIFO) order, so the interpreter searches inviewer.p
first for needed routines and insmart.p
last. This ensures that more general behavior is executed last and more object-specific behavior is executed first.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |