1/*=============================================================================
2 Copyright (c) 2007 Tobias Schwinger
3 Copyright (c) 2001-2011 Hartmut Kaiser
4 http://spirit.sourceforge.net/
5
6 Distributed under the Boost Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8=============================================================================*/
9#if !defined(BOOST_SPIRIT_ITERATOR_MULTI_PASS_FWD_APR_18_2008_1102AM)
10#define BOOST_SPIRIT_ITERATOR_MULTI_PASS_FWD_APR_18_2008_1102AM
11
12#include <cstddef>
13#include <boost/spirit/home/support/multi_pass_wrapper.hpp>
14
15namespace boost { namespace spirit {
16
17 namespace iterator_policies
18 {
19 // input policies
20 struct input_iterator;
21 struct buffering_input_iterator;
22 struct istream;
23 struct lex_input;
24 struct functor_input;
25 struct split_functor_input;
26
27 // ownership policies
28 struct ref_counted;
29 struct first_owner;
30
31 // checking policies
32 class illegal_backtracking;
33 struct buf_id_check;
34 struct no_check;
35
36 // storage policies
37 struct split_std_deque;
38 template<std::size_t N> struct fixed_size_queue;
39
40 // policy combiner
41#if defined(BOOST_SPIRIT_DEBUG)
42 template<typename Ownership = ref_counted
43 , typename Checking = buf_id_check
44 , typename Input = buffering_input_iterator
45 , typename Storage = split_std_deque>
46 struct default_policy;
47#else
48 template<typename Ownership = ref_counted
49 , typename Checking = no_check
50 , typename Input = buffering_input_iterator
51 , typename Storage = split_std_deque>
52 struct default_policy;
53#endif
54 }
55
56 template <typename T
57 , typename Policies = iterator_policies::default_policy<> >
58 class multi_pass;
59
60 template <typename T, typename Policies>
61 void swap(multi_pass<T, Policies> &x, multi_pass<T, Policies> &y);
62
63}} // namespace boost::spirit
64
65namespace boost { namespace spirit { namespace traits
66{
67 // declare special functions allowing to integrate any multi_pass iterator
68 // with expectation points
69
70 // multi_pass iterators require special handling (for the non-specialized
71 // versions of these functions see support/multi_pass_wrapper.hpp)
72 template <typename T, typename Policies>
73 void clear_queue(multi_pass<T, Policies>&
74 , BOOST_SCOPED_ENUM(clear_mode) mode = clear_mode::clear_if_enabled);
75
76 template <typename T, typename Policies>
77 void inhibit_clear_queue(multi_pass<T, Policies>&, bool);
78
79 template <typename T, typename Policies>
80 bool inhibit_clear_queue(multi_pass<T, Policies>&);
81
82 // Helper template to recognize a multi_pass iterator. This specialization
83 // will be instantiated for any multi_pass iterator.
84 template <typename T, typename Policies>
85 struct is_multi_pass<multi_pass<T, Policies> > : mpl::true_ {};
86
87}}}
88
89#endif
90
91

source code of boost/libs/spirit/include/boost/spirit/home/support/iterators/multi_pass_fwd.hpp