Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/boost/xpressive/xpressive_fwd.hpp @ 47

Last change on this file since 47 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 5.3 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2/// \file xpressive_fwd.hpp
3/// Forward declarations for all of xpressive's public data types.
4//
5//  Copyright 2004 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) && (_MSC_VER >= 1020)
14# pragma once
15#endif
16
17#include <string>
18#include <boost/config.hpp>
19#include <boost/iterator/iterator_traits.hpp>
20
21#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
22# error Sorry, xpressive requires a compiler that supports partial template specialization.
23#endif
24
25#if defined(BOOST_NO_STD_LOCALE) & !defined(BOOST_XPRESSIVE_USE_C_TRAITS)
26# define BOOST_XPRESSIVE_USE_C_TRAITS
27#endif
28
29#if defined(BOOST_NO_CWCHAR) | defined(BOOST_NO_CWCTYPE) | defined(BOOST_NO_STD_WSTRING)
30# ifndef BOOST_XPRESSIVE_NO_WREGEX
31#  define BOOST_XPRESSIVE_NO_WREGEX
32# endif
33#endif
34
35#include <boost/xpressive/proto/proto_fwd.hpp>
36
37namespace boost { namespace xpressive
38{
39    template<typename Char, typename Impl>
40    struct regex_traits;
41
42    template<typename Char>
43    struct cpp_regex_traits;
44
45    template<typename Char>
46    struct c_regex_traits;
47
48    template<typename Elem>
49    struct null_regex_traits;
50
51    namespace detail
52    {
53        template<typename Char>
54        struct default_regex_traits
55        {
56            #ifdef BOOST_XPRESSIVE_USE_C_TRAITS
57            typedef c_regex_traits<Char> type;
58            #else
59            typedef cpp_regex_traits<Char> type;
60            #endif
61        };
62
63        struct mark_placeholder;
64
65        typedef proto::unary_op<detail::mark_placeholder, proto::noop_tag> mark_tag;
66
67    } // namespace detail
68
69    using detail::mark_tag;
70
71    typedef void const *regex_id_type;
72
73    struct regex_error;
74
75    struct regex_traits_version_1_tag;
76
77    struct regex_traits_version_1_case_fold_tag;
78
79    template<typename BidiIter>
80    struct basic_regex;
81
82    template<typename BidiIter>
83    struct match_results;
84
85    template<typename BidiIter>
86    struct regex_iterator;
87
88    template<typename BidiIter>
89    struct regex_token_iterator;
90
91    template<typename BidiIter>
92    struct regex_id_filter_predicate;
93
94    template<typename BidiIter>
95    struct sub_match;
96
97    template<typename Action, typename Saved = Action>
98    struct action;
99
100    template<typename RegexTraits>
101    struct compiler_traits;
102
103    template<typename Char, typename Impl = typename detail::default_regex_traits<Char>::type>
104    struct regex_traits;
105
106    template
107    <
108        typename BidiIter
109      , typename RegexTraits = regex_traits<typename iterator_value<BidiIter>::type>
110      , typename CompilerTraits = compiler_traits<RegexTraits>
111    >
112    struct regex_compiler;
113
114    ///////////////////////////////////////////////////////////////////////////////
115    // Common typedefs
116    //
117    typedef basic_regex<std::string::const_iterator>                sregex;
118    typedef basic_regex<char const *>                               cregex;
119
120    #ifndef BOOST_XPRESSIVE_NO_WREGEX
121    typedef basic_regex<std::wstring::const_iterator>               wsregex;
122    typedef basic_regex<wchar_t const *>                            wcregex;
123    #endif
124
125    typedef regex_compiler<std::string::const_iterator>             sregex_compiler;
126    typedef regex_compiler<char const *>                            cregex_compiler;
127
128    #ifndef BOOST_XPRESSIVE_NO_WREGEX
129    typedef regex_compiler<std::wstring::const_iterator>            wsregex_compiler;
130    typedef regex_compiler<wchar_t const *>                         wcregex_compiler;
131    #endif
132
133    typedef regex_iterator<std::string::const_iterator>             sregex_iterator;
134    typedef regex_iterator<char const *>                            cregex_iterator;
135
136    #ifndef BOOST_XPRESSIVE_NO_WREGEX
137    typedef regex_iterator<std::wstring::const_iterator>            wsregex_iterator;
138    typedef regex_iterator<wchar_t const *>                         wcregex_iterator;
139    #endif
140
141    typedef regex_token_iterator<std::string::const_iterator>       sregex_token_iterator;
142    typedef regex_token_iterator<char const *>                      cregex_token_iterator;
143
144    #ifndef BOOST_XPRESSIVE_NO_WREGEX
145    typedef regex_token_iterator<std::wstring::const_iterator>      wsregex_token_iterator;
146    typedef regex_token_iterator<wchar_t const *>                   wcregex_token_iterator;
147    #endif
148
149    typedef match_results<std::string::const_iterator>              smatch;
150    typedef match_results<char const *>                             cmatch;
151
152    #ifndef BOOST_XPRESSIVE_NO_WREGEX
153    typedef match_results<std::wstring::const_iterator>             wsmatch;
154    typedef match_results<wchar_t const *>                          wcmatch;
155    #endif
156
157    typedef regex_id_filter_predicate<std::string::const_iterator>  sregex_id_filter_predicate;
158    typedef regex_id_filter_predicate<char const *>                 cregex_id_filter_predicate;
159
160    #ifndef BOOST_XPRESSIVE_NO_WREGEX
161    typedef regex_id_filter_predicate<std::wstring::const_iterator> wsregex_id_filter_predicate;
162    typedef regex_id_filter_predicate<wchar_t const *>              wcregex_id_filter_predicate;
163    #endif
164
165}} // namespace boost::xpressive
166
167#endif
Note: See TracBrowser for help on using the repository browser.