Ignore:
Timestamp:
Feb 26, 2008, 3:33:49 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

StreamReaderの実装開始。
Stringの+演算子で右辺がNullのときに起こるアクセス違反を回避。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/IO/TextReader.ab

    r420 r426  
    66
    77Public
    8     Virtual Sub TextReader()    :End Sub
    9     Virtual Sub ~TextReader()   :End Sub
     8'Protected
     9    Sub TextReader()
     10    End Sub
     11Public
     12    Virtual Sub ~TextReader()
     13        Dispose(False)
     14    End Sub
    1015
    11 /* Null*/
     16'   Static Null = StreamReader.Null As TextReader
    1217
    1318Public
    14     Virtual Sub Close()
    15         This.Dispose()
     19    Sub Close()
     20        Dispose(True)
    1621    End Sub
    17 /*  CreateObjRef*/
    18 /*  Dispose*/
    19 /*  Equals*/
    20 /*  GetHashCode*/
    21 /*  GetLifetimeService*/
    22 /*  GetType*/
    23 /*  InitializeLifetimeService*/
     22
     23    Sub Dispose()
     24        Dispose(True)
     25    End Sub
     26
     27    Abstract Sub Dispose(disposing As Boolean)
     28
    2429    Abstract Function Peek() As Long
    2530    Abstract Function Read() As Long
    26     Abstract Function Read(buffer As LPTSTR, index As Long, count As Long) As Long
    27     Abstract Function ReadBlock(buffer As LPTSTR, index As Long, count As Long) As Long
     31    Abstract Function Read(buffer As *StrChar, index As Long, count As Long) As Long
     32    Virtual Function ReadBlock(buffer As *StrChar, index As Long, count As Long) As Long
     33        ReadBlock = Read(buffer, index, count)
     34    End Function
    2835    Abstract Function ReadLine() As String
    2936    Abstract Function ReadToEnd() As String
    30 /*  ReferenceEquals*/
    31 /*  Synchronized*/
    32 /*  ToString*/
    33 /*  Dispose*/
    34 /*  Finalize*/
    35 /*  MemberwiseClone*/
    3637End Class
    3738
Note: See TracChangeset for help on using the changeset viewer.