Isis 3 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. More...
 
 ~Application ()
 Destroys the Application object. More...
 
int Run (void(*funct)())
 Runs the program defined in the function funct. More...
 
PvlGroup Accounting ()
 Creates accounting PvlGroup. More...
 
PvlObject History ()
 Creates an application history PvlObject. More...
 
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. More...
 

Static Public Member Functions

static UserInterfaceGetUserInterface ()
 Returns the UserInterface object. More...
 
static void Log (PvlGroup &results)
 Writes Pvl results to sessionlog and printfile. More...
 
static void GuiLog (const Pvl &results)
 Writes the Pvl results to the sessionlog, but not to the printfile. More...
 
static void GuiLog (const PvlGroup &results)
 Writes the PvlGroup results to the sessionlog, but not to the printfile. More...
 
static void GuiLog (const QString &results)
 Writes the results to the sessionlog, but not to the printfile. More...
 
static QString Name ()
 Returns the name of the application. More...
 
static QString UserName ()
 Returns the user name. More...
 
static QString HostName ()
 Returns the host name. More...
 
static QString DateTime (time_t *curtime=0)
 Returns the date and time as a QString. More...
 
static QString Version ()
 The Isis Version for this application. More...
 
static bool HasParent ()
 Returns whether the application has a parent or not. More...
 
static QString userName ()
 the user name. More...
 
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_, Isis::IException::errorType(), Isis::FileName::expanded(), Isis::FileName::fileExists(), Isis::Message::FileOpen(), GetUserInterface(), Isis::iApp, Isis::FileName::name(), Isis::UserInterface::ParentId(), Isis::IException::print(), and Isis::toString().

◆ ~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

Returns the date and time as a QString.

Parameters
*curtime
Returns
QString The date and time

Referenced by Isis::ControlPoint::GetDateTime().

◆ 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(), Isis::iApp, Isis::UserInterface::IsInteractive(), Isis::Gui::Log(), Isis::Gui::ShowLog(), and Isis::UserInterface::TheGui().

◆ 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(), Isis::iApp, Isis::UserInterface::IsInteractive(), Isis::Gui::Log(), Isis::Gui::ShowLog(), and Isis::UserInterface::TheGui().

◆ 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(), Isis::iApp, Isis::UserInterface::IsInteractive(), Isis::Gui::Log(), Isis::Gui::ShowLog(), and Isis::UserInterface::TheGui().

◆ 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::IException::toString().

◆ 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().

◆ History()

PvlObject Isis::Application::History ( )

Creates an application history PvlObject.

Returns
PvlObject

References Isis::PvlObject::addGroup().

Referenced by Isis::History::AddEntry().

◆ hostName()

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

References Isis::Environment::getEnvironmentValue().

◆ HostName()

QString Isis::Application::HostName ( )
static

Returns the host name.

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

Returns
QString Host Name

◆ isisVersion()

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

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

◆ 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(), Isis::iApp, Isis::UserInterface::IsInteractive(), Isis::Gui::Log(), Isis::Gui::ShowLog(), and Isis::UserInterface::TheGui().

◆ 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::ControlPoint::GetChooserName(), and Isis::IException::toPvl().

◆ RegisterGuiHelpers()

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

Referenced by main().

◆ Run()

int Isis::Application::Run ( void(*)()  funct)

Runs the program defined in the function funct.

Parameters
*funct
Returns
int Status of the function execution

References _FILEINFO_.

Referenced by main().

◆ userName()

QString Isis::Environment::userName ( )
staticinherited

the user name.

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

References Isis::Environment::getEnvironmentValue().

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

◆ UserName()

QString Isis::Application::UserName ( )
static

◆ Version()

QString Isis::Application::Version ( )
static

The Isis Version for this application.

Returns
QString

Friends And Related Function 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 main().


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