Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
CPreferences.h
/* |
Implements a preference file and resource io therein. Also handy |
for resource io in any LFile. |
Created 29 Jan 1996 by EGH |
Copyright © 1996, Apple Computer, Inc. All rights reserved. |
*/ |
#include <LFile.h> |
class CPreferences |
{ |
public: |
CPreferences(); |
CPreferences( |
LFile *inFile); |
CPreferences( |
OSType inFileType, |
OSType inFileCreator, |
StringPtr inFileNameP); |
virtual ~CPreferences(); |
void FindOrCreatePreferencesFile( |
OSType inFileType, |
OSType inFileCreator, |
StringPtr inFileNameP); |
Handle GetPreferenceResource( |
OSType inResType, |
ResIDT inResID); |
void SavePreferenceResource( |
OSType inResType, |
ResIDT inResID, |
Handle inPrefH); |
private: |
LFile *mFile; |
Boolean mOwnsFile; |
}; |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14