/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus * * MAUS 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 3 of the License, or * (at your option) any later version. * * MAUS 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 MAUS. If not, see . * */ /*! * \file ConverterFactory.hh * * \author Alexander Richards, Imperial College London * \date 06/06/2012 * * This class is responsible for managing the converters and retrieving * the correct converter for the INPUT/OUTPUT types in question. It can * be used to generically convert from one type to another without * knowledge of the correct conversion object required for the specific * data types. * */ #ifndef _SRC_COMMON_CPP_CONVERTER_CONVERTERFACTORY_ #define _SRC_COMMON_CPP_CONVERTER_CONVERTERFACTORY_ #include #include "src/common_cpp/Converter/IConverter.hh" #include "src/common_cpp/Converter/ConverterExceptions.hh" #include "src/common_cpp/API/APIExceptions.hh" namespace MAUS { /*! * \class ConverterFactory * * \brief Factory class for converter objects * * \author Alexander Richards, Imperial College London * \date 06/06/2012 * * This class is responsible for managing the converters and retrieving * the correct converter for the INPUT/OUTPUT types in question. It can * be used to generically convert from one type to another without * knowledge of the correct conversion object required for the specific * data types. */ class ConverterFactory { public: template IConverter* getConverter() const throw(ConverterNotFoundException); template OUTPUT* convert(INPUT* i) const throw(NullInputException, UnhandledException); }; } // end of namespace #include "src/common_cpp/Converter/ConverterFactory-inl.hh" #endif