Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!godot.cc.duq.edu!newsfeed.pitt.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!franz.com!franz!smh
From: smh@Franz.COM (Steve Haflich)
Subject: Re: Q: streams as clos-classes in LCL
In-Reply-To: jolo@lft.mw.tu-muenchen.de's message of 6 Sep 1994 16:24:21 GMT
Message-ID: <SMH.94Sep7214435@vapor.Franz.COM>
Sender: news@franz.com
Nntp-Posting-Host: vapor
Organization: Franz Inc., Berkeley, CA
References: <34i53l$p99@sunserver.lrz-muenchen.de>
Date: Thu, 8 Sep 1994 04:44:34 GMT
Lines: 35

In article <34i53l$p99@sunserver.lrz-muenchen.de> jolo@lft.mw.tu-muenchen.de (Johannes Lorenz) writes:

   From: jolo@lft.mw.tu-muenchen.de (Johannes Lorenz)

   i use LCL 4.1.1 and CLOS and i would likely redirect some unix-output-streams
   in a Motif-Text-Widget to monitor system activities.

   For that i should have code in the following manner:

   (defclass text-widget-stream (fundamental-character-input-stream)
	   ((text-widget :accessor text-widget :initarg :text-widget)
	    (input-buffer :accessor input-buffer :initform "")
	    (etc., etc., etc.,......)))

   (defun make-text-widget-stream (text-widget
				   &key (class 'text-widget-stream)
					(initargs nil)
				   &aux new)
	   (setq new (make-object class initargs :text-widget text-widget))
	   (etc., etc., etc.,......))

   But the big problem is, that i havn't streams as clos-classes in my LCL4.1.1
   - i guess Allegro have it -.

   Is there any way at all to get streams as clos-classes in LCL4.1.1 or even an
   extension to clos available?

This is probably not possible, at least in any practical sense.

The basic problem is that streams are probably implemented in some
implementation-dependent way, i.e., with metaclass BUILT-IN-CLASS.  On
one hand, you can't subclass these, and on the other, neither can you
encapsulate them inside some class of standard-object and expect the
numerous standard stream-accepting functions (e.g. WRITE, STREAMP) to
accept your encapsulations.
