casacore
Loading...
Searching...
No Matches
LattStatsProgress.h
Go to the documentation of this file.
1// # LattStatsProgress.h: progress meter for LatticeStatistics
2// # Copyright (C) 1996,1997,1998,1999
3// # Associated Universities, Inc. Washington DC, USA.
4// #
5// # This library is free software; you can redistribute it and/or modify it
6// # under the terms of the GNU Library General Public License as published by
7// # the Free Software Foundation; either version 2 of the License, or (at your
8// # option) any later version.
9// #
10// # This library is distributed in the hope that it will be useful, but WITHOUT
11// # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12// # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13// # License for more details.
14// #
15// # You should have received a copy of the GNU Library General Public License
16// # along with this library; if not, write to the Free Software Foundation,
17// # Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18// #
19// # Correspondence concerning AIPS++ should be addressed as follows:
20// # Internet email: casa-feedback@nrao.edu.
21// # Postal address: AIPS++ Project Office
22// # National Radio Astronomy Observatory
23// # 520 Edgemont Road
24// # Charlottesville, VA 22903-2475 USA
25
26#ifndef LATTICES_LATTSTATSPROGRESS_H
27#define LATTICES_LATTSTATSPROGRESS_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/lattices/LatticeMath/LatticeProgress.h>
32#include <memory>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36class ProgressMeter;
37
38// <summary> Provides a progress meter for the <src>LatticeStatistics</src> class </summary>
39// <use visibility=export>
40//
41// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
42// </reviewed>
43//
44// <prerequisite>
45// <li> <linkto module=Lattices>LatticeProgress</linkto>
46// </prerequisite>
47//
48// <etymology>
49// Display a progress meter for the class <src>LatticeStatistics</src>
50// </etymology>
51//
52// <synopsis>
53// Progress meters can be displayed by the <src>LatticeApply</src> class
54// which is used by <src>LatticeStatistics</src> in order to optimally iterate
55// through the lattice. To do this, one must derive a
56// class from <src>LatticeProgress</src>. <src>LatticeApply</src> calls
57// methods declared in <src>LatticeProgress</src> and implemented in
58// the derived class.
59// </synopsis>
60//
61// <motivation>
62// I like progress meters !
63// </motivation>
64//
65// <todo asof="1998/01/10">
66// </todo>
69 public:
70 // Constructor makes a null object
72
73 // Destructor deletes the ProgressMeter pointer
74 virtual ~LattStatsProgress();
75
76 // increment the current step (postfix version)
77 void operator++(Int);
78
79 // Initialize this object. Here we create the ProgressMeter
80 // This function is called by the <src>init</src> in LatticeProgress
81 virtual void initDerived();
82
83 // Tell the number of steps done so far.
84 virtual void nstepsDone(uInt nsteps);
85
86 // The process has ended so clean things up.
87 virtual void done();
88
89 private:
90 std::shared_ptr<ProgressMeter> _meter;
92};
93
94} // namespace casacore
95
96#endif
virtual ~LattStatsProgress()
Destructor deletes the ProgressMeter pointer.
LattStatsProgress()
Constructor makes a null object.
virtual void done()
The process has ended so clean things up.
std::shared_ptr< ProgressMeter > _meter
virtual void nstepsDone(uInt nsteps)
Tell the number of steps done so far.
virtual void initDerived()
Initialize this object.
void operator++(Int)
increment the current step (postfix version)
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
int Int
Definition aipstype.h:48