Mantid
Loading...
Searching...
No Matches
WorkspacePropertyUtils.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2023 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
13#include "MantidAPI/Workspace.h"
16
17namespace {
18
19template <typename T>
20void setPropertyModeForWorkspaceProperties(Mantid::Kernel::Property *prop,
21 const Mantid::API::PropertyMode::Type &optional) {
22 if (auto workspaceProperty = dynamic_cast<Mantid::API::WorkspaceProperty<T> *>(prop)) {
23 workspaceProperty->setPropertyMode(optional);
24 }
25}
26
27template <typename T, typename... Ts, typename = std::enable_if_t<sizeof...(Ts) != 0>>
28void setPropertyModeForWorkspaceProperties(Mantid::Kernel::Property *prop,
29 const Mantid::API::PropertyMode::Type &optional) {
30 setPropertyModeForWorkspaceProperties<T>(prop, optional);
31 setPropertyModeForWorkspaceProperties<Ts...>(prop, optional);
32}
33
34} // namespace
35
36namespace Mantid {
37namespace API {
38
45
46} // namespace API
47} // namespace Mantid
HistoWorkspace is an abstract base class for MatrixWorkspace types that are NOT event workspaces.
This class provides an interface to an EventWorkspace.
Abstract interface to MDHistoWorkspace, for use in exposing to Python.
Interface to the class Mantid::DataObjects::PeaksWorkspace.
ITableWorkspace is an implementation of Workspace in which the data are organised in columns of same ...
Base MatrixWorkspace Abstract Class.
Class to hold a set of workspaces.
A property class for workspaces.
Base Workspace Abstract Class.
Definition Workspace.h:29
Base class for properties.
Definition Property.h:94
MANTID_API_DLL void setPropertyModeForWorkspaceProperty(Mantid::Kernel::Property *prop, const PropertyMode::Type &optional)
Helper class which provides the Collimation Length for SANS instruments.