]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/quickbook/src/glob.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / tools / quickbook / src / glob.hpp
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 #if !defined(BOOST_QUICKBOOK_GLOB_HPP)
10 #define BOOST_QUICKBOOK_GLOB_HPP
11
12 #include <stdexcept>
13 #include "string_view.hpp"
14
15 namespace quickbook
16 {
17 struct glob_error : std::runtime_error
18 {
19 explicit glob_error(char const* error) : std::runtime_error(error) {}
20 };
21
22 // Is this path a glob? Throws glob_error if glob is invalid.
23 bool check_glob(quickbook::string_view);
24
25 // pre: glob is valid (call check_glob first on user data).
26 bool glob(
27 quickbook::string_view const& pattern,
28 quickbook::string_view const& filename);
29
30 std::size_t find_glob_char(quickbook::string_view, std::size_t start = 0);
31 std::string glob_unescape(quickbook::string_view);
32 }
33
34 #endif