WvStreams
wvglob.h
1 /* -*- Mode: C++ -*-
2  * Worldvisions Weaver Software:
3  * Copyright (C) 1997-2004 Net Integration Technologies, Inc.
4  *
5  * Globbing support (ie. filename wildcards) through WvRegex
6  */
7 #ifndef __WVGLOB_H
8 #define __WVGLOB_H
9 
10 #include "wvregex.h"
11 
15 class WvGlob : public WvRegex
16 {
17 
18 private:
19 
20  static const bool normal_quit_chars[256];
21  static const bool brace_quit_chars[256];
22 
23  static WvString glob_to_regex(const char *src, size_t &src_used,
24  char *dst, size_t &dst_used, const bool quit_chars[256]);
25 
26 public:
27 
32  WvGlob();
36  WvGlob(WvStringParm glob);
37 
45  bool set(WvStringParm glob);
46 
51  static WvString glob_to_regex(WvStringParm glob, WvString *errstr);
52 };
53 
54 #endif // __WVGLOB_H