BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Collection of all available data loaders for 1D files.
Definition at line 27 of file DataLoaders1D.h.
Public Member Functions | |
~DataLoaders1D () | |
void | addBuiltInLoader (const QString &persistentClassName, const std::function< AbstractDataLoader1D *()> &create) |
Register a built-in loader with the given class name and factory function. More... | |
void | addUserDefinedLoader (AbstractDataLoader1D *loader) |
add a user defined loader More... | |
AbstractDataLoader1D * | createFromPersistentName (const QString &persistentClassName) |
Notify loader was recently used. More... | |
QVector< AbstractDataLoader1D * > | loaders () const |
all defined loaders. A null element in the list defines a separator The returned pointers are the same over the lifetime of the DataLoaders instance, therefore they can be used for comparison. More... | |
QVector< AbstractDataLoader1D * > | recentlyUsedLoaders () const |
The last 10 recently used loaders. More... | |
Static Public Member Functions | |
static DataLoaders1D & | instance () |
The one and only instance. More... | |
Private Member Functions | |
DataLoaders1D ()=default | |
void | initBuiltInLoaders () |
create all default built in loaders More... | |
Private Attributes | |
QVector< AbstractDataLoader1D * > | m_builtInLoaders |
std::map< QString, std::function< AbstractDataLoader1D *()> > | m_createLoaders |
QVector< AbstractDataLoader1D * > | m_recentlyUsedLoaders |
QVector< AbstractDataLoader1D * > | m_userDefinedLoaders |
DataLoaders1D::~DataLoaders1D | ( | ) |
Definition at line 18 of file DataLoaders1D.cpp.
References m_builtInLoaders, and m_userDefinedLoaders.
|
privatedefault |
void DataLoaders1D::addBuiltInLoader | ( | const QString & | persistentClassName, |
const std::function< AbstractDataLoader1D *()> & | create | ||
) |
Register a built-in loader with the given class name and factory function.
Definition at line 31 of file DataLoaders1D.cpp.
References m_builtInLoaders, m_createLoaders, and GUI::RealSpace::Particles::name().
Referenced by register1DDataLoaders().
void DataLoaders1D::addUserDefinedLoader | ( | AbstractDataLoader1D * | loader | ) |
add a user defined loader
Definition at line 38 of file DataLoaders1D.cpp.
References m_userDefinedLoaders.
Referenced by cloneAsUserDefinedLoader().
AbstractDataLoader1D * DataLoaders1D::createFromPersistentName | ( | const QString & | persistentClassName | ) |
Notify loader was recently used.
Create loader from the given persistent name
Definition at line 53 of file DataLoaders1D.cpp.
References m_createLoaders.
|
private |
create all default built in loaders
|
static |
The one and only instance.
Definition at line 24 of file DataLoaders1D.cpp.
Referenced by cloneAsUserDefinedLoader(), RealDataItem::deserializeBinaryData(), SpecularDataImportWidget::fillLoaderCombo(), RealDataSelectorWidget::importData1D(), register1DDataLoaders(), and SpecularDataImportWidget::selectedLoader().
QVector< AbstractDataLoader1D * > DataLoaders1D::loaders | ( | ) | const |
all defined loaders. A null element in the list defines a separator The returned pointers are the same over the lifetime of the DataLoaders instance, therefore they can be used for comparison.
Definition at line 43 of file DataLoaders1D.cpp.
References m_builtInLoaders, and m_userDefinedLoaders.
QVector< AbstractDataLoader1D * > DataLoaders1D::recentlyUsedLoaders | ( | ) | const |
The last 10 recently used loaders.
Definition at line 48 of file DataLoaders1D.cpp.
References m_recentlyUsedLoaders.
|
private |
Definition at line 62 of file DataLoaders1D.h.
Referenced by ~DataLoaders1D(), addBuiltInLoader(), and loaders().
|
private |
Definition at line 65 of file DataLoaders1D.h.
Referenced by addBuiltInLoader(), and createFromPersistentName().
|
private |
Definition at line 63 of file DataLoaders1D.h.
Referenced by recentlyUsedLoaders().
|
private |
Definition at line 64 of file DataLoaders1D.h.
Referenced by ~DataLoaders1D(), addUserDefinedLoader(), and loaders().