Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Persistant Class Reference

Base class for objects that need to maintain persistant data. More...

Inheritance diagram for CP_Persistant:

CP_Document_Base CP_Document< UNDO_POLICY, PRINT_POLICY > List of all members.

Public Member Functions

Constructor / Destructor
virtual ~CP_Persistant ()
 Destructor.
Savinng
virtual bool HandleSave (const CP_FileSystemSpec &inFileSpec, FourCharCode inCreator, FourCharCode inType, const CP_String &inFileExtension, bool inReplaceFile)

Protected Member Functions

Constructor / Destructor
 CP_Persistant ()
 Constructor.

Protected Attributes

CP_FileSystemSpec fFileSpec
bool fDirty

Detailed Description

This class is used as a base class for objects that need to maintain some data in a persistant state such as documents. You can use with the associated CP_PersistantWriter class to write the data out.


Constructor & Destructor Documentation

CP_Persistant::~CP_Persistant  )  [virtual]
 

Destructor.

CPLAT_Begin_Namespace_CPLAT CP_Persistant::CP_Persistant  )  [protected]
 

Constructor.


Member Function Documentation

virtual bool CP_Persistant::IsDirty  )  [virtual]
 

virtual void CP_Persistant::SetDirty bool  inIsDirty  )  [virtual]
 

bool CP_Persistant::HandleSave const CP_FileSystemSpec inFileSpec,
FourCharCode  inCreator,
FourCharCode  inType,
const CP_String inFileExtension,
bool  inReplaceFile
[virtual]
 

Called when the user is asked to save a file that has been specified, or SaveAs is choosen from the file menu with no file yet specified. Default is to return false.

Parameters:
inFileSpec CP_FileSystemSpec that specifies the name and location of the file.
inCreator The creator code for the file holding the data.
inType The file type of the file holding the data.
inFileExtension Any file extension to add to the files name.
inReplaceFile If true, replace any existing file with the same name.
Returns:
bool Return true if the operation was successful.

Reimplemented in CP_Document_Base.

virtual void CP_Persistant::WritePersistantData CP_File ,
CP_PersistantWriter
[virtual]
 

Method call by our persistant writer to write out the data from the CP_Persistant class.

Parameters:
inFile The CP_File that we are writing to.
inWriter The CP_PersistantWriter that is currently writing the persistant data.
Returns:
void

void CP_Persistant::GetFileTypeInfo const CP_FileSystemSpec inFileSpec,
FourCharCode inOutCreator,
FourCharCode inOutType,
CP_String inOutFileExtension
[protected, virtual]
 


Member Data Documentation

CP_FileSystemSpec CP_Persistant::fFileSpec [protected]
 

bool CP_Persistant::fDirty [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:21:54 2005 for CPLAT_MacOS by  doxygen 1.4.0