BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
sessionitemcontainer.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/sessionitemcontainer.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_SESSIONITEMCONTAINER_H
16
#define BORNAGAIN_MVVM_MODEL_MVVM_MODEL_SESSIONITEMCONTAINER_H
17
18
#include "
mvvm/model/taginfo.h
"
19
#include "mvvm/model_export.h"
20
#include <vector>
21
22
namespace
ModelView
{
23
24
class
SessionItem
;
25
26
//! Holds collection of SessionItem objects related to the same tag.
27
28
class
MVVM_MODEL_EXPORT
SessionItemContainer
{
29
public
:
30
using
container_t
= std::vector<SessionItem*>;
31
using
const_iterator
= container_t::const_iterator;
32
33
SessionItemContainer
(
TagInfo
tag_info);
34
SessionItemContainer
(
const
SessionItemContainer
&) =
delete
;
35
SessionItemContainer
&
operator=
(
const
SessionItemContainer
&) =
delete
;
36
~
SessionItemContainer
();
37
38
bool
empty()
const
;
39
40
int
itemCount()
const
;
41
42
std::vector<SessionItem*> items()
const
;
43
44
bool
insertItem(
SessionItem
* item,
int
index);
45
46
SessionItem
* takeItem(
int
index);
47
48
bool
canTakeItem(
int
index)
const
;
49
50
bool
canInsertItem(
const
SessionItem
* item,
int
index)
const
;
51
52
int
indexOfItem(
const
SessionItem
* item)
const
;
53
54
SessionItem
* itemAt(
int
index)
const
;
55
56
std::string
name
()
const
;
57
58
TagInfo
tagInfo()
const
;
59
60
const_iterator
begin()
const
;
61
62
const_iterator
end()
const
;
63
64
private
:
65
bool
maximum_reached()
const
;
66
bool
minimum_reached()
const
;
67
bool
is_valid_item(
const
SessionItem
* item)
const
;
68
TagInfo
m_tag_info
;
69
container_t
m_items
;
70
};
71
72
}
// namespace ModelView
73
74
#endif
// BORNAGAIN_MVVM_MODEL_MVVM_MODEL_SESSIONITEMCONTAINER_H
ModelView::SessionItemContainer
Holds collection of SessionItem objects related to the same tag.
Definition:
sessionitemcontainer.h:28
ModelView::SessionItemContainer::operator=
SessionItemContainer & operator=(const SessionItemContainer &)=delete
ModelView::SessionItemContainer::m_tag_info
TagInfo m_tag_info
Definition:
sessionitemcontainer.h:68
ModelView::SessionItemContainer::const_iterator
container_t::const_iterator const_iterator
Definition:
sessionitemcontainer.h:31
ModelView::SessionItemContainer::SessionItemContainer
SessionItemContainer(const SessionItemContainer &)=delete
ModelView::SessionItemContainer::container_t
std::vector< SessionItem * > container_t
Definition:
sessionitemcontainer.h:30
ModelView::SessionItemContainer::m_items
container_t m_items
Definition:
sessionitemcontainer.h:69
ModelView::SessionItem
The main object representing an editable/displayable/serializable entity.
Definition:
sessionitem.h:38
ModelView::TagInfo
Holds info about single tag for SessionItem.
Definition:
taginfo.h:28
SessionItem
Definition:
SessionItem.h:33
ModelView
materialitems.h Collection of materials to populate MaterialModel.
Definition:
importtablewidget.h:26
RealSpace::Particles::name
QString const & name(EShape k)
Definition:
particles.cpp:21
taginfo.h
Defines class CLASS?
mvvm
model
mvvm
model
sessionitemcontainer.h
Generated by
1.9.1