00001 00024 #ifndef _ACTIVEWINDOWFEATURE_H 00025 #define _ACTIVEWINDOWFEATURE_H 00026 00027 #include "../AbstractString.h" 00028 00036 class FEATURE_EXPORT_CLASS ActiveWindowFeature : public AbstractStringFeature 00037 { 00038 friend class ActiveWindowFeatureProvider; 00039 00040 protected: 00055 ActiveWindowFeature(stringcode* code, long* maxlen) : AbstractStringFeature(AbstractStringFeature::Levenshtein, code, maxlen) {} 00056 00071 ActiveWindowFeature(stringcode* code, long* maxlen, string window) : AbstractStringFeature(AbstractStringFeature::Levenshtein, code, maxlen, window) {} 00072 00073 public: 00074 virtual ~ActiveWindowFeature() {} 00075 00076 virtual const string getName() const { return "ActiveWindow.ActiveWindow"; } 00077 00078 #if _DEBUG_FEATURES 00079 virtual string toString() const; 00080 #endif 00081 }; 00082 00086 class FEATURE_EXPORT_CLASS ActiveWindowFeatureProvider : public FeatureProvider 00087 { 00088 private: 00090 stringvector features; 00092 stringcode activeWindowFeature_code; 00094 long activeWindowFeature_maxlen; 00095 00097 string display; 00099 string window; 00101 bool windowValid; 00102 00103 public: 00109 ActiveWindowFeatureProvider(providerparams ¶ms); 00110 00111 virtual Feature* getFeature(string name) const; 00112 virtual Feature* getSample(string name) const; 00113 virtual void nextSample(clock_t checkpoint); 00114 00115 #if _DEBUG_FEATURES 00116 string _test_getWindow() { 00117 return window; 00118 } 00119 #endif 00120 }; 00121 00122 #endif // _ACTIVEWINDOWFEATURE_H