Info-Mac Archive Downloads: dev/src/ SourceCode

Back to dev/src/ SourceCode

CPreferences 1.0 - Class for CodeWarrior PowerPlant (cpreferences-10-cpp.hqx)

Download cpreferences-10-cpp.hqx (5,600 KB)


Date: Tue, 5 Jul 1994 21:13:02 -0700 (PDT)
From: Spencer Low
Subject: CPreferences 1.0 - Class for CodeWarrior PowerPlant

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

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

I (that's me, spencerl@crl.com) 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.