blob: 4cadfc41ee0a1b891bbfb8077616c6f5ba4f2e78 [file] [log] [blame]
Adam Lesinski98aa3ad2015-04-06 11:46:52 -07001#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
10namespace aapt {
11namespace flag {
12
13void requiredFlag(const StringPiece& name, const StringPiece& description,
14 std::function<void(const StringPiece&)> action);
15
16void optionalFlag(const StringPiece& name, const StringPiece& description,
17 std::function<void(const StringPiece&)> action);
18
19void optionalSwitch(const StringPiece& name, const StringPiece& description, bool* result);
20
Adam Lesinski769de982015-04-10 19:43:55 -070021void usageAndDie(const StringPiece& command);
22
Adam Lesinski98aa3ad2015-04-06 11:46:52 -070023void parse(int argc, char** argv, const StringPiece& command);
24
25const std::vector<std::string>& getArgs();
26
27} // namespace flag
28} // namespace aapt
29
30#endif // AAPT_FLAG_H