Documentation
Describes the execution environment of the program.
This is an old way of writing singleton.
Static Public Member Functions | |
static void | init (int &argcref, char **&argvref) |
Set the argument count and vector. More... | |
static void | set_out (std::ostream *o=nullptr) |
static void | push_out (std::ostream *o=nullptr) |
static void | pop_out () |
static void | set_err (std::ostream *o=nullptr) |
static void | push_err (std::ostream *o=nullptr) |
static void | pop_err () |
static bool | initialized () |
static int & | argc () |
Return an reference to the argument count. More... | |
static char **& | argv () |
Return an reference to the argument vector. More... | |
static const char * | program_name () |
Return argv[0] with the path removed. More... | |
static const char * | hostname () |
Return the host name. More... | |
static const char * | username () |
Return the user name. More... | |
static std::string | getenv (const std::string &name) |
static std::ostream & | outn () |
Return an ostream that writes from all processes. More... | |
static std::ostream & | errn () |
Return an ostream for error messages that writes from all processes. More... | |
static std::ostream & | out0 () |
static std::ostream & | err0 () |
static std::ostream & | out0 (TA::World &world) |
Return an ostream that writes from process 0 of the given World. More... | |
static std::ostream & | err0 (TA::World &world) |
Member Function Documentation
◆ argc()
|
static |
Return an reference to the argument count.
◆ argv()
|
static |
Return an reference to the argument vector.
◆ err0() [1/2]
|
static |
Return an ostream for error messages that writes from process 0 of the default World.
- Note
- FormIO::set_printnode() can be used to specify which process this prints from
◆ err0() [2/2]
|
static |
Return an ostream for error messages that writes from process 0 of the given World.
◆ errn()
|
static |
Return an ostream for error messages that writes from all processes.
◆ getenv()
|
static |
Return the value of an environment variable. If it does not exist, then an empty string is returned.
◆ hostname()
|
static |
Return the host name.
◆ init()
|
static |
Set the argument count and vector.
◆ initialized()
|
static |
- Returns
- true if ExEnv has been initialized.
◆ out0() [1/2]
|
static |
Return an ostream that writes from process 0 of the default World.
- Note
- FormIO::set_printnode() can be used to specify which process this prints from
◆ out0() [2/2]
|
static |
Return an ostream that writes from process 0 of the given World.
◆ outn()
|
static |
Return an ostream that writes from all processes.
◆ pop_err()
|
static |
replaces stderr with the stream used before the most recent call to ExEnv::push_err(), if any
◆ pop_out()
|
static |
replaces stdout with the stream used before the most recent call to ExEnv::push_out(), if any
◆ program_name()
|
static |
Return argv[0] with the path removed.
◆ push_err()
|
static |
pushes current stderr to a stack and calls ExEnv::set_err(o)
- Parameters
-
o pointer to the std::ostream object to be used for standard error
◆ push_out()
|
static |
pushes current stdout to a stack and calls ExEnv::set_out(o)
- Parameters
-
o pointer to the std::ostream object to be used for standard output
◆ set_err()
|
static |
Set the stderr stream on this rank to o
- Parameters
-
o pointer to the std::ostream object to be used for standard error; if given nullptr
will redirect stderr to/dev/null
◆ set_out()
|
static |
Set the stdout stream on this rank to o
- Parameters
-
o pointer to the std::ostream object to be used for standard output; if given nullptr
will redirect stdout to/dev/null
- Note
o
will be auto-indented via mpqc::FormIO::autoindent_ostream()
◆ username()
|
static |
Return the user name.
The documentation for this class was generated from the following files: