boost::convert_output_iterator
// In header: <boost/iterator/convert_iterator_fwd.hpp> template<typename OutputIterator, typename OneManyConverter> struct convert_output_iterator { // types typedef void difference_type; typedef void value_type; typedef convert_output_iterator< OutputIterator, OneManyConverter > * pointer; typedef convert_output_iterator< OutputIterator, OneManyConverter > & reference; typedef std::output_iterator_tag iterator_category; // construct/copy/destruct convert_output_iterator(); convert_output_iterator(OutputIterator, OneManyConverter); convert_output_iterator& operator=(const typename OneManyConverter::input_type &); // public member functions BOOST_CONCEPT_ASSERT((OutputIteratorConcept< OutputIterator, typename OneManyConverter::output_type >)); BOOST_CONCEPT_ASSERT((OneManyConverterConcept< OneManyConverter >)); OutputIterator base() const; const convert_output_iterator & operator*() const; convert_output_iterator & operator++(); convert_output_iterator & operator++(int); bool operator==(const convert_output_iterator &) const; bool operator!=(const convert_output_iterator &) const; // private member functions OutputIterator & get_out() const; OneManyConverter & get_conv() const; };
Output Iterator adapter that wraps an output iterator to make one that will convert its output before pushing it to the wrapped iterator.
convert_output_iterator
public member functionsBOOST_CONCEPT_ASSERT((OutputIteratorConcept< OutputIterator, typename OneManyConverter::output_type >));
BOOST_CONCEPT_ASSERT((OneManyConverterConcept< OneManyConverter >));
OutputIterator base() const;
const convert_output_iterator & operator*() const;
convert_output_iterator & operator++();
convert_output_iterator & operator++(int);
bool operator==(const convert_output_iterator & other) const;
bool operator!=(const convert_output_iterator & other) const;