BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ItemCatalog Class Reference

Description

Catalog of SessionItems. A single instance is created and used in ItemFactory.cpp.

Definition at line 26 of file ItemCatalog.h.

Public Member Functions

 ItemCatalog ()
 
std::unique_ptr< SessionItemcreateItemPtr (const QString &modelType) const
 

Static Public Member Functions

static ItemCataloginstance ()
 

Private Member Functions

template<typename T >
void addItem ()
 

Private Attributes

IFactory< QString, SessionItemm_data
 

Constructor & Destructor Documentation

◆ ItemCatalog()

ItemCatalog::ItemCatalog ( )

Definition at line 34 of file ItemCatalog.cpp.

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 }

Member Function Documentation

◆ addItem()

template<typename T >
void ItemCatalog::addItem
private

Definition at line 93 of file ItemCatalog.cpp.

94 {
95  m_data.registerItem(T::M_TYPE, [] { return new T(); });
96 }
IFactory< QString, SessionItem > m_data
Definition: ItemCatalog.h:38

References m_data.

◆ createItemPtr()

std::unique_ptr< SessionItem > ItemCatalog::createItemPtr ( const QString &  modelType) const

Definition at line 86 of file ItemCatalog.cpp.

87 {
88  ASSERT(m_data.contains(modelType));
89  return m_data.createItemPtr(modelType);
90 }

References m_data.

Referenced by GUI::Model::ItemFactory::CreateItem().

◆ instance()

ItemCatalog & ItemCatalog::instance ( )
static

Definition at line 80 of file ItemCatalog.cpp.

81 {
82  static ItemCatalog catalog;
83  return catalog;
84 }
Catalog of SessionItems. A single instance is created and used in ItemFactory.cpp.
Definition: ItemCatalog.h:26

Referenced by GUI::Model::ItemFactory::CreateItem().

Member Data Documentation

◆ m_data

IFactory<QString, SessionItem> ItemCatalog::m_data
private

Definition at line 38 of file ItemCatalog.h.

Referenced by addItem(), and createItemPtr().


The documentation for this class was generated from the following files: