]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2005-2010 Joel de Guzman | |
3 | Copyright (c) 2010 Eric Niebler | |
4 | Copyright (c) 2010 Thomas Heller | |
5 | Copyright (c) 2014 John Fletcher | |
6 | ||
7 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
8 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
9 | ==============================================================================*/ | |
10 | #ifndef BOOST_PHOENIX_CORE_ASSIGN_HPP | |
11 | #define BOOST_PHOENIX_CORE_ASSIGN_HPP | |
12 | ||
13 | #define BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(N) \ | |
14 | assign( \ | |
15 | proto::_child_c<N> \ | |
16 | , proto::call< \ | |
17 | proto::_child_c<N>(proto::_state) \ | |
18 | > \ | |
19 | ) \ | |
20 | /**/ | |
21 | #define BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD(Z, N, D) \ | |
22 | proto::and_< \ | |
23 | BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(N) \ | |
24 | /**/ | |
25 | #define BOOST_PHOENIX_ACTOR_END_ASSIGN(Z, N, D) \ | |
26 | > \ | |
27 | /**/ | |
28 | #define BOOST_PHOENIX_ACTOR_ASSIGN_CALL(N) \ | |
29 | proto::when< \ | |
30 | proto::nary_expr<proto::_ , \ | |
31 | BOOST_PP_ENUM_PARAMS(N, proto::_ BOOST_PP_INTERCEPT) \ | |
32 | > \ | |
33 | , BOOST_PP_ENUM( \ | |
34 | N \ | |
35 | , BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD \ | |
36 | , _ \ | |
37 | ) \ | |
38 | BOOST_PP_REPEAT( \ | |
39 | N \ | |
40 | , BOOST_PHOENIX_ACTOR_END_ASSIGN \ | |
41 | , _ \ | |
42 | ) \ | |
43 | > \ | |
44 | /**/ | |
45 | #define BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL(Z, N, D) \ | |
46 | proto::or_< \ | |
47 | BOOST_PHOENIX_ACTOR_ASSIGN_CALL(N) \ | |
48 | /**/ | |
49 | ||
50 | #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) | |
51 | #include <boost/phoenix/core/detail/cpp03/preprocessed/assign.hpp> | |
52 | #else | |
53 | #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) | |
54 | #pragma wave option(preserve: 2, line: 0, output: "preprocessed/assign_" BOOST_PHOENIX_LIMIT_STR ".hpp") | |
55 | #endif | |
56 | /*============================================================================== | |
57 | Copyright (c) 2005-2010 Joel de Guzman | |
58 | Copyright (c) 2010-2011 Thomas Heller | |
59 | ||
60 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
61 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
62 | ==============================================================================*/ | |
63 | ||
64 | #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) | |
65 | #pragma wave option(preserve: 1) | |
66 | #endif | |
67 | ||
68 | struct assign | |
69 | : BOOST_PP_ENUM_SHIFTED( | |
70 | BOOST_PHOENIX_LIMIT | |
71 | , BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL | |
72 | , _ | |
73 | ) | |
74 | , proto::when< | |
75 | proto::terminal<proto::_> | |
76 | , do_assign(proto::_, proto::_state) | |
77 | > | |
78 | BOOST_PP_REPEAT( | |
79 | BOOST_PP_DEC(BOOST_PHOENIX_LIMIT) | |
80 | , BOOST_PHOENIX_ACTOR_END_ASSIGN | |
81 | , _ | |
82 | ) | |
83 | {}; | |
84 | ||
85 | #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) | |
86 | #pragma wave option(output: null) | |
87 | #endif | |
88 | ||
89 | #endif | |
90 | #undef BOOST_PHOENIX_ACTOR_ASSIGN_CALL | |
91 | #undef BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL | |
92 | #undef BOOST_PHOENIX_ACTOR_END_ASSIGN_CALL | |
93 | #undef BOOST_PHOENIX_ACTOR_ASSIGN_CHILD | |
94 | #undef BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD | |
95 | #undef BOOST_PHOENIX_ACTOR_END_ASSIGN_CHILD | |
96 | #endif | |
97 |