Mantid
Loading...
Searching...
No Matches
IndexTypeProperty.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2017 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 +
7#pragma once
8
9#include "MantidAPI/DllConfig.h"
11
12namespace Mantid {
13namespace API {
14
15enum class IndexType { SpectrumNum = 1, WorkspaceIndex = 2 };
16
24class MANTID_API_DLL IndexTypeProperty : public Kernel::PropertyWithValue<std::string> {
25public:
26 IndexTypeProperty(const std::string &name = "IndexType", int indexType = static_cast<int>(IndexType::WorkspaceIndex));
27
28 IndexType selectedType() const;
29
30 int allowedTypes() const;
31
32 std::vector<std::string> allowedValues() const override;
33
34 bool isMultipleSelectionAllowed() override;
35
36 using PropertyWithValue<std::string>::operator=;
37
38 IndexTypeProperty &operator=(API::IndexType type);
39
40 static std::string generatePropertyName(const std::string &name = "");
41
42private:
43 std::vector<std::string> m_allowedValues;
44};
45
46} // namespace API
47} // namespace Mantid
IndexTypeProperty : Implementation of a property which stores the type of input indices users require...
std::vector< std::string > m_allowedValues
The concrete, templated class for properties.
Helper class which provides the Collimation Length for SANS instruments.