ARTS
2.2.66
|
This file contains the function get_parameters, which reads command line parameters. More...
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include "arts.h"
#include <arts_getopt.h>
#include "parameters.h"
#include "file.h"
Go to the source code of this file.
Functions | |
void | parse_path_from_environment (String envvar, ArrayOfString &paths) |
Parse path environment variable. More... | |
bool | get_parameters (int argc, char **argv) |
Get the command line parameters. More... | |
Variables | |
Parameters | parameters |
Holds the command line parameters. More... | |
This file contains the function get_parameters, which reads command line parameters.
Standard GNU functions are used for this.
Definition in file parameters.cc.
bool get_parameters | ( | int | argc, |
char ** | argv | ||
) |
Get the command line parameters.
They are stored in the global variable parameters which is a structure of type Parameters. If needed, this variable should be declared like this:
extern const Parameters parameters
argc | Number of command line parameters |
argv | Values of command line parameters |
Definition at line 76 of file parameters.cc.
References ARTS_DEFAULT_INCLUDE_DIR, arts_exit(), Parameters::basename, Parameters::baseurl, Parameters::controlfiles, Parameters::daemon, Parameters::datapath, Parameters::describe, Parameters::docserver, get_dirname(), getopt_long(), Parameters::groups, Parameters::gui, option::has_arg, Parameters::help, Parameters::helptext, Parameters::includepath, Parameters::input, Parameters::methods, option::name, my_basic_string< charT >::nelem(), Array< base >::nelem(), no_argument, my_basic_string< charT >::npos, Parameters::numthreads, optarg, optind, optional_argument, Parameters::outdir, parse_path_from_environment(), Parameters::plain, Parameters::reporting, required_argument, Parameters::usage, option::val, Parameters::version, and Parameters::workspacevariables.
Referenced by main().
void parse_path_from_environment | ( | String | envvar, |
ArrayOfString & | paths | ||
) |
Parse path environment variable.
Parse a colon separated list of paths from the given environment variable into an ArrayOfString.
[in] | envvar | Name of environment variable. |
[out] | paths | ArrayOfString of paths. |
Definition at line 54 of file parameters.cc.
References my_basic_string< charT >::npos.
Referenced by get_parameters().
Parameters parameters |
Holds the command line parameters.
Definition at line 41 of file parameters.cc.
Referenced by add_basedir(), find_xml_file(), main(), open_input_file(), option_methods(), option_workspacevariables(), and ArtsParser::parse_agenda().