GCC Code Coverage Report


Directory: ./
File: libs/filter/dicom/factory/new.hpp
Date: 2024-04-24 14:25:45
Exec Total Coverage
Lines: 2 2 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /************************************************************************
2 *
3 * Copyright (C) 2009-2024 IRCAD France
4 * Copyright (C) 2012-2017 IHU Strasbourg
5 *
6 * This file is part of Sight.
7 *
8 * Sight is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * Sight is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with Sight. If not, see <https://www.gnu.org/licenses/>.
20 *
21 ***********************************************************************/
22
23 #pragma once
24
25 #include <sight/filter/dicom/config.hpp>
26
27 #include "filter/dicom/registry/detail.hpp"
28
29 #include <string>
30
31 namespace sight::filter::dicom
32 {
33
34 class filter;
35
36 namespace factory
37 {
38
39 SIGHT_FILTER_DICOM_API SPTR(sight::filter::dicom::filter) make(const sight::filter::dicom::registry::key_t& _classname);
40
41 template<class CLASSNAME>
42 36 SPTR(CLASSNAME) make()
43 {
44 SPTR(CLASSNAME) obj = std::make_shared<CLASSNAME>();
45 36 return obj;
46 }
47
48 } // namespace factory
49
50 } // namespace sight::filter::dicom
51