casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TabPath.h
Go to the documentation of this file.
00001 //# TabPath.h: Search path for table files
00002 //# Copyright (C) 1993,1994,1995
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: TabPath.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $
00027 
00028 #ifndef TABLES_TABPATH_H
00029 #define TABLES_TABPATH_H
00030 
00031 //# Includes
00032 #include <casa/aips.h>
00033 #include <casa/BasicSL/String.h>
00034 #include <casa/Containers/Block.h>
00035 
00036 
00037 namespace casa { //# NAMESPACE CASA - BEGIN
00038 
00039 // <summary>
00040 // Search path for table files
00041 // </summary>
00042 
00043 // <use visibility=local>
00044 
00045 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
00046 // </reviewed>
00047 
00048 // <prerequisite>
00049 // </prerequisite>
00050 
00051 // <synopsis>
00052 // TabPath is the class containing the search path for table files.
00053 // It is used by the TabDesc class to find the directory of a table
00054 // description.
00055 // </synopsis>
00056 
00057 // <todo asof="$DATE:$">
00058 //  <li> This class has to be replaced by a more general path class.
00059 // </todo>
00060 
00061 
00062 class TabPath
00063 {
00064 public:
00065     // Create a table file search path with a .COD{Directory}
00066     // Use default path  ., ~/TabDir
00067     TabPath ();
00068 
00069     // Create a table file search path with given path name.
00070     TabPath (const String&);
00071 
00072     // Remove a table file search path.
00073     ~TabPath ();
00074 
00075     // Find a file in one of the directories.
00076     Bool found (const String&, String&) const;
00077 
00078     // Get the directory name.
00079     const String& dir (uInt dirnr) const;
00080    
00081 private:
00082     Block<String>  tabDir_p;           // file directories
00083     uInt           nrDir_p;            // # directories
00084 };
00085 
00086 
00087 
00088 } //# NAMESPACE CASA - END
00089 
00090 #endif