Commit eea73802 authored by Alastair Bridgewater's avatar Alastair Bridgewater
Browse files

port/basic-port: Initial rough-in of common PORT logic.

  * This is primarily accessors, readers, and slot storage at this
point, though there may well be some changes when we come to add
support for grafts.
parent 365de6ac
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
"sheet/mirror-functions" "sheet/mirror-functions"
"sheet/mirrored-sheet-mixin" "sheet/mirrored-sheet-mixin"
"port/port-protocol" "port/port-protocol"
"backend/clx/medium")) "backend/clx/medium"))
(load (compile-file file))) (load (compile-file file)))
;;; nq-clim/port/basic-port
;;; Part of CLIM II 9.2.
(cl:defpackage :nq-clim/port/basic-port
(:use :cl
(cl:in-package :nq-clim/port/basic-port)
(defclass basic-port (port)
((name :initarg :name)
(server-path :initarg :server-path :reader port-server-path)
(plist :initarg :plist :initform nil)))
(defmethod port-name ((port basic-port))
(slot-value port 'name))
(defmethod port-type ((port basic-port))
(car (port-server-path port)))
(defmethod port-properties ((port basic-port) indicator &optional (default nil))
(getf (slot-value port 'plist) indicator default))
(defmethod (setf port-properties) (property (port basic-port) indicator &optional default)
(declare (ignore default))
(setf (getf (slot-value port 'plist) indicator) property))
;;; 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