Isis 3 Programmer Reference
Isis.h
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
77void startMonitoringMemory();
78void stopMonitoringMemory();
79void SegmentationFault(int);
80void Abort(int);
81void InterruptSignal(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
100 Isis::Application::p_applicationForceGuiApp = false;
101
102#ifdef USE_GUI_QAPP
103 Isis::Application::p_applicationForceGuiApp = true;
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}
std::map< QString, void * > GuiHelpers()
Base include file for all Isis applications.
Definition Isis.h:69