xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Toggle main menu visibility
Home
Categories
Documentation
Namespaces
Classes
Class List
Class Index
Class Hierarchy
Files
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
Loading...
Searching...
No Matches
xtd.core
include
xtd
io
stream_reader.h
Go to the documentation of this file.
1
4
#pragma once
5
6
#include <fstream>
7
#include <optional>
8
#include "
text_reader.h
"
9
11
namespace
xtd
{
13
namespace
io {
20
class
stream_reader
:
public
xtd::io::text_reader
{
21
public
:
25
stream_reader
(
const
xtd::ustring
&
path
);
28
stream_reader
(std::istream& stream);
30
~stream_reader
();
32
35
std::optional<std::reference_wrapper<std::istream>>
base_stream
()
const
;
36
39
bool
end_of_stream
()
const
;
40
42
void
close
()
override
;
43
46
int32_t
peek
()
const override
;
47
50
int32_t
read
()
override
;
51
52
private
:
53
std::istream* stream_ =
nullptr
;
54
bool
delete_when_destroy_ =
false
;
55
};
56
}
57
}
xtd::io::path
Performs operations on std::basic_string instances that contain file or directory path information....
Definition:
path.h:29
xtd::io::stream_reader
Implements a xtd::io::text_reader that reads characters from a byte stream.
Definition:
stream_reader.h:20
xtd::io::stream_reader::stream_reader
stream_reader(const xtd::ustring &path)
Initializes a new instance of the stream_reader class for the specified file name.
xtd::io::stream_reader::read
int32_t read() override
Reads the next character from the input stream and advances the character position by one character.
xtd::io::stream_reader::stream_reader
stream_reader(std::istream &stream)
Initializes a new instance of the stream_reader class for the specified stream.
xtd::io::stream_reader::base_stream
std::optional< std::reference_wrapper< std::istream > > base_stream() const
Returns the underlying stream.
xtd::io::stream_reader::peek
int32_t peek() const override
Reads the next character without changing the state of the reader or the character source....
xtd::io::stream_reader::close
void close() override
Closes the stream_reader object and the underlying stream, and releases any system resources associat...
xtd::io::stream_reader::end_of_stream
bool end_of_stream() const
Gets a value that indicates whether the current stream position is at the end of the stream.
xtd::io::text_reader
Represents a reader that can read a sequential series of characters.
Definition:
text_reader.h:29
xtd::ustring
Represents text as a sequence of UTF-8 code units.
Definition:
ustring.h:48
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition:
system_report.h:17
text_reader.h
Contains xtd::io::text_reader class.
Generated on Sat Jan 28 2023 18:12:25 for xtd - Reference Guide by
Gammasoft
. All rights reserved.