/[defeditor]/DefEditor/src/structure.lisp
ViewVC logotype

Contents of /DefEditor/src/structure.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Mon Feb 16 02:23:09 2004 UTC (10 years, 2 months ago) by rjain
Branch: MAIN
CVS Tags: HEAD
move code into src/ dir
1 (defclass structure-element ()
2 ())
3
4 (defclass structure-branch (structure-element))
5
6 (defclass structure-branch-list (structure-branch)
7 ((structure-contents :initarg structure-contents
8 :accessor strcuture-contents
9 :initform '()
10 :type list)))
11
12 (defclass structure-branch-item (structure-branch)
13 ((structure-content :initarg structure-content
14 :accessor structure-content
15 :initform (error "Structure's content must be defined."))))
16
17 (defmethod structure-contents ((structure structure-branch-item))
18 (list (structure-content structure)))
19
20 (defmethod (setf structure-contents) (new-value (structure structure-branch-item))
21 (if (and (consp new-value) (endp (rest new-value)))
22 (setf (structure-content structure) (first new-value))
23 (error "Can't set single-item branch's contents to multiple items.")))
24
25 (defclass structure-leaf (structure-element)
26 ())

  ViewVC Help
Powered by ViewVC 1.1.5