Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LPeriodical Class Reference
["Features"]

#include <LPeriodical.h>

Collaboration diagram for LPeriodical:

Collaboration graph
[legend]
List of all members.

Detailed Description

Base for classes that want a regular callback.

On Mac, DevoteTimeToIdlers is called by LApplication on every null event and DevoteTimeToRepeaters by LApplication after every event, to iterate the static queues. (LApplication::ProcessNextEvent calls LEventDispatcher::UseIdleTime which then calls DevoteTimeToIdlers).

In PP2MFC we use an override of CWinApp::OnIdle to trigger these calls.

Todo:
Implement RepeaterQueues

Implement Timers


Public Methods

 LPeriodical ()
virtual ~LPeriodical ()
virtual void StartIdling ()
virtual void StopIdling ()
virtual void StartRepeating ()
virtual void StopRepeating ()
bool IsIdling () const
virtual void SpendTime (const EventRecord &inMacEvent)=0
 Required override to perform callback action.


Static Public Methods

void DevoteTimeToIdlers (const EventRecord &inMacEvent)
void DevoteTimeToRepeaters (const EventRecord &inMacEvent)
void DeleteIdlerAndRepeaterQueues ()
 Cleanup the queues but require application to delete the objects they point to.

void DeleteAllIdlers ()
void DeleteAllRepeaters ()

Static Protected Attributes

TArray< LPeriodical * > * sIdlerQ
TArray< LPeriodical * > * sRepeaterQ


Constructor & Destructor Documentation

LPeriodical::LPeriodical  
 

LPeriodical::~LPeriodical   [virtual]
 


Member Function Documentation

void LPeriodical::DeleteAllIdlers   [static]
 

void LPeriodical::DeleteAllRepeaters   [static]
 

void LPeriodical::DeleteIdlerAndRepeaterQueues   [static]
 

Cleanup the queues but require application to delete the objects they point to.

Applications may wish to make use of our convenient DeleteAllIdlers and DeleteAllRepeaters methods.

Unlike the casual attitude in the PowerPlant comments, it is not just a matter of waiting for the application cleanup in the system heap - many Windows programmers are contractually obligated to pass zero-leak tests. See p2mApp::~p2mApp

Note:
Clears sIdlerQ and sRepeaterQ so is safe to call more than once.

void LPeriodical::DevoteTimeToIdlers const EventRecord   inMacEvent [static]
 

void LPeriodical::DevoteTimeToRepeaters const EventRecord   inMacEvent [static]
 

bool LPeriodical::IsIdling   const
 

virtual void LPeriodical::SpendTime const EventRecord   inMacEvent [pure virtual]
 

Required override to perform callback action.

void LPeriodical::StartIdling   [virtual]
 

void LPeriodical::StartRepeating   [virtual]
 

void LPeriodical::StopIdling   [virtual]
 

void LPeriodical::StopRepeating   [virtual]
 


Member Data Documentation

TArray< LPeriodical * > * LPeriodical::sIdlerQ [static, protected]
 

TArray< LPeriodical * > * LPeriodical::sRepeaterQ [static, protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Jul 22 18:21:12 2002 for PP2MFC by doxygen1.2.17