casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VLASourceFilter.h
Go to the documentation of this file.
1 //# VLASourceFilter.h:
2 //# Copyright (C) 1999,2000
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: aips2-request@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 //#
27 //# $Id$
28 
29 #ifndef NRAO_VLASOURCEFILTER_H
30 #define NRAO_VLASOURCEFILTER_H
31 
32 #include <casa/aips.h>
33 #include <nrao/VLA/VLAFilter.h>
34 #include <casa/BasicSL/String.h>
35 #include <casa/BasicSL/Constants.h>
36 
37 #include <casa/namespace.h>
38 class VLALogicalRecord;
39 
40 // <summary>
41 // </summary>
42 
43 // <use visibility=export>
44 
45 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
46 // </reviewed>
47 
48 // <prerequisite>
49 // <li> SomeClass
50 // <li> SomeOtherClass
51 // <li> some concept
52 // </prerequisite>
53 //
54 // <etymology>
55 // </etymology>
56 //
57 // <synopsis>
58 // </synopsis>
59 //
60 // <example>
61 // </example>
62 //
63 // <motivation>
64 // </motivation>
65 //
66 // <templating arg=T>
67 // <li>
68 // <li>
69 // </templating>
70 //
71 // <thrown>
72 // <li>
73 // <li>
74 // </thrown>
75 //
76 // <todo asof="yyyy/mm/dd">
77 // <li> add this feature
78 // <li> fix this bug
79 // <li> start discussion of this possible extension
80 // </todo>
81 
83 {
84 public:
85  // The default constructor creats a filter that does not filter
86  // anything. ie., the passThru() function always returns true;
88 
89  // Creates a filter that filters all records except those with a source name
90  // that matches (case insensitive) the specified source name. If a qualifier
91  // is specified (and is not the magic value of INT_MIN), then the qualifier
92  // also has to match.
93  VLASourceFilter(const casacore::String& sourceName, const casacore::Int sourceQual=INT_MIN, const casacore::Bool keepblanks=false);
94 
95  // The copy constructor uses copy semantics.
96  VLASourceFilter(const VLASourceFilter& other);
97 
98  // The destructor is trivial
99  virtual ~VLASourceFilter();
100 
101  // The assignment operator uses copy semantics.
103 
104  // returns true if the supplied record has an observing id that matches (case
105  // insensitive) the source name specified in the constructor.
106  virtual casacore::Bool passThru(const VLALogicalRecord& record) const;
107 
108  // Return a pointer to a copy of the VLASourceFilter object upcast to a
109  // VLAFilter object. The class that uses this function is responsible for
110  // deleting the pointer. This is used to implement a virtual copy
111  // constructor.
112  virtual VLAFilter* clone() const;
113 
114  // casacore::Function which checks the internal data of this class for correct
115  // dimensionality and consistant values. Returns true if everything is fine
116  // otherwise returns false.
117  virtual casacore::Bool ok() const;
118 
119 private:
123 };
124 #endif
125 
126 
int Int
Definition: aipstype.h:50
This class interprets a VLA logical record.
VLASourceFilter & operator=(const VLASourceFilter &other)
The assignment operator uses copy semantics.
casacore::Int itsQual
casacore::String itsSource
VLASourceFilter()
The default constructor creats a filter that does not filter anything.
virtual VLAFilter * clone() const
Return a pointer to a copy of the VLASourceFilter object upcast to a VLAFilter object.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual casacore::Bool ok() const
casacore::Function which checks the internal data of this class for correct dimensionality and consis...
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual ~VLASourceFilter()
The destructor is trivial.
casacore::Bool itsKeepBlanks
virtual casacore::Bool passThru(const VLALogicalRecord &record) const
returns true if the supplied record has an observing id that matches (case insensitive) the source na...