#include #include "Exception.h" #include "LoadFilesCommand.h" #include "Museum.h" #include "View.h" using namespace std; int main(int argc, char** argv) { Museum museum {}; View view { museum }; try { LoadFilesCommand(museum).execute(argc - 1, &argv[1]); } catch (Exception & e) { printf("%s\n", e.what()); return EXIT_FAILURE; // invalid files on start cause exit } // Museum and View both create their own worker threads, so the main thread // should remain to keep the view active. while (view.open) ; return EXIT_SUCCESS; }