xtd - Reference Guide
0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
xtd.core
include
xtd
io
string_writer.h
Go to the documentation of this file.
1
4
#pragma once
5
6
#include <sstream>
7
#include "
text_writer.h
"
8
10
namespace
xtd
{
12
namespace
io {
19
class
string_writer
:
public
xtd::io::text_writer
{
20
public
:
22
string_writer
() =
default
;
25
string_writer
(
const
xtd::ustring
& str);
26
29
const
std::ostream&
base_stream
() const noexcept;
32
std::ostream&
base_stream
() noexcept;
33
36
void
flush
() override;
37
38
xtd
::
ustring
to_string
() const noexcept override;
39
43
void
write
(const
xtd
::
ustring
& value) override;
44
private:
45
std::stringstream stream_;
46
};
47
}
48
}
xtd::io::string_writer
Implements a xtd::io::text_writer for writing characters to a string.
Definition
string_writer.h:19
xtd::io::string_writer::base_stream
const std::ostream & base_stream() const noexcept
Returns the underlying stream.
xtd::io::string_writer::string_writer
string_writer(const xtd::ustring &str)
Initializes a new instance of the stream_writer class for the specified string.
xtd::io::string_writer::string_writer
string_writer()=default
Initializes a new instance of the stream_writer class .
xtd::io::string_writer::to_string
xtd::ustring to_string() const noexcept override
Returns a std::string that represents the current object.
xtd::io::string_writer::flush
void flush() override
Clears all buffers for the current writer and causes any buffered data to be written to the underlyin...
xtd::io::text_writer
Represents a writer that can write a sequential series of characters.
Definition
text_writer.h:29
xtd::ustring
Represents text as a sequence of UTF-8 code units.
Definition
ustring.h:48
xtd::io::file_access::write
@ write
Write access to the file. Data can be written to the file. Combine with Read for read/write access.
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
system_report.h:17
text_writer.h
Contains xtd::io::text_writer class.
Generated on Tue Mar 12 2024 16:25:08 for xtd - Reference Guide by
Gammasoft
. All rights reserved.