#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, argc - 1, &argv[1]).execute(); } 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) { continue; } return EXIT_SUCCESS; }