1 #ifndef AAPT_FLAG_H
2 #define AAPT_FLAG_H
3 
4 #include "StringPiece.h"
5 
6 #include <functional>
7 #include <string>
8 #include <vector>
9 
10 namespace aapt {
11 namespace flag {
12 
13 void requiredFlag(const StringPiece& name, const StringPiece& description,
14                   std::function<void(const StringPiece&)> action);
15 
16 void requiredFlag(const StringPiece& name, const StringPiece& description,
17                   std::function<bool(const StringPiece&, std::string*)> action);
18 
19 void optionalFlag(const StringPiece& name, const StringPiece& description,
20                   std::function<void(const StringPiece&)> action);
21 
22 void optionalSwitch(const StringPiece& name, const StringPiece& description, bool resultWhenSet,
23                     bool* result);
24 
25 void usageAndDie(const StringPiece& command);
26 
27 void parse(int argc, char** argv, const StringPiece& command);
28 
29 const std::vector<std::string>& getArgs();
30 
31 } // namespace flag
32 } // namespace aapt
33 
34 #endif // AAPT_FLAG_H
35