RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::IO::Stream Class Referenceabstract

Provides a generic view of a sequence of bytes. This is an abstract class More...

Inheritance diagram for System::IO::Stream:
System::IO::Compression::CompressionStream System::IO::FileStream System::IO::MemoryStream System::IO::Compression::DeflateStream System::IO::Compression::GZipStream System::IO::BufferedStream System::IO::UnmanagedMemoryStream

Public Member Functions

virtual intptr_t GetPos () const =0
 When overridden in a derived class, gets the position within the current stream More...
 
virtual void SetPos (intptr_t Pos)=0
 When overridden in a derived class, sets the position within the current stream More...
 
 RLIB_PROPERTY_GET_SET (intptr_t Position, GetPos, SetPos)
 When overridden in a derived class, gets or sets the position within the current stream More...
 
virtual intptr_t GetSize () const =0
 When overridden in a derived class, gets the capacity in bytes of the stream More...
 
virtual void SetSize (intptr_t size)=0
 When overridden in a derived class, sets the capacity in bytes of the stream More...
 
 RLIB_PROPERTY_GET_SET (intptr_t Size, GetSize, SetSize)
 When overridden in a derived class, gets or sets the capacity in bytes of the stream More...
 
virtual intptr_t GetLength () const =0
 When overridden in a derived class, gets the length in bytes of the stream More...
 
virtual void SetLength (intptr_t len)=0
 When overridden in a derived class, sets the length in bytes of the stream More...
 
 RLIB_PROPERTY_GET_SET (intptr_t Length, GetLength, SetLength)
 When overridden in a derived class, gets or sets the length in bytes of the stream More...
 
virtual intptr_t Read (LPVOID buffer, intptr_t count) const =0
 When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read More...
 
virtual intptr_t Write (LPCVOID buffer, intptr_t count)=0
 When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written More...
 
virtual void Flush ()=0
 When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. More...
 
virtual void Close ()=0
 When overridden in a derived class, Closes the current stream and releases any resources associated with the current stream More...
 
virtual bool InheritFromMemoryStream () const =0
 When overridden in a derived class, identifies whether current class is a derived class of (or the same class as) MemoryStream More...
 
virtual bool InheritFromBufferedStream () const =0
 When overridden in a derived class, identifies whether current class is a derived class of (or the same class as) BufferedStream More...
 
intptr_t GetMaxReadSize () const
 Gets the maximum bytes of readable data from current position More...
 
 RLIB_PROPERTY_GET (intptr_t MaxReadSize, GetMaxReadSize)
 Gets the maximum bytes of readable data from current position More...
 
intptr_t GetMaxWriteSize () const
 Gets the maximum writeable bytes from current position, based on current capacity More...
 
 RLIB_PROPERTY_GET (intptr_t MaxWriteSize, GetMaxWriteSize)
 Gets the maximum writeable bytes from current position, based on current capacity More...
 
void CopyTo (Stream *destination, intptr_t bufferSize=RLIB_DEFAULT_BUFFER_SIZE) const
 Reads the bytes from the current stream and writes them to another stream, using a specified buffer size More...
 

Detailed Description

Provides a generic view of a sequence of bytes. This is an abstract class

Member Function Documentation

virtual void System::IO::Stream::Close ( )
pure virtual

When overridden in a derived class, Closes the current stream and releases any resources associated with the current stream

Implemented in System::IO::FileStream, System::IO::Compression::CompressionStream, System::IO::UnmanagedMemoryStream, and System::IO::BufferedStream.

void Stream::CopyTo ( Stream destination,
intptr_t  bufferSize = RLIB_DEFAULT_BUFFER_SIZE 
) const

Reads the bytes from the current stream and writes them to another stream, using a specified buffer size

Parameters
destinationThe stream to which the contents of the current stream will be copied
bufferSizeThe size of the buffer
Returns
virtual void System::IO::Stream::Flush ( )
pure virtual

When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Implemented in System::IO::FileStream, and System::IO::Compression::CompressionStream.

virtual intptr_t System::IO::Stream::GetLength ( ) const
pure virtual

When overridden in a derived class, gets the length in bytes of the stream

Implemented in System::IO::FileStream, and System::IO::MemoryStream.

intptr_t System::IO::Stream::GetMaxReadSize ( ) const
inline

Gets the maximum bytes of readable data from current position

intptr_t System::IO::Stream::GetMaxWriteSize ( ) const
inline

Gets the maximum writeable bytes from current position, based on current capacity

virtual intptr_t System::IO::Stream::GetPos ( ) const
pure virtual

When overridden in a derived class, gets the position within the current stream

Implemented in System::IO::FileStream, and System::IO::MemoryStream.

virtual intptr_t System::IO::Stream::GetSize ( ) const
pure virtual

When overridden in a derived class, gets the capacity in bytes of the stream

Implemented in System::IO::MemoryStream.

virtual bool System::IO::Stream::InheritFromBufferedStream ( ) const
pure virtual

When overridden in a derived class, identifies whether current class is a derived class of (or the same class as) BufferedStream

Implemented in System::IO::FileStream, System::IO::Compression::CompressionStream, System::IO::UnmanagedMemoryStream, and System::IO::BufferedStream.

virtual bool System::IO::Stream::InheritFromMemoryStream ( ) const
pure virtual

When overridden in a derived class, identifies whether current class is a derived class of (or the same class as) MemoryStream

Implemented in System::IO::FileStream, System::IO::Compression::CompressionStream, and System::IO::MemoryStream.

virtual intptr_t System::IO::Stream::Read ( LPVOID  buffer,
intptr_t  count 
) const
pure virtual

When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read

Implemented in System::IO::FileStream, System::IO::Compression::CompressionStream, and System::IO::MemoryStream.

System::IO::Stream::RLIB_PROPERTY_GET ( intptr_t  MaxReadSize,
GetMaxReadSize   
)

Gets the maximum bytes of readable data from current position

System::IO::Stream::RLIB_PROPERTY_GET ( intptr_t  MaxWriteSize,
GetMaxWriteSize   
)

Gets the maximum writeable bytes from current position, based on current capacity

System::IO::Stream::RLIB_PROPERTY_GET_SET ( intptr_t  Position,
GetPos  ,
SetPos   
)

When overridden in a derived class, gets or sets the position within the current stream

System::IO::Stream::RLIB_PROPERTY_GET_SET ( intptr_t  Size,
GetSize  ,
SetSize   
)

When overridden in a derived class, gets or sets the capacity in bytes of the stream

System::IO::Stream::RLIB_PROPERTY_GET_SET ( intptr_t  Length,
GetLength  ,
SetLength   
)

When overridden in a derived class, gets or sets the length in bytes of the stream

virtual void System::IO::Stream::SetLength ( intptr_t  len)
pure virtual

When overridden in a derived class, sets the length in bytes of the stream

Implemented in System::IO::FileStream, System::IO::UnmanagedMemoryStream, and System::IO::BufferedStream.

virtual void System::IO::Stream::SetPos ( intptr_t  Pos)
pure virtual

When overridden in a derived class, sets the position within the current stream

Implemented in System::IO::FileStream, and System::IO::MemoryStream.

virtual void System::IO::Stream::SetSize ( intptr_t  size)
pure virtual

When overridden in a derived class, sets the capacity in bytes of the stream

Implemented in System::IO::UnmanagedMemoryStream, and System::IO::BufferedStream.

virtual intptr_t System::IO::Stream::Write ( LPCVOID  buffer,
intptr_t  count 
)
pure virtual

When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written

Implemented in System::IO::Compression::CompressionStream, System::IO::UnmanagedMemoryStream, and System::IO::BufferedStream.


The documentation for this class was generated from the following files: