]> Dogcows Code - chaz/openbox/blob - util/epist/parser.hh
a237053482d837821a35a5a480b80ab8f65d78db
[chaz/openbox] / util / epist / parser.hh
1 #include "actions.hh"
2 #include "keytree.hh"
3
4 #include <string>
5
6 class parser {
7 public:
8 parser(keytree *);
9 ~parser();
10
11 void parse(std::string);
12
13 void setKey(std::string key)
14 { _key = key; }
15
16 void setArgumentNum(std::string arg)
17 { _arg = arg; }
18
19 void setArgumentNegNum(std::string arg)
20 { _arg = "-" + arg; }
21
22 void setArgumentStr(std::string arg)
23 { _arg = arg.substr(1, arg.size() - 2); }
24
25 void setAction(std::string);
26 void addModifier(std::string);
27 void endAction();
28 void startChain();
29 void setChainBinding();
30 void endChain();
31
32 private:
33 void reset();
34
35 keytree *_kt;
36 unsigned int _mask;
37 Action::ActionType _action;
38 std::string _key;
39 std::string _arg;
40 };
This page took 0.035182 seconds and 3 git commands to generate.