Mantid
Loading...
Searching...
No Matches
qt
widgets
common
src
Batch
Row.cpp
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 +
7
#include "
MantidQtWidgets/Common/Batch/Row.h
"
8
#include "
MantidQtWidgets/Common/Batch/AssertOrThrow.h
"
9
#include <boost/algorithm/string/predicate.hpp>
10
namespace
MantidQt::MantidWidgets::Batch
{
11
12
Row::Row
(
RowLocation
location, std::vector<Cell> cells) : m_location(
std
::move(location)), m_cells(
std
::move(cells)) {}
13
14
RowLocation
const
&
Row::location
()
const
{
return
m_location
; }
15
16
std::vector<Cell>
const
&
Row::cells
()
const
{
return
m_cells
; }
17
std::vector<Cell> &
Row::cells
() {
return
m_cells
; }
18
19
std::ostream &
operator<<
(std::ostream &os,
Row
const
&row) {
20
os << row.
location
() <<
" "
;
21
for
(
auto
&&cell : row.
cells
())
22
os << cell;
23
return
os;
24
}
25
26
bool
operator==
(
Row
const
&lhs,
Row
const
&
rhs
) {
27
return
lhs.
location
() ==
rhs
.location() && lhs.
cells
() ==
rhs
.cells();
28
}
29
30
bool
operator!=
(
Row
const
&lhs,
Row
const
&
rhs
) {
return
!(lhs ==
rhs
); }
31
32
bool
operator<
(
Row
const
&lhs,
Row
const
&
rhs
) {
return
lhs.
location
() <
rhs
.location(); }
33
34
bool
operator<=
(
Row
const
&lhs,
Row
const
&
rhs
) {
return
lhs <
rhs
|| lhs ==
rhs
; }
35
36
bool
operator>=
(
Row
const
&lhs,
Row
const
&
rhs
) {
return
!(lhs <
rhs
); }
37
38
bool
operator>
(
Row
const
&lhs,
Row
const
&
rhs
) {
return
!(lhs <=
rhs
); }
39
}
// namespace MantidQt::MantidWidgets::Batch
AssertOrThrow.h
rhs
const std::vector< double > & rhs
Definition:
ComptonScatteringCountRate.cpp:98
Row.h
MantidQt::MantidWidgets::Batch::RowLocation
Definition:
RowLocation.h:22
MantidQt::MantidWidgets::Batch::Row
Definition:
Row.h:23
MantidQt::MantidWidgets::Batch::Row::m_cells
std::vector< Cell > m_cells
Definition:
Row.h:34
MantidQt::MantidWidgets::Batch::Row::Row
Row(RowLocation location, std::vector< Cell > cells)
Definition:
Row.cpp:12
MantidQt::MantidWidgets::Batch::Row::m_location
RowLocation m_location
Definition:
Row.h:33
MantidQt::MantidWidgets::Batch::Row::location
RowLocation const & location() const
Definition:
Row.cpp:14
MantidQt::MantidWidgets::Batch::Row::cells
std::vector< Cell > const & cells() const
Definition:
Row.cpp:16
MantidQt::MantidWidgets::Batch
Definition:
BuildSubtreeItems.h:21
MantidQt::MantidWidgets::Batch::operator<=
EXPORT_OPT_MANTIDQT_COMMON bool operator<=(Row const &lhs, Row const &rhs)
Definition:
Row.cpp:34
MantidQt::MantidWidgets::Batch::operator>
EXPORT_OPT_MANTIDQT_COMMON bool operator>(Row const &lhs, Row const &rhs)
Definition:
Row.cpp:38
MantidQt::MantidWidgets::Batch::operator<<
EXPORT_OPT_MANTIDQT_COMMON std::ostream & operator<<(std::ostream &os, Cell const &cell)
Definition:
Cell.cpp:83
MantidQt::MantidWidgets::Batch::operator<
EXPORT_OPT_MANTIDQT_COMMON bool operator<(Row const &lhs, Row const &rhs)
Definition:
Row.cpp:32
MantidQt::MantidWidgets::Batch::operator==
EXPORT_OPT_MANTIDQT_COMMON bool operator==(Cell const &lhs, Cell const &rhs)
Definition:
Cell.cpp:88
MantidQt::MantidWidgets::Batch::operator>=
EXPORT_OPT_MANTIDQT_COMMON bool operator>=(Row const &lhs, Row const &rhs)
Definition:
Row.cpp:36
MantidQt::MantidWidgets::Batch::operator!=
EXPORT_OPT_MANTIDQT_COMMON bool operator!=(Cell const &lhs, Cell const &rhs)
Definition:
Cell.cpp:93
std
STL namespace.
Generated on Tue Jan 3 2023 11:58:01 for Mantid by
1.9.5