/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2012 University of Bonn. All rights reserved. * * * This file is part of MoleCuilder. * * MoleCuilder is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * MoleCuilder is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MoleCuilder. If not, see . */ /* * SpecificFragmentController.cpp * * Created on: Aug 27, 2012 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif // boost asio needs specific operator new #include #include "CodePatterns/MemDebug.hpp" #include "SpecificFragmentController.hpp" #include "CodePatterns/Info.hpp" #include /** Simple NoOp as default handler for updates. * */ static void NoOpHandler(const size_t step, const size_t total) {} SpecificFragmentController::SpecificFragmentController(boost::asio::io_service &_io_service) : FragmentController(_io_service), io_service(_io_service), handler(boost::bind(&NoOpHandler, _1, _2)) {} void SpecificFragmentController::RunService(std::string message) { message = std::string("io_service: ") + message; io_service.reset(); #ifndef NDEBUG Info info(message.c_str()); #endif io_service.run(); } void SpecificFragmentController::requestIds(const size_t numberjobs) { FragmentController::requestIds(host, port, numberjobs); RunService("Requesting ids"); }