Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1.  
  2. #ifndef __patternclass_h__
  3. #define __patternclass_h__
  4.  
  5. #include "lisptype.h"
  6. #include "lispobject.h"
  7. #include "genericobject.h"
  8. #include "patterns.h"
  9.  
  10. /// Wrapper for YacasPatternPredicateBase.
  11. /// This class allows a YacasPatternPredicateBase to be put in a
  12. /// LispGenericObject.
  13. class PatternClass : public GenericClass
  14. {
  15. public:
  16.   PatternClass(YacasPatternPredicateBase* aPatternMatcher);
  17.   ~PatternClass();
  18.  
  19.   LispBoolean Matches(LispEnvironment& aEnvironment,
  20.                       LispPtr& aArguments);
  21.   LispBoolean Matches(LispEnvironment& aEnvironment,
  22.                       LispPtr* aArguments);
  23. public: //From GenericClass
  24.   virtual LispChar * Send(LispArgList& aArgList);
  25.   virtual LispChar * TypeName();
  26.  
  27. private:
  28.   PatternClass(const PatternClass& aOther): iPatternMatcher(NULL)
  29.   {
  30.     // copy constructor not written yet, hence the assert
  31.     LISPASSERT(0);
  32.   }
  33.   PatternClass& operator=(const PatternClass& aOther)
  34.   {
  35.     // copy constructor not written yet, hence the assert
  36.     LISPASSERT(0);
  37.     return *this;
  38.   }
  39. protected:
  40.   YacasPatternPredicateBase* iPatternMatcher;
  41. };
  42.  
  43.  
  44.  
  45.  
  46. #endif
  47.  
  48.