File indexing completed on 2025-01-19 09:47:44
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(BOOST_SPIRIT_CONSTRUCT_MAR_24_2007_0629PM)
0009 #define BOOST_SPIRIT_CONSTRUCT_MAR_24_2007_0629PM
0010
0011 #if defined(_MSC_VER)
0012 #pragma once
0013 #endif
0014
0015 #include <boost/config.hpp>
0016 #include <boost/spirit/home/qi/parse.hpp>
0017 #include <boost/spirit/home/support/common_terminals.hpp>
0018 #include <boost/spirit/home/support/attributes_fwd.hpp>
0019
0020 namespace boost { namespace spirit { namespace traits
0021 {
0022
0023
0024
0025
0026 template <typename Iterator>
0027 struct assign_to_attribute_from_iterators<char, Iterator>
0028 {
0029 static void
0030 call(Iterator const& first, Iterator const&, char& attr)
0031 {
0032 attr = *first;
0033 }
0034 };
0035
0036 template <typename Iterator>
0037 struct assign_to_attribute_from_iterators<signed char, Iterator>
0038 {
0039 static void
0040 call(Iterator const& first, Iterator const&, signed char& attr)
0041 {
0042 attr = *first;
0043 }
0044 };
0045
0046 template <typename Iterator>
0047 struct assign_to_attribute_from_iterators<unsigned char, Iterator>
0048 {
0049 static void
0050 call(Iterator const& first, Iterator const&, unsigned char& attr)
0051 {
0052 attr = *first;
0053 }
0054 };
0055
0056
0057 template <typename Iterator>
0058 struct assign_to_attribute_from_iterators<wchar_t, Iterator>
0059 {
0060 static void
0061 call(Iterator const& first, Iterator const&, wchar_t& attr)
0062 {
0063 attr = *first;
0064 }
0065 };
0066
0067 #if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
0068
0069 template <typename Iterator>
0070 struct assign_to_attribute_from_iterators<unsigned short, Iterator>
0071 {
0072 static void
0073 call(Iterator const& first, Iterator const&, unsigned short& attr)
0074 {
0075 attr = *first;
0076 }
0077 };
0078 #endif
0079
0080 template <typename Iterator>
0081 struct assign_to_attribute_from_iterators<bool, Iterator>
0082 {
0083 static void
0084 call(Iterator const& first, Iterator const& last, bool& attr)
0085 {
0086 Iterator first_ = first;
0087 qi::parse(first_, last, bool_type(), attr);
0088 }
0089 };
0090
0091 template <typename Iterator>
0092 struct assign_to_attribute_from_iterators<short, Iterator>
0093 {
0094 static void
0095 call(Iterator const& first, Iterator const& last, short& attr)
0096 {
0097 Iterator first_ = first;
0098 qi::parse(first_, last, short_type(), attr);
0099 }
0100 };
0101
0102 template <typename Iterator>
0103 struct assign_to_attribute_from_iterators<int, Iterator>
0104 {
0105 static void
0106 call(Iterator const& first, Iterator const& last, int& attr)
0107 {
0108 Iterator first_ = first;
0109 qi::parse(first_, last, int_type(), attr);
0110 }
0111 };
0112 template <typename Iterator>
0113 struct assign_to_attribute_from_iterators<unsigned int, Iterator>
0114 {
0115 static void
0116 call(Iterator const& first, Iterator const& last, unsigned int& attr)
0117 {
0118 Iterator first_ = first;
0119 qi::parse(first_, last, uint_type(), attr);
0120 }
0121 };
0122
0123 template <typename Iterator>
0124 struct assign_to_attribute_from_iterators<long, Iterator>
0125 {
0126 static void
0127 call(Iterator const& first, Iterator const& last, long& attr)
0128 {
0129 Iterator first_ = first;
0130 qi::parse(first_, last, long_type(), attr);
0131 }
0132 };
0133 template <typename Iterator>
0134 struct assign_to_attribute_from_iterators<unsigned long, Iterator>
0135 {
0136 static void
0137 call(Iterator const& first, Iterator const& last, unsigned long& attr)
0138 {
0139 Iterator first_ = first;
0140 qi::parse(first_, last, ulong_type(), attr);
0141 }
0142 };
0143
0144 #ifdef BOOST_HAS_LONG_LONG
0145 template <typename Iterator>
0146 struct assign_to_attribute_from_iterators<boost::long_long_type, Iterator>
0147 {
0148 static void
0149 call(Iterator const& first, Iterator const& last, boost::long_long_type& attr)
0150 {
0151 Iterator first_ = first;
0152 qi::parse(first_, last, long_long_type(), attr);
0153 }
0154 };
0155 template <typename Iterator>
0156 struct assign_to_attribute_from_iterators<boost::ulong_long_type, Iterator>
0157 {
0158 static void
0159 call(Iterator const& first, Iterator const& last, boost::ulong_long_type& attr)
0160 {
0161 Iterator first_ = first;
0162 qi::parse(first_, last, ulong_long_type(), attr);
0163 }
0164 };
0165 #endif
0166
0167 template <typename Iterator>
0168 struct assign_to_attribute_from_iterators<float, Iterator>
0169 {
0170 static void
0171 call(Iterator const& first, Iterator const& last, float& attr)
0172 {
0173 Iterator first_ = first;
0174 qi::parse(first_, last, float_type(), attr);
0175 }
0176 };
0177
0178 template <typename Iterator>
0179 struct assign_to_attribute_from_iterators<double, Iterator>
0180 {
0181 static void
0182 call(Iterator const& first, Iterator const& last, double& attr)
0183 {
0184 Iterator first_ = first;
0185 qi::parse(first_, last, double_type(), attr);
0186 }
0187 };
0188
0189 template <typename Iterator>
0190 struct assign_to_attribute_from_iterators<long double, Iterator>
0191 {
0192 static void
0193 call(Iterator const& first, Iterator const& last, long double& attr)
0194 {
0195 Iterator first_ = first;
0196 qi::parse(first_, last, long_double_type(), attr);
0197 }
0198 };
0199
0200 }}}
0201
0202 #endif