File indexing completed on 2025-01-19 09:47:35
0001
0002
0003
0004
0005
0006 #if !defined(BOOST_SPIRIT_KARMA_DETAIL_GENERATE_TO_FEB_20_2007_0417PM)
0007 #define BOOST_SPIRIT_KARMA_DETAIL_GENERATE_TO_FEB_20_2007_0417PM
0008
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012
0013 #include <boost/spirit/home/support/unused.hpp>
0014 #include <boost/spirit/home/support/char_class.hpp>
0015 #include <boost/spirit/home/karma/detail/output_iterator.hpp>
0016
0017 namespace boost { namespace spirit { namespace karma { namespace detail
0018 {
0019
0020
0021
0022
0023
0024 template <
0025 typename OutputIterator, typename Attribute, typename CharEncoding
0026 , typename Tag>
0027 inline bool
0028 generate_to(OutputIterator& sink, Attribute const& p, CharEncoding, Tag)
0029 {
0030 *sink = spirit::char_class::convert<CharEncoding>::to(Tag(), p);
0031 ++sink;
0032 return detail::sink_is_good(sink);
0033 }
0034
0035 template <typename OutputIterator, typename Attribute>
0036 inline bool
0037 generate_to(OutputIterator& sink, Attribute const& p, unused_type, unused_type)
0038 {
0039 *sink = p;
0040 ++sink;
0041 return detail::sink_is_good(sink);
0042 }
0043
0044 template <typename OutputIterator, typename CharEncoding, typename Tag>
0045 inline bool generate_to(OutputIterator&, unused_type, CharEncoding, Tag)
0046 {
0047 return true;
0048 }
0049
0050 template <typename OutputIterator, typename Attribute>
0051 inline bool
0052 generate_to(OutputIterator& sink, Attribute const& p)
0053 {
0054 *sink = p;
0055 ++sink;
0056 return detail::sink_is_good(sink);
0057 }
0058
0059 template <typename OutputIterator>
0060 inline bool generate_to(OutputIterator&, unused_type)
0061 {
0062 return true;
0063 }
0064
0065 }}}}
0066
0067 #endif