BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Converter between SessionItemContainer and JSON object. More...
Classes | |
struct | JsonItemContainerConverterImpl |
Public Member Functions | |
JsonItemContainerConverter (ConverterCallbacks callbacks) | |
~JsonItemContainerConverter () | |
void | from_json (const QJsonObject &json, SessionItemContainer &container) |
Reconstructs SessionItemContainer from the content of JSON object. More... | |
QJsonObject | to_json (const SessionItemContainer &container) |
Private Attributes | |
std::unique_ptr< JsonItemContainerConverterImpl > | p_impl |
Converter between SessionItemContainer and JSON object.
Definition at line 32 of file jsonitemcontainerconverter.h.
JsonItemContainerConverter::JsonItemContainerConverter | ( | ConverterCallbacks | callbacks | ) |
Definition at line 110 of file jsonitemcontainerconverter.cpp.
|
default |
void JsonItemContainerConverter::from_json | ( | const QJsonObject & | json, |
SessionItemContainer & | container | ||
) |
Reconstructs SessionItemContainer from the content of JSON object.
Can work in two modes:
Definition at line 136 of file jsonitemcontainerconverter.cpp.
References ModelView::SessionItemContainer::empty(), ModelView::JsonItemFormatAssistant::isSessionItemContainer(), ModelView::TagInfo::name(), p_impl, ModelView::SessionItemContainer::tagInfo(), and ModelView::JsonItemFormatAssistant::tagInfoKey.
QJsonObject JsonItemContainerConverter::to_json | ( | const SessionItemContainer & | container | ) |
Definition at line 117 of file jsonitemcontainerconverter.cpp.
References ModelView::JsonItemFormatAssistant::itemsKey, p_impl, ModelView::SessionItemContainer::tagInfo(), and ModelView::JsonItemFormatAssistant::tagInfoKey.
|
private |
Definition at line 43 of file jsonitemcontainerconverter.h.
Referenced by from_json(), and to_json().