DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
StringReader.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Common.h
"
4
#include "
System/IO/TextReader.h
"
5
6
namespace
DotNetDupe
{
7
namespace
System
{
8
namespace
IO
{
15
class
StringReader
:
public
TextReader
{
16
public
:
19
DOTNETDUPE_API
StringReader
(
const
String
& sSource);
20
22
DOTNETDUPE_API
virtual
~StringReader
() =
default
;
23
25
DOTNETDUPE_API
void
Close
()
override
;
26
28
DOTNETDUPE_API
void
Dispose
()
override
;
29
32
DOTNETDUPE_API
int
Peek
()
override
;
33
36
DOTNETDUPE_API
int
Read
()
override
;
37
43
DOTNETDUPE_API
int
Read
(
char
* pBuffer,
int
iIndex,
int
nCount)
override
;
44
47
DOTNETDUPE_API
String
ReadLine
()
override
;
48
51
DOTNETDUPE_API
String
ReadToEnd
()
override
;
52
53
private
:
54
String
m_sSource;
55
int
m_iPos;
56
int
m_nLength;
57
};
58
}
59
}
60
}
Common.h
Defines common cross-platform macros, export decorators, and fundamental types.
DOTNETDUPE_API
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition
Common.h:20
TextReader.h
DotNetDupe::System::IO::StringReader::StringReader
StringReader(const String &sSource)
Initializes a new instance of the StringReader class that reads from the specified string.
Definition
StringReader.cpp:8
DotNetDupe::System::IO::StringReader::Close
void Close() override
Closes the StringReader.
Definition
StringReader.cpp:12
DotNetDupe::System::IO::StringReader::ReadLine
String ReadLine() override
Reads a line of characters from the current string and returns the data as a string.
Definition
StringReader.cpp:54
DotNetDupe::System::IO::StringReader::Peek
int Peek() override
Returns the next available character but does not consume it.
Definition
StringReader.cpp:20
DotNetDupe::System::IO::StringReader::~StringReader
virtual ~StringReader()=default
Virtual destructor ensuring proper resource cleanup.
DotNetDupe::System::IO::StringReader::ReadToEnd
String ReadToEnd() override
Reads all characters from the current position to the end of the string and returns them as a single ...
Definition
StringReader.cpp:74
DotNetDupe::System::IO::StringReader::Dispose
void Dispose() override
Releases all resources used by the StringReader.
Definition
StringReader.cpp:16
DotNetDupe::System::IO::StringReader::Read
int Read() override
Reads the next character from the input string and advances the character position by one character.
Definition
StringReader.cpp:26
DotNetDupe::System::IO::TextReader::TextReader
TextReader()=default
Initializes a new instance of the TextReader class.
DotNetDupe::System::String
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition
String.h:74
DotNetDupe::System::IO
Definition
Console.h:17
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
Include
System
IO
StringReader.h
Generated by
1.18.0