/*============================================================================= Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #if !defined(BOOST_SPIRIT_CONSTRUCT_MAR_24_2007_0629PM) #define BOOST_SPIRIT_CONSTRUCT_MAR_24_2007_0629PM #if defined(_MSC_VER) #pragma once #endif #include #include #include #include namespace boost { namespace spirit { namespace traits { /////////////////////////////////////////////////////////////////////////// // We provide overloads for the assign_to_attribute_from_iterators // customization point for all built in types /////////////////////////////////////////////////////////////////////////// template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, char& attr) { attr = *first; } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, signed char& attr) { attr = *first; } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, unsigned char& attr) { attr = *first; } }; // wchar_t is intrinsic template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, wchar_t& attr) { attr = *first; } }; #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) // wchar_t is intrinsic, have separate overload for unsigned short template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, unsigned short& attr) { attr = *first; } }; #endif template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, bool& attr) { Iterator first_ = first; qi::parse(first_, last, bool_, attr); } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, short& attr) { Iterator first_ = first; qi::parse(first_, last, short_, attr); } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, int& attr) { Iterator first_ = first; qi::parse(first_, last, int_, attr); } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, unsigned int& attr) { Iterator first_ = first; qi::parse(first_, last, uint_, attr); } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, long& attr) { Iterator first_ = first; qi::parse(first_, last, long_, attr); } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, unsigned long& attr) { Iterator first_ = first; qi::parse(first_, last, ulong_, attr); } }; #ifdef BOOST_HAS_LONG_LONG template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, long_long_type& attr) { Iterator first_ = first; qi::parse(first_, last, long_long, attr); } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, ulong_long_type& attr) { Iterator first_ = first; qi::parse(first_, last, ulong_long, attr); } }; #endif template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, float& attr) { Iterator first_ = first; qi::parse(first_, last, float_, attr); } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, double& attr) { Iterator first_ = first; qi::parse(first_, last, double_, attr); } }; template struct assign_to_attribute_from_iterators { static void call(Iterator const& first, Iterator const& last, long double& attr) { Iterator first_ = first; qi::parse(first_, last, long_double, attr); } }; }}} #endif