| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_TOOLS_SIMPLE_COMMAND_LINE_PARSER_H_ | 11 #ifndef WEBRTC_TOOLS_SIMPLE_COMMAND_LINE_PARSER_H_ |
| 12 #define WEBRTC_TOOLS_SIMPLE_COMMAND_LINE_PARSER_H_ | 12 #define WEBRTC_TOOLS_SIMPLE_COMMAND_LINE_PARSER_H_ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "webrtc/rtc_base/constructormagic.h" | 18 #include "webrtc/base/constructormagic.h" |
| 19 #include "webrtc/rtc_base/gtest_prod_util.h" | 19 #include "webrtc/base/gtest_prod_util.h" |
| 20 | 20 |
| 21 // This is a very basic command line parsing class. We pass the command line | 21 // This is a very basic command line parsing class. We pass the command line |
| 22 // arguments and their number and the class forms a vector out of these. Than we | 22 // arguments and their number and the class forms a vector out of these. Than we |
| 23 // should set up the flags - we provide a name and a string value and map these. | 23 // should set up the flags - we provide a name and a string value and map these. |
| 24 // | 24 // |
| 25 // Example use of this class: | 25 // Example use of this class: |
| 26 // 1. Create a CommandLineParser object. | 26 // 1. Create a CommandLineParser object. |
| 27 // 2. Configure the flags you want to support with SetFlag calls. | 27 // 2. Configure the flags you want to support with SetFlag calls. |
| 28 // 3. Call Init with your program's argc+argv parameters. | 28 // 3. Call Init with your program's argc+argv parameters. |
| 29 // 4. Parse the flags by calling ProcessFlags. | 29 // 4. Parse the flags by calling ProcessFlags. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 FRIEND_TEST_ALL_PREFIXES(CommandLineParserTest, GetCommandLineFlagName); | 91 FRIEND_TEST_ALL_PREFIXES(CommandLineParserTest, GetCommandLineFlagName); |
| 92 FRIEND_TEST_ALL_PREFIXES(CommandLineParserTest, GetCommandLineFlagValue); | 92 FRIEND_TEST_ALL_PREFIXES(CommandLineParserTest, GetCommandLineFlagValue); |
| 93 | 93 |
| 94 RTC_DISALLOW_COPY_AND_ASSIGN(CommandLineParser); | 94 RTC_DISALLOW_COPY_AND_ASSIGN(CommandLineParser); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace test | 97 } // namespace test |
| 98 } // namespace webrtc | 98 } // namespace webrtc |
| 99 | 99 |
| 100 #endif // WEBRTC_TOOLS_SIMPLE_COMMAND_LINE_PARSER_H_ | 100 #endif // WEBRTC_TOOLS_SIMPLE_COMMAND_LINE_PARSER_H_ |
| OLD | NEW |