Ignore:
Timestamp:
Feb 23, 2007, 11:00:24 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

Unicode (#50) 前準備
Byte→Char (#51) 型名は殆ど完了、ただし中身までは手を付けていないものが多い

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/IO/Stream.ab

    r115 r119  
     1
     2#require <Classes/System/misc.ab>
    13
    24Class Stream
    3 Public
     5Public 'Protected
    46    Sub Stream():   End Sub
    57Public
    6     Virtual Function CanRead() As Boolean:  End Function
    7     Virtual Function CanSeek() As Boolean:  End Function
    8     Virtual Function CanTimeout() As Boolean:   End Function
    9     Virtual Function CanWrite() As Boolean: End Function
    10     Virtual Function Length() As Int64: End Function
    11     Virtual Sub Position(value As Int64):   End Sub
    12     Virtual Function Position() As Int64:   End Function
    13     Virtual Sub ReadTimeout(value As Long): End Sub
    14     Virtual Function ReadTimeout() As Long: End Function
    15     Virtual Sub WriteTimeout(value As Long):    End Sub
    16     Virtual Function WriteTimeout() As Long:    End Function
     8    Virtual Sub ~Stream()
     9        Close()
     10    End Sub
     11Public
     12    Abstract Function CanRead() As Boolean
     13    Abstract Function CanSeek() As Boolean
     14
     15    Virtual Function CanTimeout() As Boolean
     16        Return True
     17    End Function
     18
     19    Abstract Function CanWrite() As Boolean
     20    Abstract Function Length() As Int64
     21    Abstract Sub Position(value As Int64)
     22    Abstract Function Position() As Int64
     23
     24    Virtual Sub ReadTimeout(value As Long)
     25        ' Throw InvalidOperationException
     26    End Sub
     27
     28    Virtual Function ReadTimeout() As Long
     29        ' Throw InvalidOperationException
     30    End Function
     31
     32    Virtual Sub WriteTimeout(value As Long)
     33        ' Throw InvalidOperationException
     34    End Sub
     35
     36    Virtual Function WriteTimeout() As Long
     37        ' Throw InvalidOperationException
     38    End Function
    1739
    1840Public
     
    2244    Virtual Function EndRead(ByRef asyncResult As IAsyncResult) As Long:    End Function
    2345    Virtual Sub EndWrite(ByRef asyncResult As IAsyncResult):    End Sub
    24     Virtual Sub Flush():    End Sub
    25     Virtual Function Read(ByRef buffer[] As Byte, offset As Long, count As Long) As Long:   End Function
    26     Virtual Function ReadByte() As Long:    End Function
    27     Virtual Function Seek(offset As Int64, origin As SeekOrigin) As Long:   End Function
    28     Virtual Sub SetLength(value As Int64):  End Sub
    29     Virtual Sub Write (ByRef buffer[] As Byte, offset As Long, count As Long):  End Sub
    30     Virtual Sub WriteByte(value As Byte):   End Sub
     46    Abstract Sub Flush()
     47    Abstract Function Read(ByRef buffer[] As Byte, offset As Long, count As Long) As Long
    3148
     49    Virtual Function ReadByte() As Long
     50        Dim b As Byte
     51        Dim ret = Read(VarPtr(b), 0, 1)
     52        If ret <> 0 Then
     53            Return b
     54        Else
     55            Return -1
     56        End If
     57    End Function
     58
     59    Abstract Function Seek(offset As Int64, origin As SeekOrigin) As Long
     60    Abstract Sub SetLength(value As Int64): End Sub
     61    Abstract Sub Write(ByRef buffer[] As Byte, offset As Long, count As Long)
     62
     63    Virtual Sub WriteByte(b As Byte)
     64        Write(VarPtr(b), 0, 1)
     65    End Sub
    3266Protected
    3367    Virtual Function CreateWaitHandle() As WaitHandle:  End Function
Note: See TracChangeset for help on using the changeset viewer.