Newer
Older
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
Peterson, Peter
committed
#ifndef MANTID_API_COLUMNFACTORY_H_
#define MANTID_API_COLUMNFACTORY_H_
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
Gigg, Martyn Anthony
committed
#include "MantidAPI/DllConfig.h"
Peterson, Peter
committed
#include "MantidKernel/DynamicFactory.h"
#include "MantidKernel/SingletonHolder.h"
Peterson, Peter
committed
Peterson, Peter
committed
namespace API {
//----------------------------------------------------------------------
// Forward declarations
//----------------------------------------------------------------------
class Column;
Peterson, Peter
committed
/** @class ColumnFactoryImpl
The ColumnFactory class is in charge of the creation of concrete
instances of columns. It inherits most of its implementation from
the Dynamic Factory base class.
It is implemented as a singleton class.
Peterson, Peter
committed
@author Roman Tolchenov, Tessella Support Services plc
@date 31/10/2008
*/
class MANTID_API_DLL ColumnFactoryImpl : public Kernel::DynamicFactory<Column> {
public:
ColumnFactoryImpl(const ColumnFactoryImpl &) = delete;
ColumnFactoryImpl &operator=(const ColumnFactoryImpl &) = delete;
/// Creates an instance of a column
boost::shared_ptr<Column> create(const std::string &type) const override;
private:
friend struct Mantid::Kernel::CreateUsingNew<ColumnFactoryImpl>;
/// Private Constructor for singleton class
Hahn, Steven
committed
~ColumnFactoryImpl() override = default;
using ColumnFactory = Mantid::Kernel::SingletonHolder<ColumnFactoryImpl>;
Peterson, Peter
committed
} // namespace API
} // namespace Mantid
namespace Mantid {
namespace Kernel {
EXTERN_MANTID_API template class MANTID_API_DLL
Mantid::Kernel::SingletonHolder<Mantid::API::ColumnFactoryImpl>;
Peterson, Peter
committed
#endif /*MANTID_API_COLUMNFACTORY_H_*/