TStringReader in streamex.pas
I understand it's supposed to be a string-based wrapper for TTextReader. The problem is it doesn't implement any methods that can do anything other than create and free the class instance. Reset, Close, ReadLine, and IsEof all call un-implemented abstract virtual methods in TTextReader.
So the question is.... what the heck is it supposed to do?
I've never used it (and haven't--yet--dived into the code*) but my understanding is that allows you to use a normal string as if it were a TTextStream. Are you saying it's not fully implemented?
*I shall do so in a jiffy now you asked ... Done.
I think I see where the confussion comes from: it's implemented through a
TStreamReader connected to a
TStringStream, but the (private) field is declared as a
TTextReader, so following it you end up in an almost purely abstract class.
The key is in the constructor:
constructor TStringReader.Create(const AString: string; ABufferSize: Integer);
begin
inherited Create;
FReader := TStreamReader.Create(TStringStream.Create(AString), ABufferSize, True);
end;
As you can see, it creates a
TStreamReader instead of the abstract daddy
TTextReader.