DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
Stream.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Common.h
"
4
#include "
System/Object.h
"
5
#include "
System/IO/IDisposable.h
"
6
7
namespace
DotNetDupe
{
8
namespace
System
{
9
namespace
IO
{
16
class
Stream
:
public
Object
,
public
IDisposable
{
17
public
:
19
virtual
~Stream
() =
default
;
20
23
virtual
bool
CanRead
()
const
= 0;
24
27
virtual
bool
CanSeek
()
const
= 0;
28
31
virtual
bool
CanWrite
()
const
= 0;
32
36
virtual
long
GetLength
()
const
= 0;
37
41
virtual
long
GetPosition
()
const
= 0;
42
46
virtual
void
SetPosition
(
long
value) = 0;
47
49
virtual
void
Flush
() = 0;
50
56
virtual
int
Read
(
char
* buffer,
int
offset,
int
count) = 0;
57
62
virtual
long
Seek
(
long
offset,
int
origin) = 0;
63
66
virtual
void
SetLength
(
long
value) = 0;
67
72
virtual
void
Write
(
const
char
* buffer,
int
offset,
int
count) = 0;
73
75
virtual
void
Dispose
() = 0;
76
};
77
}
78
}
79
}
Common.h
Defines common cross-platform macros, export decorators, and fundamental types.
IDisposable.h
Object.h
Base object class for DotNetDupe mirroring .NET System.Object.
DotNetDupe::System::IO::IDisposable
Provides a mechanism for releasing unmanaged resources.
Definition
IDisposable.h:13
DotNetDupe::System::IO::Stream
Provides a generic view of a sequence of bytes.
Definition
Stream.h:16
DotNetDupe::System::IO::Stream::Seek
virtual long Seek(long offset, int origin)=0
Sets the position within the current stream.
DotNetDupe::System::IO::Stream::~Stream
virtual ~Stream()=default
Virtual destructor ensuring proper polymorphic destruction.
DotNetDupe::System::IO::Stream::Write
virtual void Write(const char *buffer, int offset, int count)=0
Writes a sequence of bytes to the current stream and advances the current position within this stream...
DotNetDupe::System::IO::Stream::Flush
virtual void Flush()=0
Clears all buffers for this stream and causes any buffered data to be written to the underlying devic...
DotNetDupe::System::IO::Stream::SetPosition
virtual void SetPosition(long value)=0
Sets the position within the current stream.
DotNetDupe::System::IO::Stream::GetLength
virtual long GetLength() const =0
Gets the length in bytes of the stream.
DotNetDupe::System::IO::Stream::SetLength
virtual void SetLength(long value)=0
Sets the length of the current stream.
DotNetDupe::System::IO::Stream::CanRead
virtual bool CanRead() const =0
Gets a value indicating whether the current stream supports reading.
DotNetDupe::System::IO::Stream::GetPosition
virtual long GetPosition() const =0
Gets the position within the current stream.
DotNetDupe::System::IO::Stream::CanWrite
virtual bool CanWrite() const =0
Gets a value indicating whether the current stream supports writing.
DotNetDupe::System::IO::Stream::Read
virtual int Read(char *buffer, int offset, int count)=0
Reads a sequence of bytes from the current stream and advances the position within the stream by the ...
DotNetDupe::System::IO::Stream::CanSeek
virtual bool CanSeek() const =0
Gets a value indicating whether the current stream supports seeking.
DotNetDupe::System::IO::Stream::Dispose
virtual void Dispose()=0
Releases all resources used by the Stream.
DotNetDupe::System::Object
Supports all classes in the DotNetDupe class hierarchy.
Definition
Object.h:18
DotNetDupe::System::IO
Definition
Console.h:17
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
Include
System
IO
Stream.h
Generated by
1.18.0