]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | /// \file xpressive_fwd.hpp | |
3 | /// Forward declarations for all of xpressive's public data types. | |
4 | // | |
5 | // Copyright 2008 Eric Niebler. Distributed under the Boost | |
6 | // Software License, Version 1.0. (See accompanying file | |
7 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
8 | ||
9 | #ifndef BOOST_XPRESSIVE_XPRESSIVE_FWD_HPP_EAN_10_04_2005 | |
10 | #define BOOST_XPRESSIVE_XPRESSIVE_FWD_HPP_EAN_10_04_2005 | |
11 | ||
12 | // MS compatible compilers support #pragma once | |
13 | #if defined(_MSC_VER) | |
14 | # pragma once | |
15 | #endif | |
16 | ||
17 | #include <string> | |
18 | #include <boost/config.hpp> | |
19 | #include <boost/version.hpp> | |
20 | #include <boost/iterator/iterator_traits.hpp> | |
21 | ||
22 | #if BOOST_VERSION >= 103500 | |
23 | # define BOOST_PROTO_FUSION_V2 | |
24 | #endif | |
25 | ||
26 | ||
27 | #if defined(BOOST_NO_STD_LOCALE) & !defined(BOOST_XPRESSIVE_USE_C_TRAITS) | |
28 | # define BOOST_XPRESSIVE_USE_C_TRAITS | |
29 | #endif | |
30 | ||
31 | #if defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING) | |
32 | # ifndef BOOST_XPRESSIVE_NO_WREGEX | |
33 | # define BOOST_XPRESSIVE_NO_WREGEX | |
34 | # endif | |
35 | #endif | |
36 | ||
37 | // Stack protection under MS Windows | |
38 | // Config logic taken from boost/regex/config.hpp | |
39 | #ifndef BOOST_XPRESSIVE_HAS_MS_STACK_GUARD | |
40 | # if (defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \ | |
41 | && !defined(__GNUC__) \ | |
42 | && !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \ | |
43 | && !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003)) | |
44 | # define BOOST_XPRESSIVE_HAS_MS_STACK_GUARD 1 | |
45 | # else | |
46 | # define BOOST_XPRESSIVE_HAS_MS_STACK_GUARD 0 | |
47 | # endif | |
48 | #endif | |
49 | ||
50 | #include <boost/proto/proto_fwd.hpp> | |
51 | ||
52 | namespace boost { namespace xpressive | |
53 | { | |
54 | ||
55 | template<typename Char> | |
56 | struct cpp_regex_traits; | |
57 | ||
58 | template<typename Char> | |
59 | struct c_regex_traits; | |
60 | ||
61 | template<typename Elem> | |
62 | struct null_regex_traits; | |
63 | ||
64 | namespace detail | |
65 | { | |
66 | template<typename Char> | |
67 | struct default_regex_traits | |
68 | { | |
69 | #ifdef BOOST_XPRESSIVE_USE_C_TRAITS | |
70 | typedef c_regex_traits<Char> type; | |
71 | #else | |
72 | typedef cpp_regex_traits<Char> type; | |
73 | #endif | |
74 | }; | |
75 | ||
76 | struct mark_placeholder; | |
77 | typedef proto::expr<proto::tag::terminal, proto::term<mark_placeholder>, 0> basic_mark_tag; | |
78 | ||
79 | struct regex_domain; | |
80 | ||
81 | } // namespace detail | |
82 | ||
83 | struct mark_tag; | |
84 | ||
85 | typedef void const *regex_id_type; | |
86 | ||
87 | struct regex_error; | |
88 | ||
89 | struct regex_traits_version_1_tag; | |
90 | ||
91 | struct regex_traits_version_2_tag; | |
92 | ||
93 | // DEPRECATED | |
94 | /// INTERNAL ONLY | |
95 | /// | |
96 | struct regex_traits_version_1_case_fold_tag; | |
97 | ||
98 | template<typename Trait> | |
99 | struct has_fold_case; | |
100 | ||
101 | template<typename BidiIter> | |
102 | struct basic_regex; | |
103 | ||
104 | template<typename BidiIter> | |
105 | struct match_results; | |
106 | ||
107 | template<typename BidiIter> | |
108 | struct regex_iterator; | |
109 | ||
110 | template<typename BidiIter> | |
111 | struct regex_token_iterator; | |
112 | ||
113 | template<typename BidiIter> | |
114 | struct regex_id_filter_predicate; | |
115 | ||
116 | template<typename BidiIter> | |
117 | struct sub_match; | |
118 | ||
119 | template<typename RegexTraits> | |
120 | struct compiler_traits; | |
121 | ||
122 | template<typename Char, typename Impl = typename detail::default_regex_traits<Char>::type> | |
123 | struct regex_traits; | |
124 | ||
125 | template | |
126 | < | |
127 | typename BidiIter | |
128 | , typename RegexTraits = regex_traits<typename iterator_value<BidiIter>::type> | |
129 | , typename CompilerTraits = compiler_traits<RegexTraits> | |
130 | > | |
131 | struct regex_compiler; | |
132 | ||
133 | template<typename T> | |
134 | struct value; | |
135 | ||
136 | template<typename T> | |
137 | struct reference; | |
138 | ||
139 | template<typename T> | |
140 | struct local; | |
141 | ||
142 | template<typename T, int I = 0, typename Dummy = proto::is_proto_expr> | |
143 | struct placeholder; | |
144 | ||
145 | namespace op | |
146 | { | |
147 | struct at; | |
148 | struct push; | |
149 | struct push_back; | |
150 | struct push_front; | |
151 | struct pop; | |
152 | struct pop_back; | |
153 | struct pop_front; | |
154 | struct front; | |
155 | struct back; | |
156 | struct top; | |
157 | struct first; | |
158 | struct second; | |
159 | struct matched; | |
160 | struct length; | |
161 | struct str; | |
162 | struct insert; | |
163 | struct make_pair; | |
164 | template<typename T> | |
165 | struct as; | |
166 | template<typename T> | |
167 | struct static_cast_; | |
168 | template<typename T> | |
169 | struct dynamic_cast_; | |
170 | template<typename T> | |
171 | struct const_cast_; | |
172 | template<typename T> | |
173 | struct construct; | |
174 | template<typename Except> | |
175 | struct throw_; | |
176 | struct unwrap_reference; | |
177 | } | |
178 | ||
179 | /////////////////////////////////////////////////////////////////////////////// | |
180 | // Common typedefs | |
181 | // | |
182 | typedef basic_regex<std::string::const_iterator> sregex; | |
183 | typedef basic_regex<char const *> cregex; | |
184 | ||
185 | #ifndef BOOST_XPRESSIVE_NO_WREGEX | |
186 | typedef basic_regex<std::wstring::const_iterator> wsregex; | |
187 | typedef basic_regex<wchar_t const *> wcregex; | |
188 | #endif | |
189 | ||
190 | typedef sub_match<std::string::const_iterator> ssub_match; | |
191 | typedef sub_match<char const *> csub_match; | |
192 | ||
193 | #ifndef BOOST_XPRESSIVE_NO_WREGEX | |
194 | typedef sub_match<std::wstring::const_iterator> wssub_match; | |
195 | typedef sub_match<wchar_t const *> wcsub_match; | |
196 | #endif | |
197 | ||
198 | typedef regex_compiler<std::string::const_iterator> sregex_compiler; | |
199 | typedef regex_compiler<char const *> cregex_compiler; | |
200 | ||
201 | #ifndef BOOST_XPRESSIVE_NO_WREGEX | |
202 | typedef regex_compiler<std::wstring::const_iterator> wsregex_compiler; | |
203 | typedef regex_compiler<wchar_t const *> wcregex_compiler; | |
204 | #endif | |
205 | ||
206 | typedef regex_iterator<std::string::const_iterator> sregex_iterator; | |
207 | typedef regex_iterator<char const *> cregex_iterator; | |
208 | ||
209 | #ifndef BOOST_XPRESSIVE_NO_WREGEX | |
210 | typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator; | |
211 | typedef regex_iterator<wchar_t const *> wcregex_iterator; | |
212 | #endif | |
213 | ||
214 | typedef regex_token_iterator<std::string::const_iterator> sregex_token_iterator; | |
215 | typedef regex_token_iterator<char const *> cregex_token_iterator; | |
216 | ||
217 | #ifndef BOOST_XPRESSIVE_NO_WREGEX | |
218 | typedef regex_token_iterator<std::wstring::const_iterator> wsregex_token_iterator; | |
219 | typedef regex_token_iterator<wchar_t const *> wcregex_token_iterator; | |
220 | #endif | |
221 | ||
222 | typedef match_results<std::string::const_iterator> smatch; | |
223 | typedef match_results<char const *> cmatch; | |
224 | ||
225 | #ifndef BOOST_XPRESSIVE_NO_WREGEX | |
226 | typedef match_results<std::wstring::const_iterator> wsmatch; | |
227 | typedef match_results<wchar_t const *> wcmatch; | |
228 | #endif | |
229 | ||
230 | typedef regex_id_filter_predicate<std::string::const_iterator> sregex_id_filter_predicate; | |
231 | typedef regex_id_filter_predicate<char const *> cregex_id_filter_predicate; | |
232 | ||
233 | #ifndef BOOST_XPRESSIVE_NO_WREGEX | |
234 | typedef regex_id_filter_predicate<std::wstring::const_iterator> wsregex_id_filter_predicate; | |
235 | typedef regex_id_filter_predicate<wchar_t const *> wcregex_id_filter_predicate; | |
236 | #endif | |
237 | ||
238 | }} // namespace boost::xpressive | |
239 | ||
240 | #endif |