Represents a writer that can write a sequential series of characters.
Public Fields | |
static null_text_writer & | null () noexcept |
Provides a text_writer with no backing store that can be written to, but not read from. | |
Public Static Methods | |
static synchronized_text_writer | synchronised (text_writer &writer) noexcept |
Creates a thread-safe (synchronized) wrapper around the specified text_writer object. | |
Public Properties | |
const xtd::string & | new_line () const noexcept |
Gets the line terminator string used by the current text_writer. | |
void | new_line (const xtd::string &new_line) noexcept |
Sets the line terminator string used by the current text_writer. | |
Public Methods | |
virtual void | close () |
Closes the xtd::io::text_reader and releases any system resources associated with the text_reader. | |
virtual void | flush () |
Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. | |
virtual void | write (const xtd::string &value) |
Writes the specified string value to the text stream. | |
void | write (bool value) |
Writes the specified bool value to the text stream. | |
void | write (double value) |
Writes the specified double value to the text stream. | |
void | write (float value) |
Writes the specified float value to the text stream. | |
void | write (sbyte value) |
Writes the specified sbyte value to the text stream. | |
void | write (int16 value) |
Writes the specified int16 value to the text stream. | |
void | write (int32 value) |
Writes the specified int32 value to the text stream. | |
void | write (int64 value) |
Writes the specified int64 value to the text stream. | |
void | write (xtd::byte value) |
Writes the specified xtd::byte value to the text stream. | |
void | write (uint16 value) |
Writes the specified uint16 value to the text stream. | |
void | write (uint32 value) |
Writes the specified uint32 value to the text stream. | |
void | write (uint64 value) |
Writes the specified uint64 value to the text stream. | |
template<typename value_t > | |
void | write (value_t value) |
Writes the specified value_t value to the text stream. | |
template<typename ... args_t> | |
void | write (const xtd::string &fmt, args_t &&... args) noexcept |
Writes the specified arguments with specified format to the text stream. | |
void | write_line () |
Writes new line to the text stream. | |
void | write_line (const xtd::string &value) |
Writes the specified string value and new line to the text stream. | |
void | write_line (bool value) |
Writes the specified bool value and new line to the text stream. | |
void | write_line (double value) |
Writes the specified double value and new line to the text stream. | |
void | write_line (float value) |
Writes the specified float value and new line to the text stream. | |
void | write_line (sbyte value) |
Writes the specified sbyte value and new line to the text stream. | |
void | write_line (int16 value) |
Writes the specified int16 value and new line to the text stream. | |
void | write_line (int32 value) |
Writes the specified int32 value and new line to the text stream. | |
void | write_line (int64 value) |
Writes the specified int64 value and new line to the text stream. | |
void | write_line (xtd::byte value) |
Writes the specified xtd::byte value and new line to the text stream. | |
void | write_line (uint16 value) |
Writes the specified uint16 value and new line to the text stream. | |
void | write_line (uint32 value) |
Writes the specified uint32 value and new line to the text stream. | |
void | write_line (uint64 value) |
Writes the specified uint64 value and new line to the text stream. | |
template<typename value_t > | |
void | write_line (value_t value) |
Writes the specified value_t value and new line to the text stream. | |
template<typename ... args_t> | |
void | write_line (const xtd::string &fmt, args_t &&... args) noexcept |
Writes the specified arguments with specified format to the text stream. | |
Protected constructors | |
text_writer ()=default | |
Initializes a new instance of the xtd::io::text_writer class. | |
Additional Inherited Members | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
virtual xtd::string | to_string () const noexcept |
Returns a xtd::string that represents the current object. | |
Static Public Member Functions inherited from xtd::object | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<typename object_a_t , typename object_b_t > | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
|
protecteddefault |
Initializes a new instance of the xtd::io::text_writer class.
|
staticnoexcept |
Provides a text_writer with no backing store that can be written to, but not read from.
|
noexcept |
Gets the line terminator string used by the current text_writer.
|
noexcept |
Sets the line terminator string used by the current text_writer.
|
virtual |
Closes the xtd::io::text_reader and releases any system resources associated with the text_reader.
Reimplemented in xtd::io::stream_writer.
|
virtual |
Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.
Reimplemented in xtd::io::stream_writer, and xtd::io::string_writer.
|
virtual |
Writes the specified string value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
Reimplemented in xtd::io::null_text_writer, xtd::io::stream_writer, xtd::io::stream_writer, xtd::io::string_writer, and xtd::io::synchronized_text_writer.
void xtd::io::text_writer::write | ( | bool | value | ) |
Writes the specified bool value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | double | value | ) |
Writes the specified double value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | float | value | ) |
Writes the specified float value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | sbyte | value | ) |
Writes the specified sbyte value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | int16 | value | ) |
Writes the specified int16 value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | int32 | value | ) |
Writes the specified int32 value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | int64 | value | ) |
Writes the specified int64 value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | xtd::byte | value | ) |
Writes the specified xtd::byte value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | uint16 | value | ) |
Writes the specified uint16 value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | uint32 | value | ) |
Writes the specified uint32 value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write | ( | uint64 | value | ) |
Writes the specified uint64 value to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
|
inline |
Writes the specified value_t value to the text stream.
value_t | The type of value to write. |
value | The value to write. |
io::io_exception | An I/O error occurs. |
|
inlinenoexcept |
Writes the specified arguments with specified format to the text stream.
format | The arguments format to write. |
args | The arguments to write with format |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | ) |
Writes new line to the text stream.
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | const xtd::string & | value | ) |
Writes the specified string value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | bool | value | ) |
Writes the specified bool value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | double | value | ) |
Writes the specified double value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | float | value | ) |
Writes the specified float value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | sbyte | value | ) |
Writes the specified sbyte value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | int16 | value | ) |
Writes the specified int16 value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | int32 | value | ) |
Writes the specified int32 value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | int64 | value | ) |
Writes the specified int64 value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | xtd::byte | value | ) |
Writes the specified xtd::byte value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | uint16 | value | ) |
Writes the specified uint16 value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | uint32 | value | ) |
Writes the specified uint32 value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
void xtd::io::text_writer::write_line | ( | uint64 | value | ) |
Writes the specified uint64 value and new line to the text stream.
value | The value to write. |
io::io_exception | An I/O error occurs. |
|
inline |
Writes the specified value_t value and new line to the text stream.
value_t | The type of value to write. |
value | The value to write. |
io::io_exception | An I/O error occurs. |
|
inlinenoexcept |
Writes the specified arguments with specified format to the text stream.
format | The arguments format to write. |
args | The arguments to write with format. |
io::io_exception | An I/O error occurs. |
|
staticnoexcept |
Creates a thread-safe (synchronized) wrapper around the specified text_writer object.
reader | The TextReader object to synchronize. |