Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4680 | right-hear | 1 | /** \file lispevalhash.h |
2 | * Storage of executable commands |
||
3 | * |
||
4 | */ |
||
5 | |||
6 | #ifndef __lispevalhash_h__ |
||
7 | #define __lispevalhash_h__ |
||
8 | |||
9 | #include "yacasbase.h" |
||
10 | #include "lispobject.h" |
||
11 | #include "lisphash.h" |
||
12 | #include "evalfunc.h" |
||
13 | |||
14 | |||
15 | // new-style evaluator, passing arguments onto the stack in LispEnvironment |
||
16 | typedef void (*YacasEvalCaller)(LispEnvironment& aEnvironment,LispInt aStackTop); |
||
17 | class YacasEvaluator : public EvalFuncBase |
||
18 | { |
||
19 | public: |
||
20 | // FunctionFlags can be orred when passed to the constructor of this function |
||
21 | enum FunctionFlags |
||
22 | { |
||
23 | Function=0, // Function: evaluate arguments |
||
24 | Macro=1, // Function: don't evaluate arguments |
||
25 | Fixed = 0, // fixed number of arguments |
||
26 | Variable = 2 // variable number of arguments |
||
27 | }; |
||
28 | YacasEvaluator(YacasEvalCaller aCaller,LispInt aNrArgs, LispInt aFlags) |
||
29 | : iCaller(aCaller), iNrArgs(aNrArgs), iFlags(aFlags) |
||
30 | { |
||
31 | } |
||
32 | virtual void Evaluate(LispPtr& aResult,LispEnvironment& aEnvironment, |
||
33 | LispPtr& aArguments); |
||
34 | private: |
||
35 | YacasEvalCaller iCaller; |
||
36 | LispInt iNrArgs; |
||
37 | LispInt iFlags; |
||
38 | }; |
||
39 | |||
40 | class YacasCoreCommands : public LispAssociatedHash |
||
41 | { |
||
42 | }; |
||
43 | |||
44 | |||
45 | |||
46 | #endif |