Mantid
Loading...
Searching...
No Matches
RowLocation.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
11#pragma once
13#include <boost/optional.hpp>
14#include <ostream>
15#include <vector>
16namespace MantidQt {
17namespace MantidWidgets {
18namespace Batch {
19
20using RowPath = std::vector<int>;
21
23public:
24 RowLocation() = default;
25 RowLocation(RowPath path);
26 RowPath const &path() const;
27 int rowRelativeToParent() const;
28 bool isRoot() const;
29 int depth() const;
30 bool isChildOf(RowLocation const &other) const;
31 bool isSiblingOf(RowLocation const &other) const;
32 bool isChildOrSiblingOf(RowLocation const &other) const;
33 bool isDescendantOf(RowLocation const &other) const;
34 RowLocation parent() const;
35 RowLocation relativeTo(RowLocation const &ancestor) const;
36 RowLocation child(int n) const;
37 bool operator==(RowLocation const &other) const;
38 bool operator!=(RowLocation const &other) const;
39 bool operator<(RowLocation const &other) const;
40 bool operator<=(RowLocation const &other) const;
41 bool operator>(RowLocation const &other) const;
42 bool operator>=(RowLocation const &other) const;
43
44private:
46};
47
48EXPORT_OPT_MANTIDQT_COMMON std::ostream &operator<<(std::ostream &os, RowLocation const &location);
49EXPORT_OPT_MANTIDQT_COMMON bool pathsSameUntilDepth(int depth, RowLocation const &locationA,
50 RowLocation const &locationB);
51
52} // namespace Batch
53} // namespace MantidWidgets
54} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
std::vector< int > RowPath
Definition: RowLocation.h:20
EXPORT_OPT_MANTIDQT_COMMON std::ostream & operator<<(std::ostream &os, Cell const &cell)
Definition: Cell.cpp:83
EXPORT_OPT_MANTIDQT_COMMON bool pathsSameUntilDepth(int depth, RowLocation const &locationA, RowLocation const &locationB)
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...