Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5496 | leency | 1 | |
2 | |||
3 | |||
4 | #include "yacasbase.h" |
||
5 | |||
6 | /// Not used. |
||
7 | |||
8 | /// it can never be used. |
||
9 | class LispArgList : public YacasBase |
||
10 | { |
||
11 | public: |
||
12 | virtual ~LispArgList(); |
||
13 | virtual LispInt NrArguments()=0; |
||
14 | virtual LispChar * GetArgument(LispInt aIndex, LispInt& aLength)=0; |
||
15 | virtual LispBoolean Compare(LispInt aIndex, LispChar * aString)=0; |
||
16 | }; |
||
17 | |||
18 | /// Abstract class which can be put inside a LispGenericClass. |
||
19 | |||
20 | { |
||
21 | public: |
||
22 | GenericClass() : iReferenceCount(0) {}; |
||
23 | virtual ~GenericClass(); |
||
24 | virtual LispChar * Send(LispArgList& aArgList)=0; |
||
25 | virtual LispChar * TypeName()=0; |
||
26 | public: |
||
27 | LispInt iReferenceCount; //TODO: perhaps share the method of reference counting with how it is done in other places |
||
28 | }; |
||
29 | |||
30 | |||
31 | |||
32 | |||
33 | |||
34 | #define DYNCAST(_type,_name,_var,_object) \ |
||
35 | |||
36 | if (_object != NULL) \ |
||
37 | { \ |
||
38 | if (StrEqual((_object)->TypeName(),_name)) _var = (_type *)(_object); \ |
||
39 | } |
||
40 | |||
41 | #endif |
||
42 |