Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef MANTID_KERNEL_ALGORITHMFACTORY_H_
#define MANTID_KERNEL_ALGORITHMFACTORY_H_
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "DynamicFactory.h"
#include "Logger.h"
namespace Mantid
{
namespace Kernel
{
//----------------------------------------------------------------------
// Forward declaration
//----------------------------------------------------------------------
class IAlgorithm;
/** @class AlgorithmFactory AlgorithmFactory.h Kernel/AlgorithmFactory.h
The AlgorithmFactory class is in charge of the creation of concrete
instances of Algorithms. It inherits most of its implementation from
the Dynamic Factory base class.
It is implemented as a singleton class.
@author Russell Taylor, Tessella Support Services plc
@date 21/09/2007
Copyright © 2007 ???RAL???
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
*/
class DLLExport AlgorithmFactory : public DynamicFactory<IAlgorithm>
{
public:
/** A static method which retrieves the single instance of the Algorithm Factory
*
* @returns A pointer to the factory instance
*/
static AlgorithmFactory* Instance();
protected:
/// Protected Constructor for singleton class
AlgorithmFactory();
/** Protected destructor
* Prevents client from calling 'delete' on the pointer handed
* out by Instance
*/
virtual ~AlgorithmFactory();
private:
/// Private copy constructor - NO COPY ALLOWED
AlgorithmFactory(const AlgorithmFactory&);
/// Private assignment operator - NO ASSIGNMENT ALLOWED
AlgorithmFactory& operator = (const AlgorithmFactory&);
///static reference to the logger class
static Logger& g_log;
/// Pointer to the factory instance
static AlgorithmFactory* m_instance;
};
} // namespace Kernel
} // namespace Mantid
#endif /*MANTID_KERNEL_ALGORITHMFACTORY_H_*/