/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2012 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * \file poolworker.cpp * * This file strongly follows the Serialization example from the boost::asio * library (see client.cpp) * * Created on: Feb 28, 2012 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif // boost asio needs specific operator new #include #include "CodePatterns/MemDebug.hpp" #include #include #include "atexit.hpp" #include "CodePatterns/Info.hpp" #include "CodePatterns/Log.hpp" #include "Pool/PoolWorker.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 != 5) { std::cerr << "Usage: " << argv[0] << " " << std::endl; return 1; } boost::asio::io_service io_service; PoolWorker client(io_service, argv[1], argv[2], argv[3], argv[4]); { Info info("io_service"); io_service.run(); } exitflag = client.getFlag(); } catch (std::exception& e) { std::cerr << e.what() << std::endl; } return exitflag; }