Line |
Branch |
Exec |
Source |
1 |
|
|
/************************************************************************ |
2 |
|
|
* |
3 |
|
|
* Copyright (C) 2021-2024 IRCAD France |
4 |
|
|
* Copyright (C) 2021 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/viz/qt3d/config.hpp> |
26 |
|
|
|
27 |
|
|
#include "viz/qt3d/registry/detail.hpp" |
28 |
|
|
|
29 |
|
|
#include <string> |
30 |
|
|
|
31 |
|
|
namespace sight::viz::qt3d |
32 |
|
|
{ |
33 |
|
|
|
34 |
|
|
class window_interactor; |
35 |
|
|
|
36 |
|
|
namespace factory |
37 |
|
|
{ |
38 |
|
|
|
39 |
|
|
template<class CLASSNAME> |
40 |
|
|
SPTR(CLASSNAME) make(); |
41 |
|
|
|
42 |
|
|
SIGHT_VIZ_QT3D_API SPTR(viz::qt3d::window_interactor) make( |
43 |
|
|
const viz::qt3d::registry::key_t& _classname |
44 |
|
|
); |
45 |
|
|
|
46 |
|
|
template<class CLASSNAME> |
47 |
|
✗ |
SPTR(CLASSNAME) make() |
48 |
|
|
{ |
49 |
|
|
SPTR(CLASSNAME) obj = std::make_shared<CLASSNAME>(); |
50 |
|
✗ |
return obj; |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
} // namespace factory |
54 |
|
|
|
55 |
|
|
} // namespace sight::viz::qt3d |
56 |
|
|
|