BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Manages item creation/registration for SessionModel. More...
Public Member Functions | |
ItemManager () | |
~ItemManager () | |
std::unique_ptr< SessionItem > | createItem (const model_type &modelType={}) const |
std::unique_ptr< SessionItem > | createRootItem () const |
ItemFactoryInterface * | factory () |
const ItemFactoryInterface * | factory () const |
identifier_type | findIdentifier (const SessionItem *item) const |
SessionItem * | findItem (const identifier_type &id) const |
ItemPool * | itemPool () |
const ItemPool * | itemPool () const |
void | registerInPool (SessionItem *item) |
void | setItemFactory (std::unique_ptr< ItemFactoryInterface > factory) |
void | setItemPool (std::shared_ptr< ItemPool > pool) |
void | unregisterFromPool (SessionItem *item) |
Private Attributes | |
std::unique_ptr< ItemFactoryInterface > | m_item_factory |
std::shared_ptr< ItemPool > | m_item_pool |
Manages item creation/registration for SessionModel.
Definition at line 30 of file itemmanager.h.
ItemManager::ItemManager | ( | ) |
Definition at line 30 of file itemmanager.cpp.
|
default |
std::unique_ptr< SessionItem > ItemManager::createItem | ( | const model_type & | modelType = {} | ) | const |
Definition at line 44 of file itemmanager.cpp.
References m_item_factory.
std::unique_ptr< SessionItem > ItemManager::createRootItem | ( | ) | const |
Definition at line 49 of file itemmanager.cpp.
ItemFactoryInterface * ItemManager::factory | ( | ) |
Definition at line 91 of file itemmanager.cpp.
References factory().
const ItemFactoryInterface * ItemManager::factory | ( | ) | const |
Definition at line 86 of file itemmanager.cpp.
References m_item_factory.
Referenced by factory(), and setItemFactory().
identifier_type ItemManager::findIdentifier | ( | const SessionItem * | item | ) | const |
Definition at line 59 of file itemmanager.cpp.
References m_item_pool.
SessionItem * ItemManager::findItem | ( | const identifier_type & | id | ) | const |
Definition at line 54 of file itemmanager.cpp.
References m_item_pool.
ItemPool * ItemManager::itemPool | ( | ) |
Definition at line 69 of file itemmanager.cpp.
References m_item_pool.
const ItemPool * ItemManager::itemPool | ( | ) | const |
void ItemManager::registerInPool | ( | SessionItem * | item | ) |
Definition at line 74 of file itemmanager.cpp.
References ModelView::SessionItem::identifier(), and m_item_pool.
void ItemManager::setItemFactory | ( | std::unique_ptr< ItemFactoryInterface > | factory | ) |
Definition at line 32 of file itemmanager.cpp.
References factory(), and m_item_factory.
void ItemManager::setItemPool | ( | std::shared_ptr< ItemPool > | pool | ) |
void ItemManager::unregisterFromPool | ( | SessionItem * | item | ) |
Definition at line 80 of file itemmanager.cpp.
References m_item_pool.
|
private |
Definition at line 58 of file itemmanager.h.
Referenced by createItem(), factory(), and setItemFactory().
|
private |
Definition at line 57 of file itemmanager.h.
Referenced by findIdentifier(), findItem(), itemPool(), registerInPool(), setItemPool(), and unregisterFromPool().