/Src/Dependencies/Boost/boost/xpressive/xpressive_fwd.hpp

http://hadesmem.googlecode.com/ · C++ Header · 243 lines · 173 code · 54 blank · 16 comment · 9 complexity · fe4d0109c2b29e054b8e3ba70da941b0 MD5 · raw file

  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. #ifndef BOOST_XPRESSIVE_XPRESSIVE_FWD_HPP_EAN_10_04_2005
  9. #define BOOST_XPRESSIVE_XPRESSIVE_FWD_HPP_EAN_10_04_2005
  10. // MS compatible compilers support #pragma once
  11. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  12. # pragma once
  13. #endif
  14. #include <string>
  15. #include <boost/config.hpp>
  16. #include <boost/version.hpp>
  17. #include <boost/iterator/iterator_traits.hpp>
  18. #if BOOST_VERSION >= 103500
  19. # define BOOST_PROTO_FUSION_V2
  20. #endif
  21. #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  22. # error Sorry, xpressive requires a compiler that supports partial template specialization.
  23. #endif
  24. #if defined(BOOST_NO_STD_LOCALE) & !defined(BOOST_XPRESSIVE_USE_C_TRAITS)
  25. # define BOOST_XPRESSIVE_USE_C_TRAITS
  26. #endif
  27. #if defined(BOOST_NO_CWCHAR) | defined(BOOST_NO_CWCTYPE) | defined(BOOST_NO_STD_WSTRING)
  28. # ifndef BOOST_XPRESSIVE_NO_WREGEX
  29. # define BOOST_XPRESSIVE_NO_WREGEX
  30. # endif
  31. #endif
  32. // Stack protection under MS Windows
  33. // Config logic taken from boost/regex/config.hpp
  34. #ifndef BOOST_XPRESSIVE_HAS_MS_STACK_GUARD
  35. # if (defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
  36. && !defined(__GNUC__) \
  37. && !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
  38. && !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
  39. # define BOOST_XPRESSIVE_HAS_MS_STACK_GUARD 1
  40. # else
  41. # define BOOST_XPRESSIVE_HAS_MS_STACK_GUARD 0
  42. # endif
  43. #endif
  44. #include <boost/proto/proto_fwd.hpp>
  45. namespace boost { namespace xpressive
  46. {
  47. template<typename Char>
  48. struct cpp_regex_traits;
  49. template<typename Char>
  50. struct c_regex_traits;
  51. template<typename Elem>
  52. struct null_regex_traits;
  53. namespace detail
  54. {
  55. template<typename Char>
  56. struct default_regex_traits
  57. {
  58. #ifdef BOOST_XPRESSIVE_USE_C_TRAITS
  59. typedef c_regex_traits<Char> type;
  60. #else
  61. typedef cpp_regex_traits<Char> type;
  62. #endif
  63. };
  64. struct mark_placeholder;
  65. typedef proto::expr<proto::tag::terminal, proto::term<mark_placeholder>, 0> basic_mark_tag;
  66. struct regex_domain;
  67. } // namespace detail
  68. struct mark_tag;
  69. typedef void const *regex_id_type;
  70. struct regex_error;
  71. struct regex_traits_version_1_tag;
  72. struct regex_traits_version_2_tag;
  73. // DEPRECATED
  74. /// INTERNAL ONLY
  75. ///
  76. struct regex_traits_version_1_case_fold_tag;
  77. template<typename Trait>
  78. struct has_fold_case;
  79. template<typename BidiIter>
  80. struct basic_regex;
  81. template<typename BidiIter>
  82. struct match_results;
  83. template<typename BidiIter>
  84. struct regex_iterator;
  85. template<typename BidiIter>
  86. struct regex_token_iterator;
  87. template<typename BidiIter>
  88. struct regex_id_filter_predicate;
  89. template<typename BidiIter>
  90. struct sub_match;
  91. template<typename RegexTraits>
  92. struct compiler_traits;
  93. template<typename Char, typename Impl = typename detail::default_regex_traits<Char>::type>
  94. struct regex_traits;
  95. template
  96. <
  97. typename BidiIter
  98. , typename RegexTraits = regex_traits<typename iterator_value<BidiIter>::type>
  99. , typename CompilerTraits = compiler_traits<RegexTraits>
  100. >
  101. struct regex_compiler;
  102. template<typename T>
  103. struct value;
  104. template<typename T>
  105. struct reference;
  106. template<typename T>
  107. struct local;
  108. template<typename T, int I = 0, typename Dummy = proto::is_proto_expr>
  109. struct placeholder;
  110. namespace op
  111. {
  112. struct at;
  113. struct push;
  114. struct push_back;
  115. struct push_front;
  116. struct pop;
  117. struct pop_back;
  118. struct pop_front;
  119. struct front;
  120. struct back;
  121. struct top;
  122. struct first;
  123. struct second;
  124. struct matched;
  125. struct length;
  126. struct str;
  127. struct insert;
  128. struct make_pair;
  129. template<typename T>
  130. struct as;
  131. template<typename T>
  132. struct static_cast_;
  133. template<typename T>
  134. struct dynamic_cast_;
  135. template<typename T>
  136. struct const_cast_;
  137. template<typename T>
  138. struct construct;
  139. template<typename Except>
  140. struct throw_;
  141. struct unwrap_reference;
  142. }
  143. ///////////////////////////////////////////////////////////////////////////////
  144. // Common typedefs
  145. //
  146. typedef basic_regex<std::string::const_iterator> sregex;
  147. typedef basic_regex<char const *> cregex;
  148. #ifndef BOOST_XPRESSIVE_NO_WREGEX
  149. typedef basic_regex<std::wstring::const_iterator> wsregex;
  150. typedef basic_regex<wchar_t const *> wcregex;
  151. #endif
  152. typedef sub_match<std::string::const_iterator> ssub_match;
  153. typedef sub_match<char const *> csub_match;
  154. #ifndef BOOST_XPRESSIVE_NO_WREGEX
  155. typedef sub_match<std::wstring::const_iterator> wssub_match;
  156. typedef sub_match<wchar_t const *> wcsub_match;
  157. #endif
  158. typedef regex_compiler<std::string::const_iterator> sregex_compiler;
  159. typedef regex_compiler<char const *> cregex_compiler;
  160. #ifndef BOOST_XPRESSIVE_NO_WREGEX
  161. typedef regex_compiler<std::wstring::const_iterator> wsregex_compiler;
  162. typedef regex_compiler<wchar_t const *> wcregex_compiler;
  163. #endif
  164. typedef regex_iterator<std::string::const_iterator> sregex_iterator;
  165. typedef regex_iterator<char const *> cregex_iterator;
  166. #ifndef BOOST_XPRESSIVE_NO_WREGEX
  167. typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator;
  168. typedef regex_iterator<wchar_t const *> wcregex_iterator;
  169. #endif
  170. typedef regex_token_iterator<std::string::const_iterator> sregex_token_iterator;
  171. typedef regex_token_iterator<char const *> cregex_token_iterator;
  172. #ifndef BOOST_XPRESSIVE_NO_WREGEX
  173. typedef regex_token_iterator<std::wstring::const_iterator> wsregex_token_iterator;
  174. typedef regex_token_iterator<wchar_t const *> wcregex_token_iterator;
  175. #endif
  176. typedef match_results<std::string::const_iterator> smatch;
  177. typedef match_results<char const *> cmatch;
  178. #ifndef BOOST_XPRESSIVE_NO_WREGEX
  179. typedef match_results<std::wstring::const_iterator> wsmatch;
  180. typedef match_results<wchar_t const *> wcmatch;
  181. #endif
  182. typedef regex_id_filter_predicate<std::string::const_iterator> sregex_id_filter_predicate;
  183. typedef regex_id_filter_predicate<char const *> cregex_id_filter_predicate;
  184. #ifndef BOOST_XPRESSIVE_NO_WREGEX
  185. typedef regex_id_filter_predicate<std::wstring::const_iterator> wsregex_id_filter_predicate;
  186. typedef regex_id_filter_predicate<wchar_t const *> wcregex_id_filter_predicate;
  187. #endif
  188. }} // namespace boost::xpressive
  189. #endif