diff options
author | sglez@google.com <sglez@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-24 17:24:23 +0000 |
---|---|---|
committer | sglez@google.com <sglez@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-24 17:24:23 +0000 |
commit | 586db93c447b753364d50fadc5426de4fef9a759 (patch) | |
tree | 93057a5d7e6428c97e782ce43078a0ddff7892e3 /tools/flags/SkCommandLineFlags.h | |
parent | d9763a550517b003a39437221f2ea03c6b32f026 (diff) |
refactor duplication (shouldSkip and skip_name) into a utility function
R=caryclark@google.com, reed@google.com
Committed: https://code.google.com/p/skia/source/detail?r=10280
Review URL: https://codereview.chromium.org/19807005
git-svn-id: http://skia.googlecode.com/svn/trunk@10317 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/flags/SkCommandLineFlags.h')
-rw-r--r-- | tools/flags/SkCommandLineFlags.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/flags/SkCommandLineFlags.h b/tools/flags/SkCommandLineFlags.h index d0e74502d8..51af933467 100644 --- a/tools/flags/SkCommandLineFlags.h +++ b/tools/flags/SkCommandLineFlags.h @@ -10,6 +10,7 @@ #include "SkString.h" #include "SkTArray.h" +#include "SkTDArray.h" /** * Including this file (and compiling SkCommandLineFlags.cpp) provides command line @@ -90,7 +91,6 @@ * strings) so that a flag can be followed by multiple parameters. */ - class SkFlagInfo; class SkCommandLineFlags { @@ -108,6 +108,15 @@ public: */ static void Parse(int argc, char** argv); + /* Takes a list of the form [~][^]match[$] + ~ causes a matching test to always be skipped + ^ requires the start of the test to match + $ requires the end of the test to match + ^ and $ requires an exact match + If a test does not match any list entry, it is skipped unless some list entry starts with ~ + */ + static bool ShouldSkip(const SkTDArray<const char*>& strings, const char* name); + /** * Custom class for holding the arguments for a string flag. * Publicly only has accessors so the strings cannot be modified. |