1 | // |
2 | // Copyright (c) Microsoft. All rights reserved. |
3 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
4 | // |
5 | |
6 | //---------------------------------------------------------- |
7 | // CommandLine.h - tiny very specific command line parser |
8 | //---------------------------------------------------------- |
9 | #ifndef _CommandLine |
10 | #define _CommandLine |
11 | |
12 | class CommandLine |
13 | { |
14 | public: |
15 | class Options |
16 | { |
17 | public: |
18 | Options() |
19 | : actionASMDump(false) |
20 | , actionConcat(false) |
21 | , actionCopy(false) |
22 | , actionDump(false) |
23 | , actionDumpMap(false) |
24 | , actionDumpToc(false) |
25 | , actionFracture(false) |
26 | , actionILDump(false) |
27 | , actionInteg(false) |
28 | , actionMerge(false) |
29 | , actionRemoveDup(false) |
30 | , actionStat(false) |
31 | , actionStrip(false) |
32 | , actionTOC(false) |
33 | , legacyCompare(false) |
34 | , recursive(false) |
35 | , stripCR(false) |
36 | , nameOfFile1(nullptr) |
37 | , nameOfFile2(nullptr) |
38 | , nameOfFile3(nullptr) |
39 | , indexCount(-1) |
40 | , indexes(nullptr) |
41 | { |
42 | } |
43 | |
44 | bool actionASMDump; |
45 | bool actionConcat; |
46 | bool actionCopy; |
47 | bool actionDump; |
48 | bool actionDumpMap; |
49 | bool actionDumpToc; |
50 | bool actionFracture; |
51 | bool actionILDump; |
52 | bool actionInteg; |
53 | bool actionMerge; |
54 | bool actionRemoveDup; |
55 | bool actionStat; |
56 | bool actionStrip; |
57 | bool actionTOC; |
58 | bool legacyCompare; |
59 | bool recursive; |
60 | bool stripCR; |
61 | char* nameOfFile1; |
62 | char* nameOfFile2; |
63 | char* nameOfFile3; |
64 | int indexCount; |
65 | int* indexes; |
66 | }; |
67 | |
68 | static bool Parse(int argc, char* argv[], /* OUT */ Options* o); |
69 | |
70 | private: |
71 | static void DumpHelp(const char* program); |
72 | }; |
73 | #endif |
74 | |