Commit 12e0e590 authored by Alastair Bridgewater's avatar Alastair Bridgewater
Browse files

port/port: PORT protocol class, predicate, and a general reader.

  * This is a straightforward protocol class and predicate.

  * This also contains a generic function that is for finding the
PORT associated with a number of different objects.
parent cfc1c4b9
......@@ -39,6 +39,7 @@
;;; nq-clim/port/port
;;; Part of CLIM II 9.2.
(cl:defpackage :nq-clim/port/port
(:use :cl)
(cl:in-package :nq-clim/port/port)
;; The protocol class. Users may subclass this to provide other
;; objects that behave as ports.
(defclass port () ())
;; The protocol predicate.
(defun portp (object)
(typep object 'port))
;; Several types of objects are said to "have" a port, so there's also
;; a generic reader function.
(defgeneric port (object)
(:documentation "Return the port associated with OBJECT. Defined to
work for sheets, mediums, and application frames. May be NIL."))
;;; EOF
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment