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
15class WvGlob : public WvRegex
16{
17
18private:
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
26public:
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
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
Definition wvstring.h:94
WvGlob – Unified support for filename globbing. !
Definition wvglob.h:16
bool set(WvStringParm glob)
Replace the current regex to match with a new one.
Definition wvglob.cc:18
WvGlob()
Construct an empty glob object.
Definition wvglob.cc:9
WvRegex – Unified support for regular expressions.
Definition wvregex.h:48
WvString is an implementation of a simple and efficient printable-string class.
Definition wvstring.h:330