Page 1 of 1

CPreferences 1.0 - Class for CodeWarrior PowerPlant

Posted: July 6th, 1994, 9:00 am
by Info-Mac
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.