casa
$Rev:20696$
|
00001 //# VLAProjectFilter.h: 00002 //# Copyright (C) 1999,2000 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 //# 00027 //# $Id$ 00028 00029 #ifndef NRAO_VLAPROJECTFILTER_H 00030 #define NRAO_VLAPROJECTFILTER_H 00031 00032 #include <casa/aips.h> 00033 #include <nrao/VLA/VLAFilter.h> 00034 #include <casa/BasicSL/String.h> 00035 00036 #include <casa/namespace.h> 00037 class VLALogicalRecord; 00038 00039 // <summary> 00040 // </summary> 00041 00042 // <use visibility=export> 00043 00044 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00045 // </reviewed> 00046 00047 // <prerequisite> 00048 // <li> SomeClass 00049 // <li> SomeOtherClass 00050 // <li> some concept 00051 // </prerequisite> 00052 // 00053 // <etymology> 00054 // </etymology> 00055 // 00056 // <synopsis> 00057 // </synopsis> 00058 // 00059 // <example> 00060 // </example> 00061 // 00062 // <motivation> 00063 // </motivation> 00064 // 00065 // <templating arg=T> 00066 // <li> 00067 // <li> 00068 // </templating> 00069 // 00070 // <thrown> 00071 // <li> 00072 // <li> 00073 // </thrown> 00074 // 00075 // <todo asof="yyyy/mm/dd"> 00076 // <li> add this feature 00077 // <li> fix this bug 00078 // <li> start discussion of this possible extension 00079 // </todo> 00080 00081 class VLAProjectFilter: public VLAFilter 00082 { 00083 public: 00084 // The default constructor creats a filter that does not filter 00085 // anything. ie., the passThru() function always returns True; 00086 VLAProjectFilter(); 00087 00088 // Creates a filter that filters all records except those with an observing 00089 // id that matches (case insensitive) the specified project name. 00090 VLAProjectFilter(const String& projectName); 00091 00092 // The copy constructor uses copy semantics. 00093 VLAProjectFilter(const VLAProjectFilter& other); 00094 00095 // The destructor is trivial 00096 virtual ~VLAProjectFilter(); 00097 00098 // The assignment operator uses copy semantics. 00099 VLAProjectFilter& operator=(const VLAProjectFilter& other); 00100 00101 // returns True if the supplied record has an observing id that matches (case 00102 // insensitive) the project name specified in the constructor. 00103 virtual Bool passThru(const VLALogicalRecord& record) const; 00104 00105 // Return a pointer to a copy of the VLAProjectFilter object upcast to a 00106 // VLAFilter object. The class that uses this function is responsible for 00107 // deleting the pointer. This is used to implement a virtual copy 00108 // constructor. 00109 virtual VLAFilter* clone() const; 00110 00111 // Function which checks the internal data of this class for correct 00112 // dimensionality and consistant values. Returns True if everything is fine 00113 // otherwise returns False. 00114 virtual Bool ok() const; 00115 00116 private: 00117 String itsProject; 00118 }; 00119 #endif 00120 00121