1 ;;;; class definitions for the SBCL Gray streams implementation, based on the
2 ;;;; CMU CL Gray streams implementation, based on the stream-definition-by-user
3 ;;;; proposal by David N. Gray
5 ;;;; This software is part of the SBCL system. See the README file for
8 ;;;; This software is in the public domain and is provided with absolutely no
9 ;;;; warranty. See the COPYING and CREDITS files for more information.
11 (in-package "SB-GRAY")
13 ;;; Bootstrap the FUNDAMENTAL-STREAM class.
14 (let ((sb-pcl::*pcl-class-boot* 'fundamental-stream))
15 (defclass fundamental-stream (standard-object stream)
17 :accessor stream-open-p))
19 (:documentation "the base class for all CLOS streams")))
21 ;;; Define the stream classes.
22 (defclass fundamental-input-stream (fundamental-stream) nil)
24 (defclass fundamental-output-stream (fundamental-stream) nil)
26 (defclass fundamental-character-stream (fundamental-stream) nil)
28 (defclass fundamental-binary-stream (fundamental-stream) nil)
30 (defclass fundamental-character-input-stream
31 (fundamental-input-stream fundamental-character-stream) nil)
33 (defclass fundamental-character-output-stream
34 (fundamental-output-stream fundamental-character-stream) nil)
36 (defclass fundamental-binary-input-stream
37 (fundamental-input-stream fundamental-binary-stream) nil)
39 (defclass fundamental-binary-output-stream
40 (fundamental-output-stream fundamental-binary-stream) nil)
42 ;;; This is not in the Gray stream proposal, so it is left here
45 ;;; example character input and output streams
47 (defclass character-output-stream (fundamental-character-output-stream)
48 ((lisp-stream :initarg :lisp-stream
49 :accessor character-output-stream-lisp-stream)))
51 (defclass character-input-stream (fundamental-character-input-stream)
52 ((lisp-stream :initarg :lisp-stream
53 :accessor character-input-stream-lisp-stream)))