Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4680 | right-hear | 1 | |
2 | * Storage of globals in a associated hash |
||
3 | * |
||
4 | */ |
||
5 | |||
6 | |||
7 | #define __lispglobals_h__ |
||
8 | |||
9 | |||
10 | #include "lispobject.h" |
||
11 | #include "lisphash.h" |
||
12 | |||
13 | |||
14 | |||
15 | /// The only special feature of this class is the attribute |
||
16 | /// #iEvalBeforeReturn, which defaults to #LispFalse. If this |
||
17 | /// attribute is set to #LispTrue, the value in #iValue needs to be |
||
18 | /// evaluated to get the value of the Lisp variable. |
||
19 | /// \sa LispEnvironment::GetVariable() |
||
20 | |||
21 | |||
22 | { |
||
23 | public: |
||
24 | inline LispGlobalVariable(const LispGlobalVariable& aOther); |
||
25 | LispGlobalVariable(LispPtr& aValue): iValue(aValue), iEvalBeforeReturn(LispFalse) {} |
||
26 | inline LispGlobalVariable& operator=(const LispGlobalVariable& aOther); |
||
27 | |||
28 | |||
29 | LispPtr iValue; |
||
30 | LispBoolean iEvalBeforeReturn; |
||
31 | }; |
||
32 | |||
33 | |||
34 | |||
35 | |||
36 | { |
||
37 | }; |
||
38 | |||
39 | |||
40 | |||
41 | |||
42 | |||
43 | { |
||
44 | } |
||
45 | |||
46 | |||
47 | { |
||
48 | iEvalBeforeReturn = aEval; |
||
49 | } |
||
50 | |||
51 | |||
52 | |||
53 | { |
||
54 | iValue = (aOther.iValue); |
||
55 | return *this; |
||
56 | } |
||
57 | |||
58 | |||
59 | |||
60 |