/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DataFormats/Common/interface/FunctorHandleExceptionFactory.h
50 строк
1 KB
W. David Dagenhart
From scram b code-format-all (clang-format)
10 май 2019, 17:51
10 май 2019, 17:51
82e0ab0
Код
Авторство
О чём код?
#ifndef Subsystem_Package_FunctorHandleExceptionFactory_h #define Subsystem_Package_FunctorHandleExceptionFactory_h // -*- C++ -*- // // Package: Subsystem/Package // Class : FunctorHandleExceptionFactory // /**\class FunctorHandleExceptionFactory FunctorHandleExceptionFactory.h "FunctorHandleExceptionFactory.h" Description: [one line class summary] Usage: <usage> */ // // Original Author: Chris Jones // Created: Wed, 04 Dec 2013 18:41:59 GMT // // system include files #include "DataFormats/Common/interface/HandleExceptionFactory.h" // user include files // forward declarations namespace edm { template <typename T> class FunctorHandleExceptionFactory : public HandleExceptionFactory { public: FunctorHandleExceptionFactory(T&& iFunctor) : m_functor(std::move(iFunctor)) {} //FunctorHandleExceptionFactory(T iFunctor) : m_functor(iFunctor) {} // ---------- const member functions --------------------- std::shared_ptr<cms::Exception> make() const override { return m_functor(); } private: T m_functor; }; template <typename T> std::shared_ptr<HandleExceptionFactory> makeHandleExceptionFactory(T&& iFunctor) { return std::make_shared<FunctorHandleExceptionFactory<T>>(std::move(iFunctor)); } } // namespace edm #endif