Back to home page

EIC code displayed by LXR

 
 

    


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_GET_TYPE_HPP)
0008 #define BOOST_VMD_GET_TYPE_HPP
0009 
0010 #include <boost/vmd/detail/setup.hpp>
0011 
0012 #if BOOST_PP_VARIADICS
0013 
0014 #include <boost/vmd/detail/sequence_type.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_GET_TYPE(...)
0026 
0027     \brief Returns the type of a sequence as a VMD type.
0028 
0029     ...       = variadic parameters.
0030     
0031     The first variadic parameter is required and is the sequence whose type we are getting.
0032     
0033     The optional variadic parameters are return type parameters.
0034     
0035     The macro returns the type of a sequence as a VMD type. The type of an empty sequence
0036     is always BOOST_VMD_TYPE_EMPTY and the type of a multi-element is always
0037     BOOST_VMD_TYPE_SEQUENCE. The type of a single-element sequence is the
0038     type of that single element.
0039     
0040     The type returned can be modified by specifying an optional return type parameter.
0041     
0042     If BOOST_VMD_RETURN_TYPE, the default, is specified the specific type of the element
0043     is returned.
0044     
0045     If BOOST_VMD_RETURN_TYPE_ARRAY is specified
0046     an array type is returned if the element is an array, else a tuple
0047     type is returned if the element is a tuple, else the actual type
0048     is returned for non-tuple data. 
0049     
0050     If BOOST_VMD_RETURN_TYPE_LIST is specified
0051     a list type is returned if the element is a list, else a tuple
0052     type is returned if the element is a tuple, else the actual type
0053     is returned for non-tuple data. 
0054     
0055     If BOOST_VMD_RETURN_TYPE_TUPLE is specified
0056     a tuple type is returned for all tuple-like data, else the actual type
0057     is returned for non-tuple data. 
0058     
0059     If BOOST_VMD_RETURN_NO_TYPE is specified it is ignored since the macro
0060     always returns the type of the sequence.
0061              
0062     If more than one return type optional parameter is specified the last 
0063     one specified determines the return type.
0064     
0065     returns = the type of the sequence as a VMD type.
0066     
0067 */
0068 
0069 #define BOOST_VMD_GET_TYPE(...) \
0070     BOOST_VMD_DETAIL_SEQUENCE_TYPE(__VA_ARGS__) \
0071 /**/
0072 
0073 /** \def BOOST_VMD_GET_TYPE_D(d,...)
0074 
0075     \brief Returns the type of a sequence as a VMD type. Re-entrant version.
0076 
0077     d         = The next available BOOST_PP_WHILE iteration. <br/>
0078     ...       = variadic parameters.
0079     
0080     The first variadic parameter is required and is the sequence whose type we are getting.
0081     
0082     The optional variadic parameters are return type parameters.
0083     
0084     The macro returns the type of a sequence as a VMD type. The type of an empty sequence
0085     is always BOOST_VMD_TYPE_EMPTY and the type of a multi-element is always
0086     BOOST_VMD_TYPE_SEQUENCE. The type of a single-element sequence is the
0087     type of that single element.
0088     
0089     The type returned can be modified by specifying an optional return type parameter.
0090     
0091     If BOOST_VMD_RETURN_TYPE, the default, is specified the specific type of the element
0092     is returned.
0093     
0094     If BOOST_VMD_RETURN_TYPE_ARRAY is specified
0095     an array type is returned if the element is an array, else a tuple
0096     type is returned if the element is a tuple, else the actual type
0097     is returned for non-tuple data. 
0098     
0099     If BOOST_VMD_RETURN_TYPE_LIST is specified
0100     a list type is returned if the element is a list, else a tuple
0101     type is returned if the element is a tuple, else the actual type
0102     is returned for non-tuple data. 
0103     
0104     If BOOST_VMD_RETURN_TYPE_TUPLE is specified
0105     a tuple type is returned for all tuple-like data, else the actual type
0106     is returned for non-tuple data. 
0107     
0108     If BOOST_VMD_RETURN_NO_TYPE is specified it is ignored since the macro
0109     always returns the type of the sequence.
0110              
0111     If more than one return type optional parameter is specified the last 
0112     one specified determines the return type.
0113     
0114     returns = the type of the sequence as a VMD type.
0115     
0116 */
0117 
0118 #define BOOST_VMD_GET_TYPE_D(d,...) \
0119     BOOST_VMD_DETAIL_SEQUENCE_TYPE_D(d,__VA_ARGS__) \
0120 /**/
0121 
0122 #endif /* BOOST_PP_VARIADICS */
0123 #endif /* BOOST_VMD_GET_TYPE_HPP */