aboutsummaryrefslogtreecommitdiff
path: root/base/commandLine.h
diff options
context:
space:
mode:
authorMax Horn2011-05-23 19:36:45 +0200
committerMax Horn2011-05-23 19:39:25 +0200
commit20cad6e8b6fe9ae843245697e872256c4ca1e545 (patch)
treee6ddd7b3f8ff6be39ea9ceab523050e73e3ba354 /base/commandLine.h
parent6f6051a9e1da4d4debc1bf851b101c7a40d8b531 (diff)
downloadscummvm-rg350-20cad6e8b6fe9ae843245697e872256c4ca1e545.tar.gz
scummvm-rg350-20cad6e8b6fe9ae843245697e872256c4ca1e545.tar.bz2
scummvm-rg350-20cad6e8b6fe9ae843245697e872256c4ca1e545.zip
COMMON: Modify Base::processSettings, get rid of Common::kArgumentNotProcessed
Instead of defining a hacked up Common::Error code, split the return value of processSettings into two parts: An error code, and a value which indicates whether the specified command was completely handled by processSettings or not.
Diffstat (limited to 'base/commandLine.h')
-rw-r--r--base/commandLine.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/base/commandLine.h b/base/commandLine.h
index 4e611d97bf..2798ab0934 100644
--- a/base/commandLine.h
+++ b/base/commandLine.h
@@ -32,9 +32,28 @@ class String;
namespace Base {
+/**
+ * Register various defaults with the ConfigManager.
+ */
void registerDefaults();
+
+/**
+ * Parse the command line for options and a command; the options
+ * are stored in the map 'settings, the command (if any) is returned.
+ */
Common::String parseCommandLine(Common::StringMap &settings, int argc, const char * const *argv);
-Common::Error processSettings(Common::String &command, Common::StringMap &settings);
+
+/**
+ * Process the command line options and arguments.
+ * Returns true if everything was handled and ScummVM should quit
+ * (e.g. because "--help" was specified, and handled).
+ *
+ * @param[in] command the command as returned by parseCommandLine
+ * @param[in] settings the settings as returned by parseCommandLine
+ * @param[out] err indicates whether any error occurred, and which
+ * @return true if the command was completely processed and ScummVM should quit, false otherwise
+ */
+bool processSettings(Common::String &command, Common::StringMap &settings, Common::Error &err);
} // End of namespace Base