Computer Assited Medical Intervention Tool Kit
version 3.2
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
sdk
libraries
core
component
ComponentExtension.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* $CAMITK_LICENCE_BEGIN$
3
*
4
* CamiTK - Computer Assisted Medical Intervention ToolKit
5
* (c) 2001-2013 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6
*
7
* Visit http://camitk.imag.fr for more information
8
*
9
* This file is part of CamiTK.
10
*
11
* CamiTK is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU Lesser General Public License version 3
13
* only, as published by the Free Software Foundation.
14
*
15
* CamiTK is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Lesser General Public License version 3 for more details.
19
*
20
* You should have received a copy of the GNU Lesser General Public License
21
* version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22
*
23
* $CAMITK_LICENCE_END$
24
****************************************************************************/
25
26
27
#ifndef COMPONENT_EXTENSION_H
28
#define COMPONENT_EXTENSION_H
29
30
// -- CamiTK Core stuff
31
#include "
CamiTKAPI.h
"
32
#include "
AbortException.h
"
33
#include "
Component.h
"
34
35
// -- QT stuff
36
#include <QtPlugin>
37
#include <QPluginLoader>
38
#include <QStringList>
39
#include <QMap>
40
41
namespace
camitk {
59
class
CAMITK_API
ComponentExtension
:
public
QObject {
60
61
protected
:
62
64
ComponentExtension
();
65
66
public
:
67
69
virtual
~
ComponentExtension
();
70
74
virtual
QString getName()
const
= 0;
75
77
virtual
QString getDescription()
const
= 0;
78
80
virtual
QStringList getFileExtensions()
const
= 0;
81
89
virtual
Component
* open(
const
QString &)
throw
(
AbortException
) = 0;
90
109
virtual
bool
save(
Component
* component)
const
;
110
112
virtual
bool
hasDataDirectory
()
const
{
113
return
false
;
114
}
115
117
QString
getLocation
()
const
{
118
return
dynamicLibraryFileName;
119
}
120
122
void
setLocation
(
const
QString loc) {
123
dynamicLibraryFileName = loc;
124
}
125
127
128
129
private
:
131
QString
dynamicLibraryFileName
;
132
134
bool
autoload
;
135
};
136
137
138
139
}
140
// -------------------- declare the interface for QPluginLoader --------------------
141
Q_DECLARE_INTERFACE(
camitk::ComponentExtension
,
"TIMC-IMAG.ComponentExtension/2.1"
)
//TODO use variable from CMake?
142
143
144
#endif //COMPONENT_EXTENSION_H
Generated on Sun Aug 11 2013 01:23:00 for Computer Assited Medical Intervention Tool Kit by
1.8.4