]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2013 Daniel James | |
3 | ||
4 | Use, modification and distribution is subject to the Boost Software | |
5 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
6 | http://www.boost.org/LICENSE_1_0.txt) | |
7 | =============================================================================*/ | |
8 | ||
9 | #include <boost/utility/string_ref.hpp> | |
10 | #include <stdexcept> | |
11 | ||
12 | namespace quickbook | |
13 | { | |
14 | struct glob_error : std::runtime_error | |
15 | { | |
16 | explicit glob_error(char const* error) : | |
17 | std::runtime_error(error) {} | |
18 | }; | |
19 | ||
20 | // Is this path a glob? Throws glob_error if glob is invalid. | |
21 | bool check_glob(boost::string_ref); | |
22 | ||
23 | // pre: glob is valid (call check_glob first on user data). | |
24 | bool glob(boost::string_ref const& pattern, | |
25 | boost::string_ref const& filename); | |
26 | ||
27 | std::size_t find_glob_char(boost::string_ref, | |
28 | std::size_t start = 0); | |
29 | std::string glob_unescape(boost::string_ref); | |
30 | } |