BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
tagrow.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/model/mvvm/model/tagrow.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_MODEL_TAGROW_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_MODEL_TAGROW_H
17 
18 #include "mvvm/model_export.h"
19 #include <string>
20 
21 namespace ModelView {
22 
23 //! Aggregate to hold (tag, row) information for SessionModel.
24 
25 class MVVM_MODEL_EXPORT TagRow {
26 public:
27  std::string tag = {};
28  int row = -1;
29 
30  TagRow() {}
31 
32  TagRow(const std::string& name, int row = -1) : tag(name), row(row) {}
33  TagRow(const char* name, int row = -1) : tag(name), row(row) {}
34 
35  TagRow next() const;
36 
37  TagRow prev() const;
38 
39  static TagRow append(const std::string& tag_name = {});
40 
41  static TagRow prepend(const std::string& tag_name = {});
42 
43  bool operator==(const TagRow& other) const;
44  bool operator!=(const TagRow& other) const;
45 };
46 
47 } // namespace ModelView
48 
49 #endif // BORNAGAIN_MVVM_MODEL_MVVM_MODEL_TAGROW_H
bool operator!=(const Material &left, const Material &right)
Comparison operator for material wrapper (inequality check)
Definition: Material.cpp:126
bool operator==(const Material &left, const Material &right)
Comparison operator for material wrapper (equality check)
Definition: Material.cpp:113
Aggregate to hold (tag, row) information for SessionModel.
Definition: tagrow.h:25
TagRow(const std::string &name, int row=-1)
Definition: tagrow.h:32
TagRow(const char *name, int row=-1)
Definition: tagrow.h:33
materialitems.h Collection of materials to populate MaterialModel.
QString const & name(EShape k)
Definition: particles.cpp:21