OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SK_COMMAND_LINE_FLAGS_H | 8 #ifndef SK_COMMAND_LINE_FLAGS_H |
9 #define SK_COMMAND_LINE_FLAGS_H | 9 #define SK_COMMAND_LINE_FLAGS_H |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 class SkCommandLineFlags { | 101 class SkCommandLineFlags { |
102 | 102 |
103 public: | 103 public: |
104 /** | 104 /** |
105 * Call to set the help message to be displayed. Should be called before | 105 * Call to set the help message to be displayed. Should be called before |
106 * Parse. | 106 * Parse. |
107 */ | 107 */ |
108 static void SetUsage(const char* usage); | 108 static void SetUsage(const char* usage); |
109 | 109 |
110 /** | 110 /** |
| 111 * Call this to display the help message. Should be called after SetUsage. |
| 112 */ |
| 113 static void PrintUsage(); |
| 114 |
| 115 /** |
111 * Call at the beginning of main to parse flags created by DEFINE_x, above. | 116 * Call at the beginning of main to parse flags created by DEFINE_x, above. |
112 * Must only be called once. | 117 * Must only be called once. |
113 */ | 118 */ |
114 static void Parse(int argc, char** argv); | 119 static void Parse(int argc, char** argv); |
115 | 120 |
116 /** | 121 /** |
117 * Custom class for holding the arguments for a string flag. | 122 * Custom class for holding the arguments for a string flag. |
118 * Publicly only has accessors so the strings cannot be modified. | 123 * Publicly only has accessors so the strings cannot be modified. |
119 */ | 124 */ |
120 class StringArray { | 125 class StringArray { |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 double* fDoubleValue; | 487 double* fDoubleValue; |
483 double fDefaultDouble; | 488 double fDefaultDouble; |
484 SkCommandLineFlags::StringArray* fStrings; | 489 SkCommandLineFlags::StringArray* fStrings; |
485 // Both for the help string and in case fStrings is empty. | 490 // Both for the help string and in case fStrings is empty. |
486 SkString fDefaultString; | 491 SkString fDefaultString; |
487 | 492 |
488 // In order to keep a linked list. | 493 // In order to keep a linked list. |
489 SkFlagInfo* fNext; | 494 SkFlagInfo* fNext; |
490 }; | 495 }; |
491 #endif // SK_COMMAND_LINE_FLAGS_H | 496 #endif // SK_COMMAND_LINE_FLAGS_H |
OLD | NEW |