Delete single-use SOURCE-TRANSFORM-LAMBDA macro
[sbcl.git] / src / pcl / gray-streams-class.lisp
blob0f2f5fbbf3aa54a6890fd52355f8edccd74062f4
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
6 ;;;; more information.
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)
16 ((open-p :initform t
17 :accessor stream-open-p))
18 #+sb-doc
19 (:documentation "Base class for all Gray streams.")))
21 ;;; Define the stream classes.
22 (defclass fundamental-input-stream (fundamental-stream) nil
23 #+sb-doc
24 (:documentation "Superclass of all Gray input streams."))
26 (defclass fundamental-output-stream (fundamental-stream) nil
27 #+sb-doc
28 (:documentation "Superclass of all Gray output streams."))
30 (defclass fundamental-character-stream (fundamental-stream) nil
31 #+sb-doc
32 (:documentation
33 "Superclass of all Gray streams whose element-type is a subtype of character."))
35 (defclass fundamental-binary-stream (fundamental-stream) nil
36 #+sb-doc
37 (:documentation "Superclass of all Gray streams whose element-type
38 is a subtype of unsigned-byte or signed-byte."))
40 (defclass fundamental-character-input-stream
41 (fundamental-input-stream fundamental-character-stream) nil
42 #+sb-doc
43 (:documentation "Superclass of all Gray input streams whose element-type
44 is a subtype of character."))
46 (defclass fundamental-character-output-stream
47 (fundamental-output-stream fundamental-character-stream) nil
48 #+sb-doc
49 (:documentation "Superclass of all Gray output streams whose element-type
50 is a subtype of character."))
52 (defclass fundamental-binary-input-stream
53 (fundamental-input-stream fundamental-binary-stream) nil
54 #+sb-doc
55 (:documentation "Superclass of all Gray input streams whose element-type
56 is a subtype of unsigned-byte or signed-byte."))
58 (defclass fundamental-binary-output-stream
59 (fundamental-output-stream fundamental-binary-stream) nil
60 #+sb-doc
61 (:documentation "Superclass of all Gray output streams whose element-type
62 is a subtype of unsigned-byte or signed-byte."))
64 ;;; This is not in the Gray stream proposal, so it is left here
65 ;;; as example code.
66 ;;;
67 ;;; example character input and output streams
69 (defclass character-output-stream (fundamental-character-output-stream)
70 ((lisp-stream :initarg :lisp-stream
71 :accessor character-output-stream-lisp-stream)))
73 (defclass character-input-stream (fundamental-character-input-stream)
74 ((lisp-stream :initarg :lisp-stream
75 :accessor character-input-stream-lisp-stream)))