C Encapsulating Streams

  • C.1 Encapsulating Stream Classes
  • An encapsulating stream is a special kind of stream that "closes over" another stream, handling some of the usual stream protocol operations itself, and delegating the remaining operations to the "encapsulated" stream. Encapsulating streams may be used by some CLIM implementations in order to facilitate the implementation of features that require the dynamic modification of a stream's state and operations. For example, accepting-values dialogs can be implemented by using an encapsulating stream that tailors calls to accept and prompt-for-accept in such a way that the output is captured and formatted into a dialog that contains prompts and fields that can be clicked on and modified by the user. Input editing can also be implemented using an encapsulating stream that manages the interaction between read-gesture and the input editing commands and rescanning. The form filling-output can be implemented by having an encapsulating stream that buffers output and inserts line breaks appropriately. [annotate]

    [encapsulating stream, Concept← C.1.1 Encapsulating Stream Protocol, encapsulating-stream-stream]
    [encapsulating stream, Concept← C.1 Encapsulating Stream Classes, encapsulating-stream-p]

    CLIM implementations need not use encapsulating streams at all. If encapsulating streams are used, they must adhere to the following protocols. Encapsulating streams are not part of CLIM's API. [annotate]