Boost logo

Boost Users :

From: Rich Johnson (rjohnson_at_[hidden])
Date: 2004-01-15 15:05:16


On Wednesday, January 14, 2004, at 10:32 PM, David Abrahams wrote:

> Rich Johnson <rjohnson_at_[hidden]> writes:
>
>> O.K. I'll do it. But my first task is to get a discussion going on
>> the developer's list.
>
> I'd want to see it decomposed into the following components:
This was the approach I took.
>
> 1. A function which translates glob patterns into regexes
This is the non-trivial part. I've opted to use a two-step process
of:
     - regex_traits to map shell-style meta chars to regex syntax
                 where-ever there's a 1-1 mapping.
     - a minimal string transform to convert the glob pattern to a
                regex pattern corresponding to the above traits.
The specifics of this implementation are of course subject to debate.

>
> 2. A filter_iterator adaptor which uses a regex matching function
> to match the paths from a directory_iterator
This is the easy part--provide a predicate which encapsulates and
  invokes the regex produced above.

--rich


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net