The application framework classes provide the system-specific structure for the application. In an MFC application these classes include the application (
) as well as the document/view architecture classes. CPhishApp
The job of the framework classes is to encapsulate the framework-specific requirements and also to provide an interface to the services provided by the application framework. When the application is ported to a different environment, these will be the only classes that change.
In the case of Phish, we implemented a dialog-based window for the primary view (
). There are additional dialogs, including a property page for managing the various species (CPhishDlg
). In addition, there are classes to represent the device context, the display window, as well as icons and images.CSpeciesManagerPage
To provide for cross-platform portability, many of the platform-specific classes are concrete implementations of platform-independent abstract base classes. For example,
, CDevice
, CDisplay
are derived from CImage
, PADevice
and PADisplay
.PAImage
The principal utility classes provide logging and debugging assistance. These include
, Function
and FunctionTimer
. There are also utility classes for memory management, including DebugStream
and RCBody
.RCHandle
The remaining classes are the business objects, also known as model classes. These include
, PAnimal
and PLocation
, as well as those classes representing the Phish tank (PSpecies
) and the simulator (PPhishTank
). Also included in this category are the classes that encapsulate policy and rules, such as PSimulator
.PResolver