CPreferences 1.0 - Class for CodeWarrior PowerPlant

Source in C, Pascal, etc. Note: apps that come with source should be included here as well as the appropriate software directory.
User avatar
Info-Mac
Administrator
Posts:13716
Joined:December 21st, 1988, 11:00 am
CPreferences 1.0 - Class for CodeWarrior PowerPlant

Post by Info-Mac » July 6th, 1994, 9:00 am

Download: http://archive.info-mac.org/dev/src/cpr ... 10-cpp.hqx

CPreference Class 1.0
---------------------

by Richard A. Bray
President
Compu-Phobic, Inc.
AOL: CompuFobic

I (that's me, [email protected]) am *NOT* the author of this class. This
is a simple C++ class for implementing preference files with
CodeWarrior's PowerPlant class library. Here's an exerpt from the docs:

This class was created to simplify the creation of preference
files for an application.

The object is very general and simple to use.

When MW C++ supports templates, I will rewrite the class to support
them. This will allow an easy way to create multiple preference files
for applications that need them.

Use of CPreferences:

1. Add "CPreferences* mPrefs" to your application class.

2. Add this line to your constructor.
mPrefs = new CPreferences('CPI6', "\pTextStreamer 3.0 Prefs");
// 'CPI6' is the creator of the file.
// "\pTextStreamer 3.0 Prefs" is the name of the file.

3. Add this line to your destructor
delete mPrefs;

4. In order to access the data in your data structure, you will
need to add accessor functions to CPreferences.


In the next version I will also include methods for using a Preferences
dialog.
Post Reply