AM2 Documentation

Chapter 6 Wrapped Class Reference


Wrapped classes are C++ classes in AM2 that are visible in the ADL (see Section 3.23, "Wrapped Classes" page 44). They provide an interface to the AM2 library in the ADL. In the sections that follow, we describe the following seven types of system-defined wrapped classes, as well as list their methods, members, and activities:

You can use wrapped classes as is, or create a subclass to add additional features. This chapter describes the system-defined wrapped classes that come with the ADL. To learn how to create your own wrapped classes see Section Appendix B, "Creating Wrapped Classes" page 271.

By convention, wrapped classes possess names that start with two capital letters specifying the module, followed by one or more concatenated words, all but the first of which are capitalized. For instance, XFmenuCommand is the wrapped class used to implement menu items that initiate commands. The initial two letters, "XF", indicate that this wrapped class belongs to the user interface module along with other classes like XFbutton and XFtextField. The exception to this convention are the wrapped classes implementing notification request objects (Nro, MouseNro and TimerNro) and the abstract wrapped classes ActivityManager and AttributeManager.

Nothing prevents ADL programmers from following a similar convention in developing his or her own classes. In general, preexisting module prefixes should be avoided, except in instances where the developer is prototyping an ADL class that he or she intends to replace with a similarly named wrapped class at a later date.

The important features of a wrapped class are divided into four areas:

Constructors are special methods which are distinguished by starting with the keyword upon rather than the keyword on. Use constructors only when creating instances of objects; if no default constructor is listed for a class, then you must specify one of the constructors listed when creating the instance of the class. We do not list the Init method and the Destroy method because you should never call them directly.

In the lists of members, the Access column indicates whether you can set the attribute at creation time (C), whether you can also set it after creation (S), and whether you can read it (G). In both the lists of attributes and activities, names in gray indicate features that are not yet implemented.

6.1 - Activities and Application Services
6.2 - User Interface
6.3 - Multimedia
6.4 - Input/Output
6.5 - External Processes
6.6 - Database
6.7 - Data Structures

AM2 Documentation - 19 NOV 1996

Generated with Harlequin WebMaker