LCleanupTask is a PowerPlant class that is an abstract base class
for any operation which needs to be performed at application shutdown
time. It patches ExitToShell() to ensure that tasks are performed even if the user force-quits
application.
Methods :
The methods in this class are:
Data Members:
The data members in this class are:
Operation:
This class may be used as a mix-in to ensure that an object cleans up after itself when the application quits.
Source files:
See also:
Purpose:
The constructor creates the object. Don't use the copy contructor.
Access :
Prototype:
LCleanupTask();
LCleanupTask(LCleanupTask&); /* copy ctor */Parameters:
Purpose:
The destructor destroys the LCleanupTask object.
Access :
Prototype:
~LCleanupTask();
Purpose:
Should be called only once whenever the application quits, either by the normal Quit command exit or by a user abort. This method runs all of the cleanup tasks and removes them from the list.
Access :
Prototype:
void CleanUpAtExit();Parameters:
Return:
Purpose:
Override to perform any task that must be performed before the app quits.
Access :
Prototype:
void DoCleanup();Parameters:
Return:
Purpose:
Access :
Prototype:
void ETSPatch();Parameters:
Return:
Purpose:
Access :
Prototype:
LInterruptSafeList* sCleanupTaskList;
Purpose:
Temporary storage for the ExitToShell() routine.
Access :
Prototype:
UniversalProcPtr sOldETSRoutine;
Purpose:
The pointer to the new ExitToShell() routine.
Access :
Prototype:
UniversalProcPtr sNewETSRoutine;