JPEGProgressBySelf Class Reference

Provides progress update callback for the IJG library JPEG Filters using a self-contained Progress object. More...

#include <jpgprgrs.h>

Inheritance diagram for JPEGProgressBySelf:

JPEGProgressMonitor List of all members.

Public Member Functions

 JPEGProgressBySelf (libJPEG::j_decompress_ptr cinfo, const StringBase &BarString)
 ~JPEGProgressBySelf ()
 Destructor - stops the progress bar Notes: Derived classes should call this subsequent to any specialized destruction code of their own.

Protected Member Functions

virtual void OnUpdate ()
 Called by JPEGProgressMonitor::Update() to provide feedback on the filter progress. Derived classes should provide an implementation for this. JPEGProgressBySelf calls the contained Progress::Update member with the percentage done.

Protected Attributes

String_64 m_BarString
Progressm_pProgressBar
UINT32 m_uLastPercentDone

Detailed Description

Provides progress update callback for the IJG library JPEG Filters using a self-contained Progress object.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/08/96

Definition at line 149 of file jpgprgrs.h.


Constructor & Destructor Documentation

JPEGProgressBySelf::JPEGProgressBySelf libJPEG::j_decompress_ptr  cinfo,
const StringBase BarString
 

JPEGProgressBySelf::~JPEGProgressBySelf  ) 
 

Destructor - stops the progress bar Notes: Derived classes should call this subsequent to any specialized destruction code of their own.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
02/08/96

Definition at line 220 of file jpgprgrs.cpp.

00221 {
00222     // If started, then stop then progress bar
00223     if (m_pProgressBar != NULL)
00224     {
00225         delete m_pProgressBar;
00226         m_pProgressBar = NULL;
00227     }
00228 }


Member Function Documentation

void JPEGProgressBySelf::OnUpdate  )  [protected, virtual]
 

Called by JPEGProgressMonitor::Update() to provide feedback on the filter progress. Derived classes should provide an implementation for this. JPEGProgressBySelf calls the contained Progress::Update member with the percentage done.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
02/08/96

Implements JPEGProgressMonitor.

Definition at line 243 of file jpgprgrs.cpp.

00244 {
00245     /*
00246         Fraction done =
00247 
00248             completed_passes + (pass_counter/pass_limit)
00249             --------------------------------------------
00250                         total_passes
00251     */
00252     UINT32 PercentDone = (UINT32) (100L * completed_passes + (100L * pass_counter) / pass_limit)
00253                             / total_passes;
00254 
00255     // Update the progress count, if required
00256     // but don't bother if the user aborted
00257     if (PercentDone != m_uLastPercentDone && m_bContinueOp)
00258     {
00259         m_bContinueOp = m_pProgressBar->Update(PercentDone);
00260         m_uLastPercentDone = PercentDone;
00261     }
00262 }


Member Data Documentation

String_64 JPEGProgressBySelf::m_BarString [protected]
 

Definition at line 160 of file jpgprgrs.h.

Progress* JPEGProgressBySelf::m_pProgressBar [protected]
 

Definition at line 161 of file jpgprgrs.h.

UINT32 JPEGProgressBySelf::m_uLastPercentDone [protected]
 

Definition at line 162 of file jpgprgrs.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:38 2007 for Camelot by  doxygen 1.4.4