Isis Developer Reference
Isis.h
Go to the documentation of this file.
1
6/* SPDX-License-Identifier: CC0-1.0 */
7
8#ifdef __GTHREADS
9#error *****Isis.h MUST be included before any other files!*****
10#endif
11
12#include <signal.h>
13
14#include <QCoreApplication>
15
16#include "Application.h"
17#include "UserInterface.h" // this is an unnecessary include
18
19#ifndef APPLICATION
20#define APPLICATION IsisMain
21#endif
22
67std::map<QString, void *> GuiHelpers();
68#ifndef GUIHELPERS
69std::map<QString, void *> GuiHelpers() {
70 std::map<QString, void *> empty;
71 return empty;
72}
73#endif
74
75void APPLICATION();
76
80void Abort(int);
82
91int main(int argc, char *argv[]) {
92 // Verify ISISROOT was set
93 // Note: as printing and logging IExceptions requires ISISROOT to be set (for preferences),
94 // The case below cannot be handled with IExceptions
95 if (getenv("ISISROOT") == NULL || QString(getenv("ISISROOT")) == "") {
96 std::cerr << "Please set ISISROOT before running any Isis applications" << std::endl;
97 exit(1);
98 }
99
101
102#ifdef USE_GUI_QAPP
104#endif
105
106 Isis::Application *app = new Isis::Application(argc, argv);
107 app->RegisterGuiHelpers(GuiHelpers());
108 int status = app->Run(APPLICATION);
109 delete app;
110 delete QCoreApplication::instance();
111 return status;
112}
int main(int argc, char *argv[])
The programmer supplied main function.
Definition Isis.h:91
void Abort(int)
void SegmentationFault(int)
#define APPLICATION
This is free and unencumbered software released into the public domain.
Definition Isis.h:20
void startMonitoringMemory()
void stopMonitoringMemory()
void InterruptSignal(int)
Definition Application.h:101
static bool p_applicationForceGuiApp
Definition Application.h:117
std::map< QString, void * > GuiHelpers()
Base include file for all Isis applications.
Definition Isis.h:69