00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _COMPMATCH_H
00029 #define _COMPMATCH_H
00030
00031 #include <core/core.h>
00032
00033 class PrivateMatch;
00034 class CompWindow;
00035 class CompDisplay;
00036
00042 class CompMatch {
00043 public:
00044
00048 class Expression {
00049 public:
00050 virtual ~Expression () {};
00051 virtual bool evaluate (CompWindow *window) = 0;
00052 };
00053
00054 public:
00055 CompMatch ();
00056 CompMatch (const CompString);
00057 CompMatch (const CompMatch &);
00058 ~CompMatch ();
00059
00060 static const CompMatch emptyMatch;
00061
00062 void update ();
00063
00068 bool evaluate (CompWindow *window);
00069
00070 CompString toString () const;
00071 bool isEmpty () const;
00072
00073 CompMatch & operator= (const CompMatch &);
00074 CompMatch & operator&= (const CompMatch &);
00075 CompMatch & operator|= (const CompMatch &);
00076
00077 const CompMatch & operator& (const CompMatch &);
00078 const CompMatch & operator| (const CompMatch &);
00079 const CompMatch & operator! ();
00080
00081 CompMatch & operator= (const CompString &);
00082 CompMatch & operator&= (const CompString &);
00083 CompMatch & operator|= (const CompString &);
00084
00085 const CompMatch & operator& (const CompString &);
00086 const CompMatch & operator| (const CompString &);
00087
00088 bool operator== (const CompMatch &) const;
00089 bool operator!= (const CompMatch &) const;
00090
00091 private:
00092 PrivateMatch *priv;
00093 };
00094
00095 #endif