|
||||
File indexing completed on 2025-01-30 10:02:16
0001 0002 // (C) Copyright Edward Diener 2011-2015 0003 // Use, modification and distribution are subject to the Boost Software License, 0004 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 0005 // http://www.boost.org/LICENSE_1_0.txt). 0006 0007 #if !defined(BOOST_VMD_ENUM_HPP) 0008 #define BOOST_VMD_ENUM_HPP 0009 0010 #include <boost/vmd/detail/setup.hpp> 0011 0012 #if BOOST_PP_VARIADICS 0013 0014 #include <boost/vmd/detail/sequence_enum.hpp> 0015 0016 /* 0017 0018 The succeeding comments in this file are in doxygen format. 0019 0020 */ 0021 0022 /** \file 0023 */ 0024 0025 /** \def BOOST_VMD_ENUM(...) 0026 0027 \brief Converts a sequence to comma-separated elements which are the elements of the sequence. 0028 0029 ... = Variadic parameters. 0030 0031 The first variadic parameter is required and is the sequence to convert. 0032 0033 Further optional variadic parameters can be return type parameters. Return type 0034 parameters allow each element in the sequence to be converted to a two-element 0035 tuple where the first tuple element is the type and the second tuple element 0036 is the element data. 0037 0038 The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each 0039 converted element but just the data. All of the rest return the type and data as the 0040 two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element 0041 is returned in the tuple. If BOOST_VMD_RETURN_TYPE_ARRAY is specified an array type is 0042 returned if the element is an array, else a tuple type is returned if the element is a tuple, 0043 else the actual type is returned for non-tuple data. If BOOST_VMD_RETURN_TYPE_LIST is specified 0044 a list type is returned if the element is a list, else a tuple type is returned if the element 0045 is a tuple, else the actual type is returned for non-tuple data. If BOOST_VMD_RETURN_TYPE_TUPLE 0046 is specified a tuple type is returned for all tuple-like data, else the actual type is returned 0047 for non-tuple data. If more than one return type optional parameter is specified the last one 0048 specified determines the return type. 0049 0050 returns = Comma-separated data, otherwise known as variadic data. 0051 If the sequence is empty the variadic data is empty. If an 0052 optional return type other than BOOST_VMD_RETURN_NO_TYPE 0053 is specified the type and the data of each element is 0054 returned as part of the variadic data. Otherwise just the data 0055 of each element is returned, which is the default. 0056 0057 */ 0058 0059 #define BOOST_VMD_ENUM(...) \ 0060 BOOST_VMD_DETAIL_SEQUENCE_ENUM(__VA_ARGS__) \ 0061 /**/ 0062 0063 /** \def BOOST_VMD_ENUM_D(d,...) 0064 0065 \brief Converts a sequence to comma-separated elements which are the elements of the sequence. Re-entrant version. 0066 0067 d = The next available BOOST_PP_WHILE iteration. <br/> 0068 ... = Variadic parameters. 0069 0070 The first variadic parameter is required and is the sequence to convert. 0071 0072 Further optional variadic parameters can be return type parameters. Return type 0073 parameters allow each element in the sequence to be converted to a two-element 0074 tuple where the first tuple element is the type and the second tuple element 0075 is the element data. 0076 0077 The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each 0078 converted element but just the data. All of the rest return the type and data as the 0079 two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element 0080 is returned in the tuple. If BOOST_VMD_RETURN_TYPE_ARRAY is specified an array type is 0081 returned if the element is an array, else a tuple type is returned if the element is a tuple, 0082 else the actual type is returned for non-tuple data. If BOOST_VMD_RETURN_TYPE_LIST is specified 0083 a list type is returned if the element is a list, else a tuple type is returned if the element 0084 is a tuple, else the actual type is returned for non-tuple data. If BOOST_VMD_RETURN_TYPE_TUPLE 0085 is specified a tuple type is returned for all tuple-like data, else the actual type is returned 0086 for non-tuple data. If more than one return type optional parameter is specified the last one 0087 specified determines the return type. 0088 0089 returns = Comma-separated data, otherwise known as variadic data. 0090 If the sequence is empty the variadic data is empty. If an 0091 optional return type other than BOOST_VMD_RETURN_NO_TYPE 0092 is specified the type and the data of each element is 0093 returned as part of the variadic data. Otherwise just the data 0094 of each element is returned, which is the default. 0095 0096 */ 0097 0098 #define BOOST_VMD_ENUM_D(d,...) \ 0099 BOOST_VMD_DETAIL_SEQUENCE_ENUM_D(d,__VA_ARGS__) \ 0100 /**/ 0101 0102 #endif /* BOOST_PP_VARIADICS */ 0103 #endif /* BOOST_VMD_ENUM_HPP */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |