## wxTextOutputStream

This class provides functions that write text datas using an output stream. So, you can write text floats, integers.

You can also simulate the C++ cout class:

      wxFFileOutputStream output( stderr );
      wxTextOutputStream cout( output );

      cout << "This is a text line" << endl;
      cout << 1234;
      cout << 1.23456;

The wxTextOutputStream writes text files (or streams) on DOS, Macintosh and Unix in their native formats (concerning the line ending).

Members

wxTextOutputStream::wxTextOutputStream
wxTextOutputStream::~wxTextOutputStream
wxTextOutputStream::GetMode
wxTextOutputStream::SetMode
wxTextOutputStream::Write8
wxTextOutputStream::Write16
wxTextOutputStream::Write32
wxTextOutputStream::WriteDouble
wxTextOutputStream::WriteString

### wxTextOutputStream::wxTextOutputStream

wxTextOutputStream(wxOutputStream& stream, wxEOL mode = wxEOL_NATIVE, wxMBConv& conv = wxMBConvUTF8)

Constructs a text stream object from an output stream. Only write methods will be available. The second form is only available in Unicode mode. Parameters

stream

The output stream.

mode

The end-of-line mode. One of wxEOL_NATIVE, wxEOL_DOS, wxEOL_MAC and wxEOL_UNIX.

### wxTextOutputStream::~wxTextOutputStream

~wxTextOutputStream()

Destroys the wxTextOutputStream object.

### wxTextOutputStream::GetMode

wxEOL wxTextOutputStream::GetMode()

Returns the end-of-line mode. One of wxEOL_DOS, wxEOL_MAC and wxEOL_UNIX.

### wxTextOutputStream::SetMode

void wxTextOutputStream::SetMode(wxEOL mode = wxEOL_NATIVE)

Set the end-of-line mode. One of wxEOL_NATIVE, wxEOL_DOS, wxEOL_MAC and wxEOL_UNIX.

### wxTextOutputStream::Write8

void wxTextOutputStream::Write8(wxUint8 i8)

Writes the single byte i8 to the stream.

### wxTextOutputStream::Write16

void wxTextOutputStream::Write16(wxUint16 i16)

Writes the 16 bit integer i16 to the stream.

### wxTextOutputStream::Write32

void wxTextOutputStream::Write32(wxUint32 i32)

Writes the 32 bit integer i32 to the stream.

### wxTextOutputStream::WriteDouble

virtual void wxTextOutputStream::WriteDouble(double f)

Writes the double f to the stream using the IEEE format.

### wxTextOutputStream::WriteString

virtual void wxTextOutputStream::WriteString(const wxString& string)

Writes string as a line. Depending on the end-of-line mode, it adds \n, \r or \r\n.