wmi

git clone git://oldgit.suckless.org/wmi/
Log | Files | Refs | LICENSE

expander.h (668B)


      1 // Copyright (c) 2003 - 2009 Anselm R Garbe <anselm@garbe.us>
      2 // See LICENSE for license details.
      3 
      4 #ifndef __EXPANDER_H
      5 #define __EXPANDER_H
      6 
      7 #include <string>
      8 #include <set>
      9 
     10 #include "singleton.h"
     11 
     12 using namespace std;
     13 
     14 
     15 /**
     16  * Provides PATH executable expansion.
     17  */
     18 class Expander : public Singleton<Expander>{
     19     public:
     20         Expander();
     21         bool queryString (string s);
     22         bool rehash();
     23         set<string> expands();
     24 
     25     private:
     26         set<string> read();
     27         bool pathSearch_;
     28         string key_;
     29         string path_;
     30         set<string> paths_;
     31         set<string> expands_;
     32         set<string> pathExpands_;
     33 };
     34 
     35 #endif // __EXPANDER_H