A TextWr.T, or text writer, is a writer the contents of whose
internal buffer can be retrieved as a TEXT. Retrieving the
buffer resets the target to be empty. Text writers are buffered,
seekable, and never raise Failure or Alerted. The fact that
they are buffered is essentially unobservable, since there is no
way for the client to access the target except through the text
writer.
INTERFACEThe callTextWr ; IMPORT Wr; TYPE T <: Public; Public = Wr.T OBJECT METHODS init(): T END;
wr.init() initializes wr to be a seekable writer with
c(wr) set to the empty sequence and cur(wr) to 0. The
writer has no upper bound on its length.
PROCEDURE New(): T;
Equivalent to NEW(T).init(). PROCEDURE ToText(wr: T): TEXT;
Returnc(wr), resettingc(wr)to the empty sequence andcur(wr)to 0.
END TextWr.