BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ItemCatalog.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/MakeItem/ItemCatalog.cpp
6 //! @brief Implements class ItemCatalog
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
16 #include "Base/Util/Assert.h"
31 #include "GUI/Model/Job/JobItem.h"
33 
35 {
36  addItem<PropertyItem>();
37 
38  addItem<JobItem>();
39 
40  addItem<IntensityDataItem>();
41  addItem<SpecularDataItem>();
42  addItem<Data1DViewItem>();
43  addItem<DataPropertyContainer>();
44  addItem<Data1DProperties>();
45 
46  addItem<BasicAxisItem>();
47  addItem<PointwiseAxisItem>();
48  addItem<AmplitudeAxisItem>();
49 
50  addItem<MaskContainerItem>();
51  addItem<RectangleItem>();
52  addItem<PolygonPointItem>();
53  addItem<PolygonItem>();
54  addItem<VerticalLineItem>();
55  addItem<HorizontalLineItem>();
56  addItem<EllipseItem>();
57  addItem<MaskAllItem>();
58 
59  addItem<RegionOfInterestItem>();
60 
61  addItem<GroupItem>();
62 
63  addItem<FitParameterContainerItem>();
64  addItem<FitParameterItem>();
65  addItem<FitParameterLinkItem>();
66  addItem<FitSuiteItem>();
67 
68  addItem<RealDataItem>();
69 
70  addItem<MinimizerContainerItem>();
71  addItem<MinuitMinimizerItem>();
72  addItem<GSLMultiMinimizerItem>();
73  addItem<GeneticMinimizerItem>();
74  addItem<SimAnMinimizerItem>();
75  addItem<GSLLMAMinimizerItem>();
76 
77  addItem<ProjectionContainerItem>();
78 }
79 
81 {
82  static ItemCatalog catalog;
83  return catalog;
84 }
85 
86 std::unique_ptr<SessionItem> ItemCatalog::createItemPtr(const QString& modelType) const
87 {
88  ASSERT(m_data.contains(modelType));
89  return m_data.createItemPtr(modelType);
90 }
91 
92 template <typename T>
94 {
95  m_data.registerItem(T::M_TYPE, [] { return new T(); });
96 }
Defines class Data1DViewItem.
Defines class DataProperties and its descendants.
Defines class DataPropertyContainer.
Defines class FitParameterContainerItem.
Defines class FitParameterItem.
Defines class FitParameterLinkItem.
Defines class FitSuiteItem.
Defines class IntensityDataItem.
Defines class ItemCatalog.
Defines class JobItem.
Defines MaskItems classes.
Defines MinimizerItem class.
Defines pointwise axis item.
Defines items related to projections over color map.
Defines class PropertyItem.
Defines class RealDataItem.
Defines class SpecularDataItem.
Catalog of SessionItems. A single instance is created and used in ItemFactory.cpp.
Definition: ItemCatalog.h:26
static ItemCatalog & instance()
Definition: ItemCatalog.cpp:80
void addItem()
Definition: ItemCatalog.cpp:93
std::unique_ptr< SessionItem > createItemPtr(const QString &modelType) const
Definition: ItemCatalog.cpp:86
IFactory< QString, SessionItem > m_data
Definition: ItemCatalog.h:38