Autogenerate some bitmasks for testing sets of widetags.
[sbcl.git] / src / pcl / gray-streams-class.lisp
blob06d487eee7e45630613ab0225aaceba7fc24d4df
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 (defclass fundamental-stream (standard-object stream)
14 ((open-p :initform t :accessor stream-open-p))
15 (:documentation "Base class for all Gray streams."))
17 ;;; Define the stream classes.
18 (defclass fundamental-input-stream (fundamental-stream) nil
19 (:documentation "Superclass of all Gray input streams."))
21 (defclass fundamental-output-stream (fundamental-stream) nil
22 (:documentation "Superclass of all Gray output streams."))
24 (defclass fundamental-character-stream (fundamental-stream) nil
25 (:documentation
26 "Superclass of all Gray streams whose element-type is a subtype of character."))
28 (defclass fundamental-binary-stream (fundamental-stream) nil
29 (:documentation "Superclass of all Gray streams whose element-type
30 is a subtype of unsigned-byte or signed-byte."))
32 (defclass fundamental-character-input-stream
33 (fundamental-input-stream fundamental-character-stream) nil
34 (:documentation "Superclass of all Gray input streams whose element-type
35 is a subtype of character."))
37 (defclass fundamental-character-output-stream
38 (fundamental-output-stream fundamental-character-stream) nil
39 (:documentation "Superclass of all Gray output streams whose element-type
40 is a subtype of character."))
42 (defclass fundamental-binary-input-stream
43 (fundamental-input-stream fundamental-binary-stream) nil
44 (:documentation "Superclass of all Gray input streams whose element-type
45 is a subtype of unsigned-byte or signed-byte."))
47 (defclass fundamental-binary-output-stream
48 (fundamental-output-stream fundamental-binary-stream) nil
49 (:documentation "Superclass of all Gray output streams whose element-type
50 is a subtype of unsigned-byte or signed-byte."))
52 ;;; This is not in the Gray stream proposal, so it is left here
53 ;;; as example code.
54 ;;;
55 ;;; example character input and output streams
57 (defclass character-output-stream (fundamental-character-output-stream)
58 ((lisp-stream :initarg :lisp-stream
59 :accessor character-output-stream-lisp-stream)))
61 (defclass character-input-stream (fundamental-character-input-stream)
62 ((lisp-stream :initarg :lisp-stream
63 :accessor character-input-stream-lisp-stream)))