Important: The information in this document is obsolete and should not be used for new development.
Organization of MacApp Source Code
The source code in the MacApp class library is written almost entirely in C++. Related classes and support code are grouped by function and stored in standard C++ header files (such asUAppleEvents.h
) and implementation files (such asUAppleEvents.cp
). Largely for historical reasons, these header and implementation pairs are referred to as units, and many start with the letterU
. (For more information on MacApp file-naming conventions, see Table A-1, beginning on page 676.)A unit typically contains one or more related classes that perform the central function of the unit, along with support classes such as iterator classes and command classes. For example, the UDocument unit
Units typically contain additional type definitions, constant declarations, external and static variables declarations, and many other constructs.
- defines the
TDocument
class- defines command classes (such as
TSaveDocCommand
) that operate on document objects- defines the
CWindowIterator
class, which is used by a document object to iterate over its list of window objects
Many units are automatically included in every MacApp application, while others are optional--your application includes them only if it needs the function provided by the unit. For example, MacApp's printing capability is optional. To use it, your application must include the UPrinting unit.
Appendix C lists MacApp's units and provides a brief description of the function provided by each unit.