System::IO::TextWriter class

TextWriter class

A base class for classes that represent writers that writes sequences of characters to different destinations. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class TextWriter : public System::IDisposable

Methods

MethodDescription
virtual Close()Closes the stream and releases aquired resources.
Dispose() overrideReleases all resources used by the current object and closes the undelying stream.
virtual Flush()Flushes the content of the buffer to the underlying stream.
virtual get_Encoding()Returns the currently used encoding.
virtual get_FormatProvider() constReturns the currently used IFormatProvider object.
get_FormatProvider()Returns the currently used IFormatProvider object.
virtual get_NewLine() constReturns a line terminator string.
get_NewLine()Returns a line terminator string.
virtual set_NewLine(const System::String&)Sets a line terminator string.
virtual Write(const SharedPtr<Object>&)Writes the string representation of the specified object to the stream.
virtual Write(bool)Writes the string representation of the specified boolean value to the stream.
virtual Write(char_t)Writes the specified character to the stream.
virtual Write(Decimal)Writes the string representation of the specified Decimal object to the stream.
virtual Write(double)Writes the string representation of the specified double-precision floating point value to the stream.
virtual Write(int)Writes the string representation of the specified 32-bit integer value to the stream.
virtual Write(int64_t)Writes the string representation of the specified 64-bit integer value to the stream.
virtual Write(float)Writes the string representation of the specified single-precision floating point value to the stream.
virtual Write(const String&)Writes the specified string to the stream.
virtual Write(uint32_t)Writes the string representation of the specified unsigned 32-bit integer value to the stream.
virtual Write(uint64_t)Writes the string representation of the specified unsigned 64-bit integer value to the stream.
virtual Write(const ArrayPtr<char_t>&)Writes all characetrs from the specified array to the stream.
virtual Write(const ArrayPtr<char_t>&, int32_t, int32_t)Writes the specified subrange of UTF-16 characters from the specified character array to the stream.
virtual Write(const char_t *)Writes the specified c-string to the stream.
virtual Write(const TypeInfo&)Writes the string representation of the specified TypeInfo object to the stream.
Write(const String&, const TArgs&…)Writes the specified values formatted according to the specified format to the stream.
virtual WriteLine()Writes line terminator characters to the stream.
virtual WriteLine(const SharedPtr<Object>&)Writes the string representation of the specified object followed by the line-terminating characters to the stream.
virtual WriteLine(bool)Writes the string representation of the specified boolean value followed by the line-terminating characters to the stream.
virtual WriteLine(char_t)Writes the specified character followed by the line-terminating characters to the stream.
virtual WriteLine(Decimal)Writes the string representation of the specified Decimal object followed by the line-terminating characters to the stream.
virtual WriteLine(double)Writes the string representation of the specified double-precision floating point value followed by the line-terminating characters to the stream.
virtual WriteLine(int)Writes the string representation of the specified 32-bit integer value followed by the line-terminating characters to the stream.
virtual WriteLine(int64_t)Writes the string representation of the specified 64-bit integer value followed by the line-terminating characters to the stream.
virtual WriteLine(float)Writes the string representation of the specified single-precision floating point value followed by the line-terminating characters to the stream.
virtual WriteLine(const String&)Writes the specified string followed by the line-terminating characters to the stream.
virtual WriteLine(uint32_t)Writes the string representation of the specified unsigned 32-bit integer value followed by the line-terminating characters to the stream.
virtual WriteLine(uint64_t)Writes the string representation of the specified unsigned 64-bit integer value followed by the line-terminating characters to the stream.
virtual WriteLine(const ArrayPtr<char_t>&)Writes all characetrs from the specified array followed by the line-terminating characters to the stream.
virtual WriteLine(const ArrayPtr<char_t>&, int32_t, int32_t)Writes the specified subrange of UTF-16 characters from the specified character array followed by the line-terminating characters to the stream.
virtual WriteLine(const char_t *)Writes the specified c-string followed by the line-terminating characters to the stream.
virtual WriteLine(const TypeInfo&)Writes the string representation of the specified TypeInfo object followed by the line-terminating characters to the stream.
WriteLine(const String&, const TArgs&…)Writes the specified values formatted according to the specified format followed by the line-terminating characetrs to the stream.
virtual ~TextWriter()Destructor.

Typedefs

TypedefDescription
PtrAn alias for a shared pointer to this class.

See Also