/* * ResultContainer.hpp * * Created on: Apr 22, 2014 * Author: heber */ #ifndef RESULTCONTAINER_HPP_ #define RESULTCONTAINER_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_JOBMARKET #include "JobMarket/Results/FragmentResult.hpp" #else #include "Jobs/JobMarket/FragmentResult.hpp" #endif #include #include /** Container for the results received from the server. * * These are received bit by bit until all jobs are calculated. * This struct takes of the waiting. * */ template struct ResultContainer { /** Inserts FragmentResult's into IdData. * * \param results raw results to insert, containing ids * \param fragmentData converted results to insert, containing data */ void insertResults( const std::vector &fragmentresults, std::vector &fragmentData); /** Extracts specific Data type from received vector of FragmentResults. * * @param results results to extract specific Data type from * @param fragmentData on return array filled with extracted specific Data type */ void ConvertFragmentResultTo( const std::vector &results, std::vector &fragmentData) const; /** Clears all internally stored results. * */ void clear() { IdData.clear(); } //!> internal container for the received data std::map IdData; }; #include "Fragmentation/Automation/ResultContainer_impl.hpp" #endif /* RESULTCONTAINER_HPP_ */