1 ///////////////////////////////////////////////////////////////////////////
3 // Author: Daniel Giritzer <daniel@giritzer.eu>
5 // Description: Hauptprogramm initialisiert und instanziert alle Klassen.
7 ///////////////////////////////////////////////////////////////////////////
11 #include "Controller.h"
14 #include <FL/fl_ask.H>
16 /////////////////////////////////////////////////
17 /// \brief Hauptprogramm, Initialisiere Model,
18 /// View und Controller.
19 /////////////////////////////////////////////////
25 std::string curDir = FShelp.getCurrentWorkingDir();
26 std::string confDir = FShelp.addDirLastSlash(curDir) + "etc";
30 // Benutze eigenen Loader
31 FShelp.setLinuxDynLoader(FShelp.addDirLastSlash(curDir) + "lib/ld-linux.so.2");
35 // Benutze Loader des Linux Betriebsystems
36 FShelp.removeLinuxDynLoader();
39 std::shared_ptr<Model> myModel {std::make_shared<Model>()};
40 Controller::SPtr myController {std::make_shared<Controller>(myModel)};
42 View myView(myController, myModel);
48 // ----------- Exception Handling ------------
51 std::cerr << e << std::endl;
52 fl_alert(e.c_str()); //Textbox mit fehlermeldung
55 catch (std::bad_alloc const& e)
57 // Spezielle Ausnahme: Speicherallokierung misslungen
58 std::cerr << "Exeption Caught: Bad memory allocation ( " << e.what() << " )" << std::endl;
63 std::cerr << "Unhandled exeption caught!" << std::endl;