Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // This class works with command lines: building and parsing. |
| 6 | // Arguments with prefixes ('--', '-', and on Windows, '/') are switches. |
| 7 | // Switches will precede all other arguments without switch prefixes. |
| 8 | // Switches can optionally have values, delimited by '=', e.g., "-switch=value". |
| 9 | // An argument of "--" will terminate switch parsing during initialization, |
| 10 | // interpreting subsequent tokens as non-switch arguments, regardless of prefix. |
| 11 | |
| 12 | // There is a singleton read-only CommandLine that represents the command line |
| 13 | // that the current process was started with. It must be initialized in main(). |
| 14 | |
| 15 | #ifndef BASE_COMMAND_LINE_H_ |
| 16 | #define BASE_COMMAND_LINE_H_ |
| 17 | |
| 18 | #include <stddef.h> |
Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 19 | |
| 20 | #include "base/base_export.h" |
Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 21 | |
| 22 | namespace base { |
| 23 | |
Vitaly Buka | 60b8f00 | 2015-08-20 13:47:48 -0700 | [diff] [blame] | 24 | class CommandLine { |
Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 25 | public: |
Vitaly Buka | 8750b27 | 2015-08-18 18:39:08 -0700 | [diff] [blame] | 26 | static bool Init(int argc, const char* const* argv) { return true; } |
Vitaly Buka | cbed206 | 2015-08-17 12:54:05 -0700 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | } // namespace base |
| 30 | |
| 31 | #endif // BASE_COMMAND_LINE_H_ |