Isis Developer Reference
Isis::Application Class Reference

#include <Application.h>

Inheritance diagram for Isis::Application:
Inheritance graph
Collaboration diagram for Isis::Application:
Collaboration graph

Public Member Functions

 Application (int &argc, char *argv[])
 Constuctor for the Application object.
 
 ~Application ()
 Destroys the Application object.
 
int Run (void(*funct)())
 Runs the program defined in the function funct.
 
PvlGroup Accounting ()
 Creates accounting PvlGroup.
 
PvlObject History ()
 Creates an application history PvlObject.
 
void RegisterGuiHelpers (std::map< QString, void * > helpers)
 
void * GetGuiHelper (QString helper)
 
void GuiReportError (IException &e)
 Loads the error message into the gui, but does not write it to the session log.
 

Static Public Member Functions

static UserInterfaceGetUserInterface ()
 Returns the UserInterface object.
 
static void Log (PvlGroup &results)
 Writes Pvl results to sessionlog and printfile.
 
static void GuiLog (const Pvl &results)
 Writes the Pvl results to the sessionlog, but not to the printfile.
 
static void GuiLog (const PvlGroup &results)
 Writes the PvlGroup results to the sessionlog, but not to the printfile.
 
static void GuiLog (const QString &results)
 Writes the results to the sessionlog, but not to the printfile.
 
static QString Name ()
 Returns the name of the application.
 
static QString UserName ()
 Returns the user name.
 
static QString HostName ()
 Returns the host name.
 
static QString DateTime (time_t *curtime=0)
 Returns the date and time as a QString.
 
static QString Version ()
 The Isis Version for this application.
 
static bool HasParent ()
 Returns whether the application has a parent or not.
 
static QString userName ()
 @Returns the user name.
 
static QString hostName ()
 
static QString isisVersion ()
 
static QString getEnvironmentValue (QString, QString)
 

Static Public Attributes

static bool p_applicationForceGuiApp = false
 

Friends

class Gui
 
class Progress
 
class ProgramLauncher
 

Detailed Description

Author
????-??-?? Unknown

Constructor & Destructor Documentation

◆ Application()

Isis::Application::Application ( int & argc,
char * argv[] )

Constuctor for the Application object.

Parameters
argcNumber of arguments in argv[]. This must be passed by reference!!
*argv[]An array containing the command line arguments
Exceptions
Isis::iException::Io- FileOpen error

References _FILEINFO_, DateTime(), Isis::FileName::expanded(), Isis::FileName::fileExists(), Isis::Message::FileOpen(), GetUserInterface(), Isis::iApp, Isis::IException::Io, Isis::UserInterface::IsInteractive(), Isis::FileName::name(), p_applicationForceGuiApp, Isis::Preference::Preferences(), Isis::toString(), and UserName().

◆ ~Application()

Isis::Application::~Application ( )

Destroys the Application object.

Member Function Documentation

◆ Accounting()

PvlGroup Isis::Application::Accounting ( )

Creates accounting PvlGroup.

Returns
PvlGroup Accounting Group

◆ DateTime()

QString Isis::Application::DateTime ( time_t * curtime = 0)
static

◆ getEnvironmentValue()

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

Referenced by Isis::Environment::Environment(), Isis::Environment::hostName(), QStartup(), and Isis::Environment::userName().

◆ GetGuiHelper()

void * Isis::Application::GetGuiHelper ( QString helper)
inline
Parameters
helper

◆ GetUserInterface()

◆ GuiLog() [1/3]

void Isis::Application::GuiLog ( const Pvl & results)
static

Writes the Pvl results to the sessionlog, but not to the printfile.

Parameters
resultsPvl containing the results to add to the session log

References GetUserInterface(), HasParent(), and Isis::iApp.

◆ GuiLog() [2/3]

void Isis::Application::GuiLog ( const PvlGroup & results)
static

Writes the PvlGroup results to the sessionlog, but not to the printfile.

Parameters
resultsPvlGroup containing the results to add to the session log

References GetUserInterface(), HasParent(), and Isis::iApp.

◆ GuiLog() [3/3]

void Isis::Application::GuiLog ( const QString & results)
static

Writes the results to the sessionlog, but not to the printfile.

Parameters
resultsQString containing the results to add to the session log

References GetUserInterface(), HasParent(), and Isis::iApp.

◆ GuiReportError()

void Isis::Application::GuiReportError ( IException & e)

Loads the error message into the gui, but does not write it to the session log.

Parameters
eThe Isis::iException

References Isis::Gui::LoadMessage(), Isis::Gui::ProgressText(), Isis::Gui::ShowWarning(), and Isis::UserInterface::TheGui().

◆ HasParent()

bool Isis::Application::HasParent ( )
static

Returns whether the application has a parent or not.

Returns
bool Returns true if it has a parent, and false if it does not

References Isis::iApp, and Isis::UserInterface::ParentId().

Referenced by GuiLog(), GuiLog(), GuiLog(), and Log().

◆ History()

◆ HostName()

QString Isis::Application::HostName ( )
static

Returns the host name.

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

Returns
QString Host Name

References Isis::Environment::hostName().

Referenced by History().

◆ hostName()

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

References Isis::Environment::getEnvironmentValue().

Referenced by HostName().

◆ isisVersion()

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

References _FILEINFO_, and Isis::IException::Programmer.

Referenced by Version().

◆ Log()

void Isis::Application::Log ( PvlGroup & results)
static

Writes Pvl results to sessionlog and printfile.

Parameters
resultsPvlGroup of results to add to the session log

References GetUserInterface(), HasParent(), Isis::iApp, and Isis::SessionLog::TheLog().

Referenced by Isis::PvlObject::addLogGroup().

◆ Name()

QString Isis::Application::Name ( )
static

Returns the name of the application.

Returns 'Unknown' if the application or gui equal NULL

Returns
QString The application name

Referenced by Isis::ControlMeasure::GetChooserName(), Isis::ControlPoint::GetChooserName(), Isis::ProcessExportPds4::identificationArea(), and Isis::IException::toPvl().

◆ RegisterGuiHelpers()

void Isis::Application::RegisterGuiHelpers ( std::map< QString, void * > helpers)
inline
Parameters
helpers

◆ Run()

◆ UserName()

◆ userName()

QString Isis::Environment::userName ( )
staticinherited

@Returns the user name.

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

References Isis::Environment::getEnvironmentValue().

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

◆ Version()

QString Isis::Application::Version ( )
static

The Isis Version for this application.

Returns
QString

References Isis::Environment::isisVersion().

Referenced by History(), and Isis::ProcessExportPds4::identificationArea().

Friends And Related Symbol Documentation

◆ Gui

friend class Gui
friend

◆ ProgramLauncher

friend class ProgramLauncher
friend

◆ Progress

friend class Progress
friend

Member Data Documentation

◆ p_applicationForceGuiApp

bool Isis::Application::p_applicationForceGuiApp = false
static

Referenced by Application(), and main().


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