Medical Imaging Interaction Toolkit
2024.12.00
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Groups
Namespace List
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
Variables
e
f
i
l
m
n
p
r
s
t
Typedefs
a
b
c
d
f
g
i
l
m
n
o
p
q
r
s
t
v
x
Enumerations
Enumerator
a
b
c
d
e
g
h
i
k
l
n
o
p
r
s
t
v
w
z
Class List
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
c
m
o
r
s
t
Related Functions
File List
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
m
o
p
q
r
s
t
u
v
Functions
_
e
h
m
o
q
s
u
Variables
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
d
e
g
i
m
o
p
q
r
s
u
v
Examples
Download
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
berryIAdaptable.h
Go to the documentation of this file.
1
/*============================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
13
#ifndef _BERRY_IADAPTABLE_H_
14
#define _BERRY_IADAPTABLE_H_
15
16
#include <
org_blueberry_core_runtime_Export.h
>
17
18
#include <
berryObject.h
>
19
20
#include <
berryLog.h
>
21
22
#include <typeinfo>
23
24
namespace
berry
{
25
50
struct
org_blueberry_core_runtime_EXPORT
IAdaptable
51
{
52
53
public
:
54
65
virtual
Object
* GetAdapter(
const
QString& adapterType)
const
= 0;
66
67
template
<
class
A>
68
A*
GetAdapter
()
69
{
70
const
char
* typeName = qobject_interface_iid<A*>();
71
if
(typeName ==
nullptr
)
72
{
73
BERRY_WARN
<<
"Error getting adapter for '"
<<
Reflection::DemangleName
(
typeid
(*this).name()) <<
"': "
74
<<
"Cannot get the interface id for type '"
<< Reflection::GetClassName<A>()
75
<<
"'. It is probably missing a Q_DECLARE_INTERFACE macro in its header."
;
76
return
nullptr
;
77
}
78
return
dynamic_cast<
A*
>
(this->GetAdapter(typeName));
79
}
80
81
virtual
~
IAdaptable
();
82
83
};
84
85
}
// namespace berry
86
87
#endif
/*_BERRY_IADAPTABLE_H_*/
org_blueberry_core_runtime_Export.h
berry::Reflection::DemangleName
org_blueberry_core_runtime_EXPORT QString DemangleName(const char *typeName)
berryLog.h
berry::Object
Light weight base class for most BlueBerry classes.
Definition:
berryObject.h:72
BERRY_WARN
#define BERRY_WARN
Definition:
berryLog.h:21
org_blueberry_core_runtime_EXPORT
#define org_blueberry_core_runtime_EXPORT
Definition:
org_blueberry_core_runtime_Export.h:26
berry::IAdaptable
Definition:
berryIAdaptable.h:50
berry::IAdaptable::GetAdapter
A * GetAdapter()
Definition:
berryIAdaptable.h:68
berryObject.h
berry
Definition:
QmitkPropertyItemModel.h:24
src
MITK
Plugins
org.blueberry.core.runtime
src
berryIAdaptable.h
Generated on Tue Dec 10 2024 10:35:03 for Medical Imaging Interaction Toolkit by
1.8.17