campo-sirio/al/cpp_yld.os2/storos2.cpp
alex 714dd74636 Archive Library versione 2.00
git-svn-id: svn://10.65.10.50/trunk@5350 c028cbd2-c16b-5b4b-a496-9718f37d4682
1997-10-09 16:09:54 +00:00

66 lines
1.4 KiB
C++
Executable File

//
// STOROS2.CPP
//
// Source file for ArchiveLib 2.0
//
// Copyright (c) Greenleaf Software, Inc. 1994-1996
// All Rights Reserved
//
// CONTENTS
//
// ALStorage::YieldTime()
//
// REVISION HISTORY
//
// February 14, 1996 2.0A : New release
#include "arclib.h"
#if !defined( AL_IBM )
#pragma hdrstop
#endif
//
// void ALStorage::YieldTime()
//
// ARGUMENTS:
//
// None.
//
// RETURNS
//
// Nothing.
//
// DESCRIPTION
//
// This function has two important things to do. It gets called
// at a few different points in the process of reading or writing data
// from storage objects. During normal reading and writing, it
// will get called every time the buffer is loaded or flushed.
//
// Under OS/2, I try to give some time back to the system by
// calling the WinPeekMsg() function. Does it do any good?
// Who knows???
//
// The second important function is that of calling the monitor function.
// The user interface elements need to be updated regularly, and this
// is done via this call.
//
// SEE ALSO
//
// ALStorage::LoadBuffer(), ALStorage::FlushBuffer()
//
// REVISION HISTORY
//
// February 14, 1996 2.0A : New release
//
void AL_PROTO ALStorage::YieldTime()
{
if ( mpMonitor )
mpMonitor->Progress( Tell(), *this );
QMSG qmsg;
while ( WinPeekMsg( NULLHANDLE, &qmsg, NULLHANDLE, 0, 0, PM_REMOVE ) )
WinDispatchMsg( NULLHANDLE, &qmsg );
}