TBase_Stream
What: class
Ancestor: TCommon_COM_Interface
File: _COMLists
Layer: 0
Platforms: C++, C#, Javascript, Pascal (All), PHP, Python
This base stream class makes writing descendent stream classes easier. The following
methods need not be reimplemented in descendents: Write_String, Write_Line, Write_Line_String,
Read_Line, and Read_String. Note that these streams have no relationship (except
in concept) to streams on any of the platforms. The class has the following methods:
At_End
bool At_End()
function At_End : boolean
Returns True if there is no more data in the stream to read.
Read
int32 Read( void* Buffer, int32& _Size )
function Read( var Buffer ; var _Size : longint ) : longint
Reads the specified number of bytes from the stream. Size is modified to be the
actual bytes transferred.
Read_Line
void Read_Line( void* Buffer, int32& _Size )
procedure Read_Line( var Buffer ; var _Size : longint )
Reads one line of input, up to the size of the buffer.
The line is assumed to end at an ASCII 13 code. The
ASCII 13 code is not included in the returned data.
Size is modified to be the actual bytes transferred.
Read_String
string Read_String()
function Read_String : string
Reads one line of input. The line is assumed to end at
an ASCII 13 code. The ASCII 13 code is not included in
the returned data.
Seek
void Seek( int32 Position )
procedure Seek( Position : longint )
Position to specified byte within streamed data.
Write
void Write( void* Buffer, int32 _Size )
procedure Write( var Buffer ; _Size : longint )
Writes the specified buffer, of the specified size in bytes, to the stream.
Write_Line
void Write_Line( char* Buffer )
procedure Write_Line( Buffer : PChar )
Writes the specified null-terminated text to the stream.
An ASCII code 13 is appended to the text on output.
Write_Line_String
void Write_Line_String( const string Buffer )
procedure Write_Line_String( const Buffer : string )
Writes the specified string to the stream.
An ASCII code 13 is appended to the text on output.
Write_String
void Write_String( const string Buffer )
procedure Write_String( const Buffer : string )
Writes the specified string to the stream.