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$
00027 
00028 #ifndef LATTICES_LATTSTATSPROGRESS_H
00029 #define LATTICES_LATTSTATSPROGRESS_H
00030 
00031 
00032 //# Includes
00033 #include <casacore/casa/aips.h>
00034 #include <casacore/lattices/LatticeMath/LatticeProgress.h>
00035 #include <casacore/casa/Utilities/CountedPtr.h>
00036 
00037 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00038 
00039 class ProgressMeter;
00040 
00041 // <summary> Provides a progress meter for the <src>LatticeStatistics</src> class </summary>
00042 // <use visibility=export>
00043 //
00044 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00045 // </reviewed>
00046 //
00047 // <prerequisite>
00048 //   <li> <linkto module=Lattices>LatticeProgress</linkto>
00049 // </prerequisite>
00050 //
00051 // <etymology>
00052 // Display a progress meter for the class  <src>LatticeStatistics</src>
00053 // </etymology>
00054 //
00055 // <synopsis>
00056 //   Progress meters can be displayed by the <src>LatticeApply</src> class
00057 //   which is used by <src>LatticeStatistics</src> in order to optimally iterate
00058 //   through the lattice.  To do this,  one must derive a
00059 //   class from <src>LatticeProgress</src>. <src>LatticeApply</src> calls 
00060 //   methods declared in <src>LatticeProgress</src> and  implemented in 
00061 //   the derived class.
00062 // </synopsis>
00063 // 
00064 // <motivation>
00065 //  I like progress meters !
00066 // </motivation>
00067 // 
00068 // <todo asof="1998/01/10">
00069 // </todo>
00070  
00071 
00072 class LattStatsProgress : public LatticeProgress
00073 {
00074 public:
00075 
00076         // Constructor makes a null object
00077     LattStatsProgress() : _meter(), _currentStep(0) {};
00078 
00079     // Destructor deletes the ProgressMeter pointer
00080     virtual ~LattStatsProgress();
00081 
00082     // increment the current step (postfix version)
00083     void operator++(Int);
00084 
00085     // Initialize this object.  Here we create the ProgressMeter
00086     // This function is called by the <src>init</src> in LatticeProgress
00087     virtual void initDerived();
00088 
00089     // Tell the number of steps done so far.
00090     virtual void nstepsDone (uInt nsteps);
00091 
00092     // The process has ended so clean things up.
00093     virtual void done();
00094 
00095 private:
00096     CountedPtr<ProgressMeter> _meter;
00097     uInt _currentStep;
00098 };
00099 
00100 
00101 
00102 
00103 } //# NAMESPACE CASACORE - END
00104 
00105 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1