Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1LatticeProgress.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 22:39:32 2011
Кодировка:

Поисковые слова: regolith
casacore: casa::LatticeProgress Class Reference
Public Member Functions | Protected Member Functions | Private Attributes

casa::LatticeProgress Class Reference
[Lattices_module]

Abstract base class to monitor progress in lattice operations. More...

#include <LatticeProgress.h>

Inheritance diagram for casa::LatticeProgress:
casa::ImageMomentsProgress casa::LatticeHistProgress casa::LattStatsProgress

List of all members.

Public Member Functions

 LatticeProgress ()
virtual ~LatticeProgress ()
void init (uInt expectedNsteps)
 Initialize the process.
virtual void nstepsDone (uInt nsteps)
 Tell the number of steps done so far.
virtual void done ()
 The process has ended.
uInt expectedNsteps () const
 Recovers the expected number of total steps.

Protected Member Functions

virtual void initDerived ()
 Let a derived class initialize itself.

Private Attributes

uInt itsExpectedNsteps

Detailed Description

Abstract base class to monitor progress in lattice operations.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Synopsis

This is an abstract base class for classes to monitor the progress of an operation on a Lattice. The default implementation offered by this class does nothing. However, a derived class could show the progress using for example a ProgressMeter . A derived class should override the virtual functions from this class.

The user of the LatticeProgress object should first call function init with the total number of steps that are to be done. Thereafter, after each step has been executed, function nstepsDone should be called after each step. Finally, function done should be called.

Example

Motivation

Since operations on Lattices can take a while, it can be useful to show the progress. However, making module Lattices dependent on the class ProgressMeter sounded bad. This abstract class serves as a bridge between the Lattice module and the ProgressMeter class (or any other class showing the progress).

Definition at line 84 of file LatticeProgress.h.


Constructor & Destructor Documentation

casa::LatticeProgress::LatticeProgress (  )  [inline]

Definition at line 87 of file LatticeProgress.h.

virtual casa::LatticeProgress::~LatticeProgress (  )  [virtual]

Member Function Documentation

virtual void casa::LatticeProgress::done (  )  [virtual]

The process has ended.

Reimplemented in casa::ImageMomentsProgress, casa::LatticeHistProgress, and casa::LattStatsProgress.

uInt casa::LatticeProgress::expectedNsteps (  )  const [inline]

Recovers the expected number of total steps.

Definition at line 106 of file LatticeProgress.h.

References itsExpectedNsteps.

void casa::LatticeProgress::init ( uInt  expectedNsteps  ) 

Initialize the process.

It sets the expected number of steps and calls initDerived, so a derived class can initialize itself.

virtual void casa::LatticeProgress::initDerived (  )  [protected, virtual]

Let a derived class initialize itself.

This function is called by init. The derived class should create the ProgressMeter in here.

Reimplemented in casa::ImageMomentsProgress, casa::LatticeHistProgress, and casa::LattStatsProgress.

virtual void casa::LatticeProgress::nstepsDone ( uInt  nsteps  )  [virtual]

Tell the number of steps done so far.

The default implementation does nothing. A derived class should call the ProgressMeter function update

Reimplemented in casa::ImageMomentsProgress, casa::LatticeHistProgress, and casa::LattStatsProgress.


Member Data Documentation

Definition at line 117 of file LatticeProgress.h.

Referenced by expectedNsteps().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines