/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2011 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * \file Worker.cpp * * This file strongly follows the Serialization example from the boost::asio * library (see client.cpp) * * Created on: Oct 19, 2011 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif // boost asio needs specific operator new #include #include "CodePatterns/MemDebug.hpp" #include #include "atexit.hpp" #include "CodePatterns/Info.hpp" #include "CodePatterns/Log.hpp" #include "FragmentWorker.hpp" int main(int argc, char* argv[]) { // from this moment on, we need to be sure to deeinitialize in the correct order // this is handled by the cleanup function atexit(cleanUp); setVerbosity(3); size_t Exitflag = 0; try { // Check command line arguments. if (argc != 3) { std::cerr << "Usage: " << argv[0] << " " << std::endl; return 1; } boost::asio::io_service io_service; FragmentWorker client(io_service, argv[1], argv[2]); { Info info("io_service"); io_service.run(); } Exitflag = client.getExitflag(); } catch (std::exception& e) { std::cerr << e.what() << std::endl; } return Exitflag; }