14#define DECLARE_WORKSPACE(classname) \
16 Mantid::Kernel::RegistrationHelper \
17 register_ws_##classname(((Mantid::API::WorkspaceFactory::Instance().subscribe<classname>(#classname)), 0)); \
20#include "MantidAPI/DllConfig.h"
49 size_t XLength =
size_t(-1),
size_t YLength =
size_t(-1))
const;
51 const size_t &YLength)
const;
56 std::shared_ptr<ITableWorkspace> createTable(
const std::string &className =
"TableWorkspace")
const;
59 std::shared_ptr<IPeaksWorkspace> createPeaks(
const std::string &className =
"PeaksWorkspace")
const;
74template <
class T,
class... InitArgs> std::shared_ptr<T>
createWorkspace(InitArgs... args) {
75 auto ws = std::make_shared<T>();
76 ws->initialize(args...);
Base MatrixWorkspace Abstract Class.
The WorkspaceFactory class is in charge of the creation of all types of workspaces.
WorkspaceFactoryImpl(const WorkspaceFactoryImpl &)=delete
WorkspaceFactoryImpl & operator=(const WorkspaceFactoryImpl &)=delete
~WorkspaceFactoryImpl() override=default
Private Destructor.
Base Workspace Abstract Class.
The dynamic factory is a base dynamic factory for serving up objects in response to requests from oth...
Manage the lifetime of a class intended to be a singleton.
std::shared_ptr< T > createWorkspace(InitArgs... args)
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::unique_ptr< T > create(const P &parent, const IndexArg &indexArg, const HistArg &histArg)
This is the create() method that all the other create() methods call.
Helper class which provides the Collimation Length for SANS instruments.
Policy class controlling creation of the singleton Implementation classes should mark their default c...