BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
QSAR
modelFactory.h
Go to the documentation of this file.
1
/* modelFactory.h
2
*
3
* Copyright (C) 2009 Marcel Schumann
4
*
5
* This file is part of QuEasy -- A Toolbox for Automated QSAR Model
6
* Construction and Validation.
7
* QuEasy is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3 of the License, or (at
10
* your option) any later version.
11
*
12
* QuEasy is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
// -*- Mode: C++; tab-width: 2; -*-
22
// vi: set ts=2:
23
//
24
// $Id: factory.h,v 1.10 2003/08/26 08:04:07 oliver Exp $
25
//
26
27
#ifndef MODEL_FACTORY_H
28
#define MODEL_FACTORY_H
29
30
#ifndef BALL_CONCEPT_FACTORY_H
31
#include <
BALL/CONCEPT/factory.h
>
32
#endif
33
34
#ifndef MODEL
35
#include <
BALL/QSAR/Model.h
>
36
#endif
37
38
#ifndef QSARH
39
#include <
BALL/QSAR/QSARData.h
>
40
#endif
41
42
namespace
BALL
43
{
44
namespace
QSAR
45
{
46
//typedef Model* (*CreateMethod) (const QSARData& q);
47
50
template
<
typename
T>
51
class
ModelFactory
52
{
53
public
:
54
55
static
T*
create
(
const
QSARData
& q)
56
{
57
return
new
T(q);
58
}
59
60
static
T*
createKernel1
(
const
QSARData
& q,
int
k
,
double
p1,
double
p2)
61
{
62
return
new
T(q,k,p1,p2);
63
}
64
65
static
T*
createKernel2
(
const
QSARData
& q,
String
s1,
String
s2)
66
{
67
return
new
T(q,s1,s2);
68
}
69
};
70
}
71
}
72
73
#endif // QSAR_FACTORY_H
Generated by
1.8.3.1