summaryrefslogtreecommitdiffstats
path: root/tools/aapt2/Flag.h
blob: 4745c355d8cd9d202a906202822c1b67c21edd21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef AAPT_FLAG_H
#define AAPT_FLAG_H

#include "StringPiece.h"

#include <functional>
#include <string>
#include <vector>

namespace aapt {
namespace flag {

void requiredFlag(const StringPiece& name, const StringPiece& description,
                  std::function<void(const StringPiece&)> action);

void optionalFlag(const StringPiece& name, const StringPiece& description,
                  std::function<void(const StringPiece&)> action);

void optionalSwitch(const StringPiece& name, const StringPiece& description, bool resultWhenSet,
                    bool* result);

void usageAndDie(const StringPiece& command);

void parse(int argc, char** argv, const StringPiece& command);

const std::vector<std::string>& getArgs();

} // namespace flag
} // namespace aapt

#endif // AAPT_FLAG_H