casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
LattStatsProgress.h
Go to the documentation of this file.
00001 //# LattStatsProgress.h: progress meter for LatticeStatistics
00002 //# Copyright (C) 1996,1997,1998,1999
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: LattStatsProgress.h 18093 2004-11-30 17:51:10Z ddebonis $
00027 
00028 #ifndef LATTICES_LATTSTATSPROGRESS_H
00029 #define LATTICES_LATTSTATSPROGRESS_H
00030 
00031 
00032 //# Includes
00033 #include <casa/aips.h>
00034 #include <lattices/Lattices/LatticeProgress.h>
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 class ProgressMeter;
00039 
00040 
00041 
00042 // <summary> Provides a progress meter for the <src>LatticeStatistics</src> class </summary>
00043 // <use visibility=export>
00044 //
00045 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00046 // </reviewed>
00047 //
00048 // <prerequisite>
00049 //   <li> <linkto module=Lattices>LatticeProgress</linkto>
00050 // </prerequisite>
00051 //
00052 // <etymology>
00053 // Display a progress meter for the class  <src>LatticeStatistics</src>
00054 // </etymology>
00055 //
00056 // <synopsis>
00057 //   Progress meters can be displayed by the <src>LatticeApply</src> class
00058 //   which is used by <src>LatticeStatistics</src> in order to optimally iterate
00059 //   through the lattice.  To do this,  one must derive a
00060 //   class from <src>LatticeProgress</src>. <src>LatticeApply</src> calls 
00061 //   methods declared in <src>LatticeProgress</src> and  implemented in 
00062 //   the derived class.
00063 // </synopsis>
00064 // 
00065 // <motivation>
00066 //  I like progress meters !
00067 // </motivation>
00068 // 
00069 // <todo asof="1998/01/10">
00070 // </todo>
00071  
00072 
00073 class LattStatsProgress : public LatticeProgress
00074 {
00075 public:
00076 
00077 // Constructor makes a null object
00078     LattStatsProgress() : itsMeter(0) {};
00079 
00080 // Destructor deletes the ProgressMeter pointer
00081     virtual ~LattStatsProgress();
00082 
00083 // Initialize this object.  Here we create the ProgressMeter
00084 // This function is called by the <src>init</src> in LatticeProgress
00085     virtual void initDerived();
00086 
00087 // Tell the number of steps done so far.
00088     virtual void nstepsDone (uInt nsteps);
00089 
00090 // The process has ended so clean things up.
00091     virtual void done();
00092 
00093 private:
00094     ProgressMeter* itsMeter;
00095 };
00096 
00097 
00098 
00099 
00100 } //# NAMESPACE CASA - END
00101 
00102 #endif