WvStreams
|
00001 /* -*- Mode: C++ -*- 00002 * Worldvisions Weaver Software: 00003 * Copyright (C) 1997-2004 Net Integration Technologies, Inc. 00004 * 00005 * Globbing support (ie. filename wildcards) through WvRegex 00006 */ 00007 #ifndef __WVGLOB_H 00008 #define __WVGLOB_H 00009 00010 #include "wvregex.h" 00011 00015 class WvGlob : public WvRegex 00016 { 00017 00018 private: 00019 00020 static const bool normal_quit_chars[256]; 00021 static const bool brace_quit_chars[256]; 00022 00023 static WvString glob_to_regex(const char *src, size_t &src_used, 00024 char *dst, size_t &dst_used, const bool quit_chars[256]); 00025 00026 public: 00027 00032 WvGlob(); 00036 WvGlob(WvStringParm glob); 00037 00045 bool set(WvStringParm glob); 00046 00051 static WvString glob_to_regex(WvStringParm glob, WvString *errstr); 00052 }; 00053 00054 #endif // __WVGLOB_H