Function Template invert

Description
Headers
Reference

Description

The class template inverse is an adapter which transforms an InputFilter into an OutputFilter or vice versa. The function template invert is an object generator which when passed a Filter returns a instance of an appropriate specialization of inverse.

Given an InputFilter f, the inverse of f is Multi-Character OutputFilter whose member function write is implemented as follows. Given a Sink snk and a character buffer s of length n, we

Similarly, given an OutputFilter f, the inverse of f is Multi-Character InputFilter whose member function read is implemented as follows. Given a Source src and a character buffer s of length n, we

The mode of a specialization of inverse is equal to output if the mode of the underlying filter refines input, and to input otherwise.

Headers

<boost/iostreams/invert.hpp>

Reference

Synopsis

namespace boost { namespace iostreams {

template<typename Filter>
class inverse {
public:
    typedef typename char_type_of<Filter>::type  char_type;
    typedef see above                            mode;

    inverse(const Filter& filter);

    // Filter member functions
};

template<typename Filter>
inverse<Filter> invert(const Filter& filter);

} } // End namespace boost::io

Class Template inverse

Template parameters

Filter- A model of Filter

inverse::inverse

    inverse(const Filter& filter);

Constructs an instance of inverse based on the given filter.

Function Template invert

template<typename Filter>
inverse<Filter> invert(const Filter& filter);

Template parameters

Filter- A model of Filter

Constructs an instance of an appropriate specialization of inverse based on the given filter.