Mantid
Loading...
Searching...
No Matches
IndexProperty.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"
12#include "MantidIndexing/SpectrumIndexSet.h"
14
15namespace Mantid {
16namespace Indexing {
17class IndexInfo;
18}
19namespace API {
20
30class MANTID_API_DLL IndexProperty : public Kernel::ArrayProperty<int64_t> {
31public:
32 IndexProperty(const std::string &name, const IWorkspaceProperty &workspaceProp,
33 const IndexTypeProperty &indexTypeProp,
35
36 IndexProperty(const IndexProperty &) = default;
37 // Copy assignment is deleted since there are reference type members.
39
40 IndexProperty *clone() const override;
41
42 using Kernel::ArrayProperty<int64_t>::operator=;
43 using Kernel::ArrayProperty<int64_t>::operator const std::vector<int64_t> &;
44
45 bool isDefault() const override;
46 std::string isValid() const override;
47 IndexProperty &operator=(const std::string &rhs);
48 operator Indexing::SpectrumIndexSet() const;
49 Indexing::SpectrumIndexSet getIndices() const;
50 Indexing::IndexInfo getFilteredIndexInfo() const;
51
52 static std::string generatePropertyName(const std::string &name = "");
53
54private:
55 const Indexing::IndexInfo &getIndexInfoFromWorkspace() const;
56
59 mutable Indexing::SpectrumIndexSet m_indices;
60 mutable bool m_indicesExtracted;
61 std::string m_validString;
62};
63
64} // namespace API
65} // namespace Mantid
const std::vector< double > & rhs
An interface that is implemented by WorkspaceProperty.
IndexProperty : Implementation of a property type which returns a SpectrumIndexSet provided an input ...
Definition: IndexProperty.h:30
IndexProperty(const IndexProperty &)=default
const IWorkspaceProperty & m_workspaceProp
Definition: IndexProperty.h:57
const IndexTypeProperty & m_indexTypeProp
Definition: IndexProperty.h:58
Indexing::SpectrumIndexSet m_indices
Definition: IndexProperty.h:59
IndexProperty & operator=(const IndexProperty &)=delete
IndexTypeProperty : Implementation of a property which stores the type of input indices users require...
Support for a property that holds an array of values.
Definition: ArrayProperty.h:28
NullValidator is a validator that doesn't.
Definition: NullValidator.h:20
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.
Definition: IValidator.h:26
Helper class which provides the Collimation Length for SANS instruments.