Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: tools/flags/SkCommandLineFlags.h

Issue 19807005: refactor duplication (shouldSkip and skip_name) into a utility function (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Move to SkCommandLineFlags Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/skia_test.cpp ('k') | tools/flags/SkCommandLineFlags.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/flags/SkCommandLineFlags.h
diff --git a/tools/flags/SkCommandLineFlags.h b/tools/flags/SkCommandLineFlags.h
index d0e74502d8f98ce5eca8e474bb8db73dc3540878..1bb3f057d9fa3a680ef02028879fa654caf427e7 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);
reed1 2013/07/23 15:41:32 static methods are Capitalized (see Parse above)
+
/**
* Custom class for holding the arguments for a string flag.
* Publicly only has accessors so the strings cannot be modified.
« no previous file with comments | « tests/skia_test.cpp ('k') | tools/flags/SkCommandLineFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698