casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OutputDestinationChecker.h
Go to the documentation of this file.
1 //# Copyright (C) 1998,1999,2000,2001,2003
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This program is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU General Public License as published by the Free
6 //# Software Foundation; either version 2 of the License, or (at your option)
7 //# any later version.
8 //#
9 //# This program is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 //# more details.
13 //#
14 //# You should have received a copy of the GNU General Public License along
15 //# with this program; if not, write to the Free Software Foundation, Inc.,
16 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef IMAGES_OUTPUTDESTINATIONCHECKER_H
27 #define IMAGES_OUTPUTDESTINATIONCHECKER_H
28 
29 #include <casa/aips.h>
30 #include <casa/namespace.h>
31 
32 #include <casa/BasicSL/String.h>
33 
34 #include <casa/Logging/LogIO.h>
35 
36 #include <vector>
37 
38 namespace casa {
39 
41  // <summary>
42  // </summary>
43 
44  // <reviewed reviewer="" date="" tests="" demos="">
45  // </reviewed>
46 
47  // <prerequisite>
48  // </prerequisite>
49 
50  // <etymology>
51  // </etymology>
52 
53  // <synopsis>
54  // </synopsis>
55 
56 public:
57 
58  // struct for checking output file writability
59  struct OutputStruct {
60  // label used for messages, eg "residual image", "estmates file"
62  // pointer to the output name
64  // is this file required to be written, or can the task continue if it cannot be?
66  // If a file by the same name already exists, will the task allow it to be overwritten?
68  };
69 
71 
72  //Destructor
74 
75  static void checkOutputs(std::vector<OutputStruct> *const output, casacore::LogIO& log);
76 
77  static void checkOutput(OutputStruct& output, casacore::LogIO& log);
78 
79  // Get the number of channels that have been selected. The process() method must
80  // be called prior to calling this method or an exception is thrown.
82 
83 };
84 
85 }
86 
87 #endif /* IMAGES_IMAGEINPUTPROCESSOR_H */
LatticeExprNode log(const LatticeExprNode &expr)
casacore::Bool required
is this file required to be written, or can the task continue if it cannot be?
static void checkOutputs(std::vector< OutputStruct > *const output, casacore::LogIO &log)
casacore::Bool replaceable
If a file by the same name already exists, will the task allow it to be overwritten?
ostream-like interface to creating log messages.
Definition: LogIO.h:167
casacore::uInt nSelectedChannels() const
Get the number of channels that have been selected.
struct for checking output file writability
casacore::String label
label used for messages, eg &quot;residual image&quot;, &quot;estmates file&quot;
casacore::String * outputFile
pointer to the output name
static void checkOutput(OutputStruct &output, casacore::LogIO &log)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
~OutputDestinationChecker()
Destructor.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
unsigned int uInt
Definition: aipstype.h:51