blob: e863742839868164cdf43e284ca4832fb56347a1 [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
Adam Lesinskid13fb242015-05-12 20:40:48 -070016void requiredFlag(const StringPiece& name, const StringPiece& description,
17 std::function<bool(const StringPiece&, std::string*)> action);
18
Adam Lesinski98aa3ad2015-04-06 11:46:52 -070019void optionalFlag(const StringPiece& name, const StringPiece& description,
20 std::function<void(const StringPiece&)> action);
21
Adam Lesinski5886a922015-04-15 20:29:22 -070022void optionalSwitch(const StringPiece& name, const StringPiece& description, bool resultWhenSet,
23 bool* result);
Adam Lesinski98aa3ad2015-04-06 11:46:52 -070024
Adam Lesinski769de982015-04-10 19:43:55 -070025void usageAndDie(const StringPiece& command);
26
Adam Lesinski98aa3ad2015-04-06 11:46:52 -070027void parse(int argc, char** argv, const StringPiece& command);
28
29const std::vector<std::string>& getArgs();
30
31} // namespace flag
32} // namespace aapt
33
34#endif // AAPT_FLAG_H