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

Unified Diff: build_tools/debug_server/debug_server/common/debug_command_line.h

Issue 6312039: RSP proxy that can record session (for playback testing).... (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src/
Patch Set: Created 9 years, 11 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
Index: build_tools/debug_server/debug_server/common/debug_command_line.h
===================================================================
--- build_tools/debug_server/debug_server/common/debug_command_line.h (revision 0)
+++ build_tools/debug_server/debug_server/common/debug_command_line.h (revision 0)
@@ -0,0 +1,27 @@
+#ifndef NACL_SDK_BUILD_TOOLS_DEBUG_SERVER_COMMON_DEBUG_COMMAND_LINE_H_
+#define NACL_SDK_BUILD_TOOLS_DEBUG_SERVER_COMMON_DEBUG_COMMAND_LINE_H_
+
+#include <string>
+
+namespace debug {
+
+// This class works with command lines.
+// Switches can optionally have a value attached as in "--switch value".
+
+class CommandLine {
+ public:
+ CommandLine(int argc, char* argv[]); // Initializze from argv vector.
+ ~CommandLine();
+
+ // Returns the value assosiated with the given switch.
+ std::string GetStringSwitch(const std::string& name,
+ const std::string& default_value) const;
+ int GetIntSwitch(const std::string& name, int default_value) const;
+ bool HasSwitch(const std::string& name) const;
+
+ protected:
+ int argc_;
+ char** argv_;
+};
+} // namespace debug
+#endif // NACL_SDK_BUILD_TOOLS_DEBUG_SERVER_COMMON_DEBUG_COMMAND_LINE_H_

Powered by Google App Engine
This is Rietveld 408576698