parameters.lisp 7.27 KB
Newer Older
1
;;
2
;; Copyright 2002-2011 Genworks International 
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
;;
;; This source file is part of the General-purpose Declarative
;; Language project (GDL).
;;
;; This source file contains free software: you can redistribute it
;; and/or modify it under the terms of the GNU Affero General Public
;; License as published by the Free Software Foundation, either
;; version 3 of the License, or (at your option) any later version.
;; 
;; This source file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; Affero General Public License for more details.
;; 
;; You should have received a copy of the GNU Affero General Public
;; License along with this source file.  If not, see
;; <http://www.gnu.org/licenses/>.
;; 

(in-package :gdl)

(eval-when (compile load eval)
  (when (not (boundp '*production-build?*)) (defvar *production-build?* nil)))

(defparameter *compiling-changes* nil)

(defparameter *load-source-code-database?* (not *production-build?*)
  "Boolean. Determines whether pre-compiled source code 
information will be loaded from compiled files. Defaults to T.")

(defparameter *curve-chords* 50 "Integer. The number of chords to use per Bezier curve when rendering curves as a sequence of straight chords (e.g. in VRML).")

(defparameter *load-documentation-database?* t ;;(not *production-build?*)
  "Boolean. Determines whether pre-compiled documentation strings
information will be loaded from compiled files. Defaults to T.")

(defparameter *compile-source-code-database?* (not *production-build?*)
  "Boolean. Determines whether source code information
information will be compiled into compiled files. Defaults to T.")

(defparameter *compile-documentation-database?* t ;;(not *production-build?*)
  "Boolean. Determines whether documentation strings 
information will be compiled into compiled files. Defaults to T.")

(defparameter *retain-object-identity-on-type-change?* t)

(defparameter *dummy-version* (list 0))

(defparameter *notify-cons* nil)

(defparameter *root-checking-enabled?* t
  "Boolean. Determines whether dependency-tracking carries over between objects which
do not share a common root. Default is T which means dependency-tracking does <b>not</b>
carry over (the checking prevents it).")


(defparameter *till-now* nil)

61

62
63
64
65
(defvar *compile-circular-reference-detection?* nil
  "Boolean. This is a compile-time switch. Determines whether GDL detects circular references
in messages.  Defaults to NIL.")

66

67
68
69
70
(defvar *run-with-circular-reference-detection?* nil
  "Boolean. This is a runtime switch. Determines whether GDL detects circular references
in messages.  Defaults to NIL.")

71
72
73
;;(defvar *compile-circular-reference-detection?* t)
;;(defvar *run-with-circular-reference-detection?* t)

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
(defvar *compile-dependency-tracking?* t
  "Boolean. This is a compile-time switch. Determines whether GDL keeps track of object and message 
dependencies at runtime, thereby enabling the modification of messages and subsequent proper 
demand-driven recomputation of other messages in the object hierarchy. This switch must
be set at the beginning of a GDL session before comiling all code; switching it in the middle 
of a session (especially from NIL to T) will have unpredictable effects and very likely will 
result in incorrect operation. Defaults to T.")

(defvar *run-with-dependency-tracking?* t
  "Boolean. This is a runtime switch. Determines whether GDL keeps track of object and message 
dependencies at runtime, thereby enabling the modification of messages and subsequent proper 
demand-driven recomputation of other messages in the object hierarchy. This switch must
be set at the beginning of a GDL session; switching it in the middle of a session (especially
from NIL to T) will have unpredictable effects and very likely will result in incorrect
operation. Defaults to T.")


(defvar *undeclared-parameters-enabled?* nil ;;t
  "Boolean. This is a compile-time switch. Determines whether GDL will handle inputs passed
to child parts through :parameters plists, where the input is not declared in any other 
part as either an input-slot or computed-slot. If you leave this as NIL when compiling
your application you may see an improvement in runtime performance of up to 10% as 
compared to applications compiled with it set to T. Defaults to NIL.")


(defparameter *debug?* nil)

(defparameter *debug-object* nil)

(defparameter *report-gdl-redefinitions?* t)

(defparameter *allowed-part-documentation-keywords* 
    (list :author :purpose :description :examples :example))

(defparameter *message-categories*
    (list :required-input-slots :optional-input-slots :settable-optional-input-slots
          :defaulted-input-slots :settable-defaulted-input-slots :computed-slots :settable-computed-slots 
          :uncached-computed-slots
          :objects :quantified-objects :hidden-objects :quantified-hidden-objects :functions
          :query-slots))

(defparameter *stream* nil)

(defparameter *colors-default* (list :foreground :black :background :white)
  "Plist. Should contain keys of at least <tt>:foreground</tt> and <tt>:background</tt>, whose
values are a color indicator for the default foreground and background of graphics viewports. The
 default is <tt>:black</tt> for foreground, and <tt>:white</tt> for background.")


(defparameter *%format%* nil)

(defvar args-arg (gensym))
(defvar parent-arg (gensym))
(defvar part-arg (gensym))
(defvar val-arg (gensym))
(defvar self-arg (gensym))


(defparameter *error-on-not-handled?* t)

134
(glisp:define-constant +reserved-words+
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
    (mapcar #'(lambda(symbol)
                (glisp:intern symbol :gdl-acc))
            '(aggregate 
              children 
              ;;documentation 
              first 
              first? 
              follow-root-path 
              hidden-children 
              index 
              last 
              last? 
              leaf? 
              message-list 
              mixins 
              next 
              parent
              parent-tree 
              previous 
              restore-slot-default! 
              root 
              root-path 
              root? 
              set-slot! 
              set-slots! 
              slot-documentation 
              type 
              update!
              color-decimal
              edge-center
              face-center
              face-normal-vector
              local-center
              obliqueness
              vertex)))

(defparameter *error-on-reserved-words?* t)


174

175
176
177
178
179
180
(defparameter *compile-for-dgdl?* nil "Boolean. Determines whether
  global methods are defined during compilation to allow calling any
  message on a gdl remote-object. This functionality is not available
  in the core GDL kernel and depends on additional web/networking
  modules. Defaults to nil.")

181
182
183
184
185
186
187
#+nil
(defparameter *compile-for-dgdl?* t "Boolean. Determines whether
  global methods are defined during compilation to allow calling any
  message on a gdl remote-object. This functionality is not available
  in the core GDL kernel and depends on additional web/networking
  modules. Defaults to t.")

188
(defparameter *gs-path* nil)