BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Saves and restores list of SessionModel's to/from disk using json format. More...
Classes | |
struct | JsonDocumentImpl |
Public Member Functions | |
JsonDocument (const std::vector< SessionModel * > &models) | |
~JsonDocument () override | |
void | load (const std::string &file_name) override |
Loads models from disk. If models have some data already, it will be rewritten. More... | |
void | save (const std::string &file_name) const override |
Saves models on disk. More... | |
Private Attributes | |
std::unique_ptr< JsonDocumentImpl > | p_impl |
Saves and restores list of SessionModel's to/from disk using json format.
Single JsonDocument corresponds to a single file on disk.
Definition at line 29 of file jsondocument.h.
JsonDocument::JsonDocument | ( | const std::vector< SessionModel * > & | models | ) |
Definition at line 32 of file jsondocument.cpp.
|
overridedefault |
|
overridevirtual |
Loads models from disk. If models have some data already, it will be rewritten.
Implements ModelView::ModelDocumentInterface.
Definition at line 59 of file jsondocument.cpp.
References ModelView::CreateModelProjectConverter(), and p_impl.
|
overridevirtual |
Saves models on disk.
Implements ModelView::ModelDocumentInterface.
Definition at line 38 of file jsondocument.cpp.
References ModelView::CreateModelProjectConverter(), and p_impl.
Referenced by TEST_F().
|
private |
Definition at line 39 of file jsondocument.h.