-
Notifications
You must be signed in to change notification settings - Fork 2
/
iir-export.lisp
40 lines (31 loc) · 1.04 KB
/
iir-export.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
(in-package :clorb)
(defclass IIRX-INTERFACE (interface-def)
((iir :initarg :iir :accessor iir)))
(defclass IIRX-OPERATION (operation-def)
((iir :initarg :iir :accessor iir)))
(define-method contents ((obj iirx-interface) kind ex)
(unless (contents obj)
(setf (contents obj)
(map 'list
(lambda (opdef)
(make-instance 'iirx-operation
:iir opdef
:name (opdef-name opdef)))
(interface-operations (iir obj)))))
(call-next-method))
(define-method _get_result ((obj iirx-operation))
(opdef-result (iir obj)))
(define-method _get_params ((obj iirx-operation))
(opdef-params (iir obj)))
(defun get-iirx (interface)
(make-instance 'iirx-interface
:id (interface-id interface)
:name "?"
:iir interface
:base_interfaces (map 'list 'get-iirx
(interface-inherit interface))))
(define-method _interface ((servant auto-servant))
(let ((def (servant-interface servant)))
(if (typep def 'interface)
(get-iirx def)
(call-next-method))))