• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

acsutilWildcard.h

Go to the documentation of this file.
00001 #ifndef acsutilWildcard_h
00002 #define acsutilWildcard_h
00003 
00004 /*******************************************************************
00005 * ALMA - Atacama Large Millimiter Array
00006 * (c) European Southern Observatory, 2002
00007 * Copyright by ESO (in the framework of the ALMA collaboration)
00008 * and Cosylab 2002, All rights reserved
00009 * 
00010 * This implementation was adpoted from:
00011 *
00012 * Copyright (C) 1996, 1997, 1998, 1999, 2000 Florian Schintke
00013 * 
00014 * This library is free software; you can redistribute it and/or
00015 * modify it under the terms of the GNU Lesser General Public
00016 * License as published by the Free Software Foundation; either
00017 * version 2.1 of the License, or (at your option) any later version.
00018 * 
00019 * This library is distributed in the hope that it will be useful,
00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022 * Lesser General Public License for more details.
00023 * 
00024 * You should have received a copy of the GNU Lesser General Public
00025 * License along with this library; if not, write to the Free Software  
00026 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307  USA
00027 *
00028 * F.Schintke, the author of the original code, has authorized to 
00029 * distribute these files under LGPL License.
00030 *
00031 * "@(#) $Id: acsutilWildcard.h,v 1.17 2012/01/25 16:26:58 acaproni Exp $"
00032 * 
00033 * ----------------------
00034 * Implementation of the UN*X wildcards
00035 * Supported wild-characters: '*', '?'; sets: [a-z], '!' negation
00036 * Examples:
00037 *        '[a-g]l*i?n' matches 'florian'
00038 *        '[!abc]*e' matches 'smile'
00039 *        '[-z] matches 'a'
00040 *
00041 * TODO: java and python translates a wilcard string into a regular expression and then
00042 *       matches the string using regular expresson libraries. With a low priority we should
00043 *       do the same in C++.
00044 *
00045 * 
00046 * who       when      what
00047 * --------  --------  ----------------------------------------------
00048 * gchiozzi 2002-12-05 Added proper GPL licence header
00049 * msekoran  2001/06/20  created
00050 */
00051 
00052 #ifndef __cplusplus
00053 #error This is a C++ include file and cannot be used from plain C
00054 #endif
00055 
00060 #include <acsutil.h>
00061 #include <acsutilExport.h>
00062 
00067 class acsutil_EXPORT Wildcard
00068 {
00069     
00070   public:
00071     
00079     static int wildcardfit (const char *wildcard, const char *test);
00080     
00081   private:
00091     static int set (const char **wildcard, const char **test);
00092     
00099     static int asterisk (const char **wildcard, const char **test);
00100 };
00101 
00102 
00103 #endif   /* acsutilWildcard_h */ 
00104 

Generated on Mon May 4 2015 08:27:42 for ACS-2015.4 C++ API by  doxygen 1.7.0