diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-07 17:21:13 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-07 20:16:27 -0500 |
| commit | ba7d24faef49858b9721c2ade0f3ea4a7ba4d96d (patch) | |
| tree | 3eca105cdc03aee82eed15777f36504d32e106ea /src/commandline.h | |
| parent | 1bf24c7daad1eb954dc160784802de58f9809fa1 (diff) | |
moved handleCommandLine() to CommandLine::setupCore()
Diffstat (limited to 'src/commandline.h')
| -rw-r--r-- | src/commandline.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/commandline.h b/src/commandline.h index 478ee8ea..baa0bfb9 100644 --- a/src/commandline.h +++ b/src/commandline.h @@ -4,6 +4,8 @@ #include <vector> #include <memory> +class OrganizerCore; + namespace cl { @@ -193,6 +195,18 @@ protected: // if moshortcut:// is detected and has an instance, it will override -i if both // are given // +// +// the command is used in two phases: +// +// 1) run() is called in main() shortly after startup; it parses the command +// line and runs the given command, if any +// +// 2) if the command did not request to exit, the instance is loaded +// in main() et al. and setupCore() is called; it handles moshortcut, +// nxm links and starting executables/binaries +// +// either can return an exit code, which will make MO exit immediately +// class CommandLine { public: @@ -206,6 +220,14 @@ public: // std::optional<int> run(const std::wstring& line); + // handles moshortcut, nxm links and starting processes + // + // returns an empty optional if execution should continue, or a return code + // if MO must quit + // + std::optional<int> setupCore(OrganizerCore& organizer) const; + + // clears parsed options, used when MO is "restarted" so the options aren't // processed again // |
