Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
/add-type {                        % => Object Class
2
  1 index get-types                % => Object Class Types
3
  array-append                     % => Object Types'
4
  /Types exch put
5
} def
6
 
7
/call-method {                     % => ...Params... Box Method
8
  1 index get-box-dict             % => ...Params... Box Method Dict
9
  /Methods get                     % => ...Params... Box Method MethodList
10
 
11
% Check if method have been defined
12
  dup 2 index known not {
13
    (Method is not known:) print
14
    1 index ==
15
    quit
16
  } if
17
 
18
  exch get exec                    % =>
19
} def
20
 
21
/get-types {
22
  dup /Types known {
23
    dup /Types get
24
  } {
25
    []
26
  } ifelse
27
 
28
  exch pop
29
} def
30
 
31
/is-a {                            % => Object Class
32
  1 index get-types                % => Object Class Types
33
  exch array-find -1 ne
34
  exch pop
35
} def