/*============================================================================= Copyright (c) 1999-2003 Jaakko Järvi Copyright (c) 1999-2003 Jeremiah Willcock Copyright (c) 2001-2006 Joel de Guzman 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(FUSION_IN_05052005_0121) #define FUSION_IN_05052005_0121 #include #include #include #include #include #include #include #include namespace boost { namespace fusion { namespace detail { template struct delimiter_in { // read a delimiter template static void read(IS& is, char const* delim, mpl::false_ = mpl::false_()) { detail::string_ios_manip manip(is); manip.read(delim); } template static void read(IS& is, char const* delim, mpl::true_) { } }; struct read_sequence_loop { template static void call(IS& is, First const&, Last const&, mpl::true_) { } template static void call(IS& is, First const& first, Last const& last, mpl::false_) { result_of::equal_to< typename result_of::next::type , Last > is_last; is >> *first; delimiter_in::read(is, " ", is_last); call(is, fusion::next(first), last, is_last); } template static void call(IS& is, First const& first, Last const& last) { result_of::equal_to eq; call(is, first, last, eq); } }; template inline void read_sequence(IS& is, Sequence& seq) { delimiter_in::read(is, "("); read_sequence_loop::call(is, fusion::begin(seq), fusion::end(seq)); delimiter_in::read(is, ")"); } }}} #endif