class Poco::OutputLineEndingConverter

Overview

OutputLineEndingConverter performs line ending conversion on text output streams. Moreā€¦

#include <LineEndingConverter.h>

class OutputLineEndingConverter:
    public Poco::LineEndingConverterIOS,
    public ostream
{
public:
    // construction

    OutputLineEndingConverter(std::ostream& ostr);

    OutputLineEndingConverter(
        std::ostream& ostr,
        const std::string& newLineCharacters
        );
};

Inherited Members

public:
    // methods

    void
    setNewLine(const std::string& newLineCharacters);

    const std::string&
    getNewLine() const;

    LineEndingConverterStreamBuf*
    rdbuf();

protected:
    // fields

    LineEndingConverterStreamBuf _buf;

Detailed Documentation

OutputLineEndingConverter performs line ending conversion on text output streams.

The converter can convert from and to the Unix (LF), Mac (CR) and DOS/Windows/Network (CF-LF) endings.

Any newline sequence in the source will be replaced by the target newline sequence.

Construction

OutputLineEndingConverter(std::ostream& ostr)

Creates the LineEndingConverterOutputStream and connects it to the given input stream.

OutputLineEndingConverter(
    std::ostream& ostr,
    const std::string& newLineCharacters
    )

Creates the LineEndingConverterOutputStream and connects it to the given input stream.