]> git.lyx.org Git - lyx.git/blob - boost/boost/regex/detail/instances.hpp
Jrgen's "Tooltips for the reference dialog" patch. I've tried to incorporate
[lyx.git] / boost / boost / regex / detail / instances.hpp
1 /*
2  *
3  * Copyright (c) 1998-2002
4  * Dr John Maddock
5  *
6  * Permission to use, copy, modify, distribute and sell this software
7  * and its documentation for any purpose is hereby granted without fee,
8  * provided that the above copyright notice appear in all copies and
9  * that both that copyright notice and this permission notice appear
10  * in supporting documentation.  Dr John Maddock makes no representations
11  * about the suitability of this software for any purpose.
12  * It is provided "as is" without express or implied warranty.
13  *
14  */
15
16  /*
17   *   LOCATION:    see http://www.boost.org for most recent version.
18   *   FILE         instances.cpp
19   *   VERSION      see <boost/version.hpp>
20   *   DESCRIPTION: Defines those template instances that are placed in the
21   *                library rather than in the users object files.
22   */
23
24 #ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
25
26 namespace boost{
27
28 //
29 // this header can be included multiple times, each time with
30 // a different character type, BOOST_REGEX_CHAR_T must be defined
31 // first:
32 //
33 #ifndef BOOST_REGEX_CHAR_T
34 #  error "BOOST_REGEX_CHAR_T not defined"
35 #endif
36
37 //
38 // what follows is compiler specific:
39 //
40
41 #ifdef __BORLANDC__
42
43 #  ifndef BOOST_REGEX_INSTANTIATE
44 #     pragma option push -Jgx
45 #  endif
46
47 template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
48 template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*>;
49 template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
50 template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*>;
51 template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
52
53
54 #  ifndef BOOST_REGEX_INSTANTIATE
55 #     pragma option pop
56 #  endif
57
58 #elif defined(BOOST_MSVC)
59
60 #  ifndef BOOST_REGEX_INSTANTIATE
61 #     define template extern template
62 #  endif
63
64 #pragma warning(push)
65 #pragma warning(disable : 4251 4231 4660)
66
67 //
68 // these next two lines are deliberate: raw_storage is used only internally
69 // by reg_expression it is not exported from the dll:
70 //
71 template class re_detail::raw_storage< BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >;
72 template class BOOST_REGEX_DECL re_detail::raw_storage< BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >;
73
74 template class BOOST_REGEX_DECL regex_traits< BOOST_REGEX_CHAR_T >;
75 template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
76 template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type)>;
77 template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type)>;
78 template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type)>;
79 template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type)>;
80
81
82 #pragma warning(pop)
83
84 #  ifdef template
85 #     undef template
86 #  endif
87
88 #elif !defined(BOOST_REGEX_HAS_DLL_RUNTIME)
89
90 //
91 // for each [member] function declare a full specialisation of that
92 // [member] function, then instantiate it in one translation unit.
93 // This is not guarenteed to work according to the standard, but in
94 // practice it should work for all compilers (unless they use a realy
95 // perverse name mangling convention).  Unfortunately this approach
96 // does *not* work for Win32 style import/export, because that can
97 // alter the class layout.
98 //
99
100 #  ifndef BOOST_REGEX_INSTANTIATE
101 #     define template template<>
102 #  endif
103
104 template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
105 template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)& a);
106 template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, size_type len, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
107 template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const reg_expression<BOOST_REGEX_CHAR_T>&);
108 template reg_expression<BOOST_REGEX_CHAR_T>::~reg_expression();
109 template reg_expression<BOOST_REGEX_CHAR_T>& BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator=(const reg_expression&);
110 template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::get_allocator()const;
111 template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator==(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
112 template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator<(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
113 template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::allocator()const;
114 template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::set_expression(const BOOST_REGEX_CHAR_T* p, const BOOST_REGEX_CHAR_T* end, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f);
115 template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_maps();
116 template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal)const;
117 template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start(re_detail::re_syntax_base* node, BOOST_REGEX_CHAR_T c, re_detail::re_syntax_base* terminal)const;
118 template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
119 template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
120 template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::move_offsets(re_detail::re_syntax_base* j, unsigned size);
121 template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
122 template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_narrow_type&);
123 template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_wide_type&);
124 template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot);
125 template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_inner_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
126 template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size);
127 template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_literal(re_detail::re_syntax_base* dat, BOOST_REGEX_CHAR_T c);
128 template BOOST_REGEX_CHAR_T BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_escape(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
129 template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_range(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, unsigned& min, unsigned& max);
130 template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::skip_space(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
131 template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_restart(re_detail::re_syntax_base* dat);
132 template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
133 template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fail(unsigned int err);
134
135 namespace re_detail{
136
137 #define iterator const BOOST_REGEX_CHAR_T*
138 #define Allocator match_results_base<iterator>::alloc_type
139 #define size_type match_results_base<iterator>::size_type
140
141 template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i);
142 template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos);
143 template match_results_base<iterator, Allocator>::match_results_base(const Allocator& a);
144 template Allocator BOOST_REGEX_CALL match_results_base<iterator, Allocator>::allocator()const;
145 template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::m_free();
146 template bool match_results_base<iterator, Allocator>::operator==(const match_results_base<iterator, Allocator>& that)const;
147 template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n);
148 template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j);
149 template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow();
150
151 #undef iterator
152 #undef Allocator
153 #undef size_type
154
155 } // namespace re_detail
156
157 #  ifdef template
158 #     undef template
159 #  endif
160
161 #endif
162
163 } // namespace boost
164
165 #endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
166