|
wxMaxima
|
Finding an option on the command line before it is parsed. More...
#include <wx/string.h>#include <optional>#include <vector>Go to the source code of this file.
Functions | |
| std::optional< wxString > | wxm::cmdline::PrescanLongOption (const std::vector< wxString > &args, const wxString &name) |
| The value of the long option –name, as wxCmdLineParser would read it. | |
Finding an option on the command line before it is parsed.
wxMaxima sets up its UI language before wxCmdLineParser runs: the parser's own messages (an unknown option, the "Usage:" of –help) are translated through the catalogues that need the language first. An option that decides the language itself (–language) therefore has to be found by a simpler look at the arguments first. The real parser still sees it later, and checks it like any other option.
| std::optional< wxString > wxm::cmdline::PrescanLongOption | ( | const std::vector< wxString > & | args, |
| const wxString & | name | ||
| ) |
The value of the long option –name, as wxCmdLineParser would read it.
Understands "--name=value" and "--name value". The last occurrence wins, as it does for wxCmdLineParser. Stops at a bare "--", after which everything is a file name, and skips the program name in args[0].