21 : Kernel::
DataItem(other), m_title(other.m_title), m_comment(other.m_comment), m_name(),
22 m_history(
std::make_unique<
WorkspaceHistory>(other.getHistory())), m_storageMode(other.m_storageMode) {}
94IPropertyManager::getValue<Mantid::API::Workspace_sptr>(
const std::string &name)
const {
99 std::string message =
"Attempt to assign property " + name +
" to incorrect type. Expected shared_ptr<Workspace>.";
100 throw std::runtime_error(message);
106IPropertyManager::getValue<Mantid::API::Workspace_const_sptr>(
const std::string &name)
const {
107 auto *prop =
dynamic_cast<PropertyWithValue<Mantid::API::Workspace_sptr> *
>(getPointerToProperty(name));
109 return prop->operator()();
111 std::string message =
112 "Attempt to assign property " + name +
" to incorrect type. Expected const shared_ptr<Workspace>.";
113 throw std::runtime_error(message);
This class stores information about the Workspace History used by algorithms on a workspace and the e...
Base Workspace Abstract Class.
const std::string & getName() const override
Get the workspace name.
Workspace(const Parallel::StorageMode storageMode=Parallel::StorageMode::Cloned)
std::string m_comment
A user-provided comment that is attached to the workspace.
void setName(const std::string &)
Set the name field of the workspace.
Parallel::StorageMode storageMode() const
Returns the storage mode (used for MPI runs)
std::string m_title
The title of the workspace.
Parallel::StorageMode m_storageMode
Storage mode of the Workspace (used for MPI runs)
virtual void setTitle(const std::string &)
Set the title of the workspace.
const std::string & getComment() const
Get the workspace comment.
std::unique_ptr< WorkspaceHistory > m_history
The history of the workspace, algorithm and environment.
std::string m_name
The name associated with the object within the ADS (This is required for workspace algebra.
void setStorageMode(Parallel::StorageMode mode)
Sets the storage mode (used for MPI runs)
virtual size_t getMemorySize() const =0
Get the footprint in memory in bytes.
std::string getMemorySizeAsStr() const
Returns the memory footprint in sensible units.
bool isDirty(const int n=1) const
Check whether other algorithms have been applied to the workspace by checking the history length.
virtual const std::string getTitle() const
Get the workspace title.
void setComment(const std::string &)
Set the comment field of the workspace.
This class forms the base class of any item that wishes to be stored in the analysis data service.
The concrete, templated class for properties.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< const Workspace > Workspace_const_sptr
shared pointer to Mantid::API::Workspace (const version)
template DLLExport string memToString< uint64_t >(const uint64_t)