casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalIter.h
Go to the documentation of this file.
00001 //# CalIter.h: Sequential calibration table iterator
00002 //# Copyright (C) 1996,1997,1998,2001,2002,2003
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 adressed 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 //#
00027 //# $Id$
00028 
00029 #ifndef CALIBRATION_CALITER_H
00030 #define CALIBRATION_CALITER_H
00031 
00032 #include <synthesis/CalTables/CalIterBase.h>
00033 
00034 namespace casa { //# NAMESPACE CASA - BEGIN
00035 
00036 // <summary> 
00037 // CalIter: Sequential calibration table iterator
00038 // </summary>
00039 
00040 // <use visibility=export>
00041 
00042 // <reviewed reviewer="" date="" tests="" demos="">
00043 
00044 // <prerequisite>
00045 //   <li> <linkto class="CalTable">CalTable</linkto> module
00046 //   <li> <linkto class="CalIterBase">CalIterBase</linkto> module
00047 // </prerequisite>
00048 //
00049 // <etymology>
00050 // From "calibration table" and "iterator"
00051 // </etymology>
00052 //
00053 // <synopsis>
00054 // The CalIter class is a sequential calibration table iterator,
00055 // inherited from the abstract base class CalIterBase. 
00056 // </synopsis>
00057 //
00058 // <example>
00059 // <srcblock>
00060 // </srcblock>
00061 // </example>
00062 //
00063 // <motivation>
00064 // Encapsulate sequential calibration table iteration.
00065 // </motivation>
00066 //
00067 // <todo asof="01/08/01">
00068 // (i) Deal with non-standard columns.
00069 // </todo>
00070 
00071 class CalIter : public CalIterBase
00072 {
00073  public:
00074   // Construct from a calibration table without specifying iteration
00075   // indices and intervals. This returns the input calibration table
00076   // in its entirety for each iteration, in the original sort order.
00077   CalIter (CalTable& calTable);
00078 
00079   // Construct from a calibration table, set of iteration indices,
00080   // iteration order and iteration sort option. This returns the 
00081   // input calibration table in its entirety for each iteration, 
00082   // sorted on the specified iteration indices.
00083   CalIter (CalTable& calTable, const Vector<Int>& iterIndices,
00084            Sort::Order order = Sort::Ascending, 
00085            Sort::Option = Sort::HeapSort);
00086 
00087   // Default destructor
00088   virtual ~CalIter();
00089 
00090   // Iterator control
00091   void origin() {};
00092   Bool more() {return True;};
00093 
00094   // Current iteration sub-table
00095   virtual CalTable& subTable();
00096 
00097  protected:
00098   // Prohibit public use of the null constructor, which
00099   // does not produce a usable object.
00100   CalIter() {};
00101 
00102  private:
00103   // Pointer to calibration table
00104   CalTable* calTable_p;
00105 };
00106 
00107 
00108 } //# NAMESPACE CASA - END
00109 
00110 #endif
00111    
00112   
00113 
00114 
00115