2 (C) Copyright Edward Diener 2011-2015
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
8 [section:vmd_conv Version 1.7 to 1.8 conversion]
10 Since the current version of VMD has been drastically changed
11 to make it easier to use VMD functionality this section
12 details equivalent functionality for previous version 1.7
15 The changes in functionality involve the parsing of sequences.
16 The equivalent to all the V1.7 functionality, which looks for
17 various data types at the beginning of a sequence, is encompassed
18 by the V1.8 macro BOOST_VMD_ELEM(0,sequence,...), where '0' is the first
19 sequence element and 'sequence' is the sequence, with its optional
26 BOOST_VMD_IDENTIFIER(sequence,keys,...) looked for an identifier at
27 the beginning of a sequence and returned a 2-element tuple, where the first
28 element is the matching index starting with 1, or 0 if no identifier is found,
29 and the second tuple element is the rest of the sequence or emptiness if no
34 BOOST_VMD_ELEM(0,sequence,(identifiers),BOOST_VMD_TYPE_IDENTIFIER,BOOST_VMD_RETURN_AFTER,BOOST_VMD_RETURN_INDEX)
35 returns a 3-element tuple where the identifier found is the first tuple element,
36 the rest of the sequence is the second tuple element, and the matching index, starting with
37 0, is the 3rd tuple element. If no identifier is found all elements of the returned tuple are empty.
41 BOOST_VMD_BEGIN_IDENTIFIER(sequence,keys,...) looked for an identifier at
42 the beginning of a sequence and returned the matching index starting with 1, or
43 0 if no identifier is found.
47 BOOST_VMD_ELEM(0,sequence,(identifiers),BOOST_VMD_TYPE_IDENTIFIER,BOOST_VMD_RETURN_INDEX)
48 returns a 2-element tuple where the identifier found is the first tuple element
49 and the matching index, starting with 0, is the 2nd tuple element. If no identifier
50 is found both elements of the returned tuple are empty.
54 BOOST_VMD_AFTER_IDENTIFIER(sequence,keys,...) looked for an identifier at the
55 beginning of a sequence and returned the rest of the sequence or emptiness if
56 no identifier is found.
60 BOOST_VMD_ELEM(0,sequence,(identifiers),BOOST_VMD_TYPE_IDENTIFIER,BOOST_VMD_RETURN_ONLY_AFTER)
61 is the exact equivalent.
65 BOOST_VMD_IS_BEGIN_IDENTIFIER(sequence,keys,...) returns 1 if input
66 begins with an identifier, else 0 if it does not.
70 BOOST_VMD_ELEM(0,sequence,(identifiers),BOOST_VMD_TYPE_IDENTIFIER) returns the identifier found,
71 otherwise emptiness if not found. You can use
72 BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,identifiers,BOOST_VMD_TYPE_IDENTIFIER)))
73 as the exact equivalent.
79 BOOST_VMD_NUMBER(sequence,...) looked for a number at
80 the beginning of a sequence and returned a 2-element tuple, where the first
81 element is the number and the second tuple element is the rest of the sequence.
82 If no number is found both tuple elements are empty.
86 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER,BOOST_VMD_RETURN_AFTER)
87 is the exact equivalent.
91 BOOST_VMD_BEGIN_NUMBER(sequence,...) looked for a number at
92 the beginning of a sequence and returned the number if found or emptiness
93 if no number is found.
97 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER)
98 is the exact equivalent.
102 BOOST_VMD_AFTER_NUMBER(sequence,...) looked for a number at the
103 beginning of a sequence and returned the rest of the sequence or emptiness if
108 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER,BOOST_VMD_RETURN_ONLY_AFTER)
109 is the exact equivalent.
113 BOOST_VMD_IS_BEGIN_NUMBER(sequence,...) returns 1 if input
114 begins with a number, else 0 if it does not.
118 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER) returns the number found,
119 otherwise emptiness if not found. You can use
120 BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER)))
121 as the exact equivalent.
127 BOOST_VMD_ARRAY(sequence) looked for an array at
128 the beginning of a sequence and returned a 2-element tuple, where the first
129 element is the array and the second tuple element is the rest of the sequence.
130 If no array is found both tuple elements are empty.
134 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY,BOOST_VMD_RETURN_AFTER)
135 is the exact equivalent.
139 BOOST_VMD_BEGIN_ARRAY(sequence) looked for an array at
140 the beginning of a sequence and returned the array if found or emptiness
141 if no array is found.
145 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY)
146 is the exact equivalent.
150 BOOST_VMD_AFTER_ARRAY(sequence) looked for an array at the
151 beginning of a sequence and returned the rest of the sequence or emptiness if
156 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY,BOOST_VMD_RETURN_ONLY_AFTER)
157 is the exact equivalent.
161 BOOST_VMD_IS_BEGIN_ARRAY(sequence,...) returns 1 if input
162 begins with an array, else 0 if it does not.
166 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY) returns the array found,
167 otherwise emptiness if not found. You can use
168 BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY)))
169 as the exact equivalent.
175 BOOST_VMD_LIST(sequence) looked for an list at
176 the beginning of a sequence and returned a 2-element tuple, where the first
177 element is the list and the second tuple element is the rest of the sequence.
178 If no list is found both tuple elements are empty.
182 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST,BOOST_VMD_RETURN_AFTER)
183 is the exact equivalent.
187 BOOST_VMD_BEGIN_LIST(sequence) looked for a list at
188 the beginning of a sequence and returned the list if found or emptiness
193 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST) is the exact equivalent.
197 BOOST_VMD_AFTER_LIST(sequence) looked for an list at the
198 beginning of a sequence and returned the rest of the sequence or emptiness if
203 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST,BOOST_VMD_RETURN_ONLY_AFTER)
204 is the exact equivalent.
208 BOOST_VMD_IS_BEGIN_LIST(sequence,...) returns 1 if input
209 begins with an list, else 0 if it does not.
213 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST) returns the list found,
214 otherwise emptiness if not found. You can use
215 BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST)))
216 as the exact equivalent.
222 BOOST_VMD_SEQ(sequence) looked for a seq at
223 the beginning of a sequence and returned a 2-element tuple, where the first
224 element is the seq and the second tuple element is the rest of the sequence.
225 If no seq is found both tuple elements are empty.
229 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ,BOOST_VMD_RETURN_AFTER)
230 is the exact equivalent.
234 BOOST_VMD_BEGIN_SEQ(sequence) looked for a seq at
235 the beginning of a sequence and returned the seq if found or emptiness
240 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ) is the exact equivalent.
244 BOOST_VMD_AFTER_SEQ(sequence) looked for an seq at the
245 beginning of a sequence and returned the rest of the sequence or emptiness if
250 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ,BOOST_VMD_RETURN_ONLY_AFTER)
251 is the exact equivalent.
255 BOOST_VMD_IS_BEGIN_SEQ(sequence,...) returns 1 if input
256 begins with an seq, else 0 if it does not.
260 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ) returns the seq found,
261 otherwise emptiness if not found. You can use
262 BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ)))
263 as the exact equivalent.
269 BOOST_VMD_TUPLE(sequence) looked for an tuple at
270 the beginning of a sequence and returned a 2-element tuple, where the first
271 element is the tuple and the second tuple element is the rest of the sequence.
272 If no tuple is found both tuple elements are empty.
276 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE,BOOST_VMD_RETURN_AFTER)
277 is the exact equivalent.
281 BOOST_VMD_BEGIN_TUPLE(sequence) looked for a tuple at
282 the beginning of a sequence and returned the tuple if found or emptiness
283 if no tuple is found.
287 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE) is the exact equivalent.
291 BOOST_VMD_AFTER_TUPLE(sequence) looked for an tuple at the
292 beginning of a sequence and returned the rest of the sequence or emptiness if
297 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE,BOOST_VMD_RETURN_ONLY_AFTER)
298 is the exact equivalent.
302 BOOST_VMD_IS_BEGIN_TUPLE(sequence,...) returns 1 if input
303 begins with an tuple, else 0 if it does not.
307 BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE) returns the tuple found,
308 otherwise emptiness if not found. You can use
309 BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE)))
310 as the exact equivalent.