Chris@16
|
1
|
Chris@16
|
2 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
3 #ifndef BOOST_PHOENIX_SCOPE_DETAIL_DYNAMIC_HPP
|
Chris@16
|
4 #define BOOST_PHOENIX_SCOPE_DETAIL_DYNAMIC_HPP
|
Chris@16
|
5
|
Chris@16
|
6 #include <boost/phoenix/support/iterate.hpp>
|
Chris@16
|
7
|
Chris@16
|
8 #include <boost/phoenix/scope/detail/preprocessed/dynamic.hpp>
|
Chris@16
|
9
|
Chris@16
|
10 #endif
|
Chris@16
|
11 #else
|
Chris@16
|
12
|
Chris@16
|
13 #if !BOOST_PHOENIX_IS_ITERATING
|
Chris@16
|
14
|
Chris@16
|
15 #ifndef BOOST_PHOENIX_SCOPE_DETAIL_DYNAMIC_HPP
|
Chris@16
|
16 #define BOOST_PHOENIX_SCOPE_DETAIL_DYNAMIC_HPP
|
Chris@16
|
17
|
Chris@16
|
18 #include <boost/phoenix/support/iterate.hpp>
|
Chris@16
|
19
|
Chris@16
|
20 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
21 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/dynamic_" BOOST_PHOENIX_LIMIT_STR ".hpp")
|
Chris@16
|
22 #endif
|
Chris@16
|
23
|
Chris@16
|
24 /*==============================================================================
|
Chris@16
|
25 Copyright (c) 2005-2010 Joel de Guzman
|
Chris@16
|
26 Copyright (c) 2010 Thomas Heller
|
Chris@16
|
27
|
Chris@16
|
28 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
29 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
30 ==============================================================================*/
|
Chris@16
|
31
|
Chris@16
|
32 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
33 #pragma wave option(preserve: 1)
|
Chris@16
|
34 #endif
|
Chris@16
|
35
|
Chris@16
|
36 #define BOOST_PHOENIX_SCOPE_DYNAMIC_MEMBER(_, N, __) \
|
Chris@16
|
37 typedef \
|
Chris@16
|
38 typename expression::dynamic_member< \
|
Chris@16
|
39 mpl::int_<N> \
|
Chris@16
|
40 , self_type * \
|
Chris@16
|
41 >::type const \
|
Chris@16
|
42 BOOST_PP_CAT(member, BOOST_PP_INC(N)); \
|
Chris@16
|
43 /**/
|
Chris@16
|
44
|
Chris@16
|
45 #define BOOST_PHOENIX_ITERATION_PARAMS \
|
Chris@16
|
46 (3, (1, BOOST_PHOENIX_DYNAMIC_LIMIT, \
|
Chris@16
|
47 <boost/phoenix/scope/detail/dynamic.hpp>))
|
Chris@16
|
48 #include BOOST_PHOENIX_ITERATE()
|
Chris@16
|
49
|
Chris@16
|
50 #undef BOOST_PHOENIX_SCOPE_DYNAMIC_MEMBER
|
Chris@16
|
51
|
Chris@16
|
52 #endif
|
Chris@16
|
53
|
Chris@16
|
54 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
55 #pragma wave option(output: null)
|
Chris@16
|
56 #endif
|
Chris@16
|
57
|
Chris@16
|
58 #else
|
Chris@16
|
59
|
Chris@16
|
60 template <BOOST_PHOENIX_typename_A>
|
Chris@16
|
61 struct dynamic<BOOST_PHOENIX_A> : noncopyable
|
Chris@16
|
62 {
|
Chris@16
|
63 typedef
|
Chris@16
|
64 BOOST_PP_CAT(vector, BOOST_PHOENIX_ITERATION)<BOOST_PHOENIX_A>
|
Chris@16
|
65 tuple_type;
|
Chris@16
|
66 typedef
|
Chris@16
|
67 dynamic<BOOST_PHOENIX_A>
|
Chris@16
|
68 self_type;
|
Chris@16
|
69 typedef
|
Chris@16
|
70 dynamic_frame<self_type>
|
Chris@16
|
71 dynamic_frame_type;
|
Chris@16
|
72
|
Chris@16
|
73 dynamic()
|
Chris@16
|
74 : frame(0) {}
|
Chris@16
|
75
|
Chris@16
|
76 template <int N>
|
Chris@16
|
77 static
|
Chris@16
|
78 typename expression::dynamic_member<mpl::int_<N>, self_type *>::type const
|
Chris@16
|
79 init(self_type * scope)
|
Chris@16
|
80 {
|
Chris@16
|
81 return
|
Chris@16
|
82 expression::
|
Chris@16
|
83 dynamic_member<mpl::int_<N>, self_type *>::
|
Chris@16
|
84 make(mpl::int_<N>(), scope);
|
Chris@16
|
85 }
|
Chris@16
|
86
|
Chris@16
|
87 BOOST_PP_REPEAT(
|
Chris@16
|
88 BOOST_PHOENIX_ITERATION
|
Chris@16
|
89 , BOOST_PHOENIX_SCOPE_DYNAMIC_MEMBER
|
Chris@16
|
90 , _
|
Chris@16
|
91 )
|
Chris@16
|
92
|
Chris@16
|
93 mutable dynamic_frame_type* frame;
|
Chris@16
|
94 };
|
Chris@16
|
95
|
Chris@16
|
96 #endif
|
Chris@16
|
97
|
Chris@16
|
98 #endif // BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES
|