Isis 3 Programmer Reference
Isis::Environment Class Reference

#include <Environment.h>

Inheritance diagram for Isis::Environment:
Inheritance graph
Collaboration diagram for Isis::Environment:
Collaboration graph

Static Public Member Functions

static QString userName ()
 the user name. More...
 
static QString hostName ()
 
static QString isisVersion ()
 
static QString getEnvironmentValue (QString, QString)
 

Static Private Attributes

static Environment automaticEnvironmentSetup
 Construct an environment in static space to initialize some global Isis 3 environment options. More...
 

Detailed Description

Author
2011-04-01 Eric Hyer & Steven Lambright
History:

2011-09-20 Steven Lambright - Added support for 4 line version file.

2012-03-06 Steven Lambright - Added automatic environment setup that works with every Isis 3 application. This includes the 'qisis' applications. The automatic setup is setting the Qt plugin path because picking up a plugin from the OS means crashing with an error like: Cannot mix incompatible Qt library (version 0x40704) with this library (version 0x40800) Fixes #742.

2012-11-02 Steven Lambright - Updated automatic environment setup to fix a library dependency problem (that is ignoring our plugin path setting) with QDBus. Fixes #1228.

2106-06-20 Kris Becker - Porting to Qt5.6 requires a different Qt startup strategy. See QStartup().

Definition at line 52 of file Environment.h.

Member Function Documentation

◆ getEnvironmentValue()

QString Isis::Environment::getEnvironmentValue ( QString  variable,
QString  defaultValue 
)
static
Parameters
variableThe environment variable to get
defaultValueThe returned value for variable if variable doesn't exist.
Returns
The value for the environment variable requested.

Definition at line 86 of file Environment.cpp.

Referenced by hostName(), and userName().

◆ hostName()

QString Isis::Environment::hostName ( )
static
Returns
the host name. Returns 'Unknown' if it cannot find the host name.

Definition at line 74 of file Environment.cpp.

References getEnvironmentValue().

◆ isisVersion()

QString Isis::Environment::isisVersion ( )
static
Returns
the Isis version in the format isis?.?.?.?qualifier | date

Definition at line 102 of file Environment.cpp.

References _FILEINFO_, Isis::TextFile::GetLine(), and Isis::IException::Programmer.

◆ userName()

QString Isis::Environment::userName ( )
static

the user name.

Returns 'Unknown' if it cannot find the user name.

Definition at line 66 of file Environment.cpp.

References getEnvironmentValue().

Referenced by Isis::Project::clear(), and Isis::Project::Project().

Member Data Documentation

◆ automaticEnvironmentSetup

Environment Isis::Environment::automaticEnvironmentSetup
staticprivate

Construct an environment in static space to initialize some global Isis 3 environment options.

This initialization applies to anything that links against the Isis 3 library.

Definition at line 71 of file Environment.h.


The documentation for this class was generated from the following files: