casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PlotMSIterParam.h
Go to the documentation of this file.
00001 //# PlotMSIterateParam.h: Iteration parameters container
00002 //# Copyright (C) 2009
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 #ifndef PLOTMSITERPARAM_H_
00028 #define PLOTMSITERPARAM_H_
00029 
00030 #include <plotms/PlotMS/PlotMSConstants.h>
00031 
00032 #include <casa/namespace.h>
00033 
00034 namespace casa {
00035 
00036 // Specifies iteration parameters for plotms
00037 class PlotMSIterParam {
00038 public:
00039   // Static //
00040 
00041   // None
00042   
00043   // Non-Static //
00044     
00045   // Constructor, which uses default values.
00046   PlotMSIterParam();
00047     
00048   // Destructor.
00049   ~PlotMSIterParam();
00050     
00051     
00052   // Converts this object to/from a record.  Each field will have a key that
00053   // is its enum name
00054   // <group>
00055   void fromRecord(const RecordInterface& record);
00056   Record toRecord() const;
00057   // </group>
00058 
00059 
00060   // Convenience methods for returning the standard field values.
00061   // <group>
00062   PMS::Axis iterAxis() const { return iterAxis_; };
00063   String iterAxisStr() const { return PMS::axis(iterAxis_); };
00064   Bool xSelfScale() const { return xSelfScale_; };
00065   Bool ySelfScale() const { return ySelfScale_; };
00066   Int Nx() const { return Nx_;};
00067   Int Ny() const { return Ny_;};
00068   // </group>
00069   
00070   
00071   // Convenience methods for setting the standard field values.
00072   // <group>
00073   void setIterAxis(PMS::Axis iterAxis) { iterAxis_ = iterAxis; };
00074   void setIterAxis(String iterAxisStr) { iterAxis_ = PMS::axis(iterAxisStr=="" ? "None" : iterAxisStr); };
00075   void setXSelfScale(Bool xSelfScale) { xSelfScale_ = xSelfScale; };
00076   void setYSelfScale(Bool ySelfScale) { ySelfScale_ = ySelfScale; };
00077   void setNx(Int nx) { Nx_ = max(nx,1); };
00078   void setNy(Int ny) { Ny_ = max(ny,1); };
00079   // </group>
00080   
00081   
00082   // Equality operators.
00083   // <group>
00084   bool operator==(const PlotMSIterParam& other) const;
00085   bool operator!=(const PlotMSIterParam& other) const {
00086     return !(operator==(other)); }
00087   // </group>
00088 
00089   // Print out a summary
00090   String summary() const;
00091 
00092   // Sets the default values.
00093   void setDefaults();
00094   
00095 private:
00096 
00097   // The Iteration axis
00098   PMS::Axis iterAxis_;
00099 
00100   // Self-scale the X and Y axes
00101   Bool xSelfScale_, ySelfScale_;
00102 
00103   // The number of plots in X and Y
00104   Int Nx_,Ny_;
00105 
00106     
00107 };
00108 
00109 }
00110 
00111 #endif /* PLOTMSITERPARAM_H_ */