BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Generates Python code snippet from domain (C++) objects representing sample construction.
Definition at line 33 of file SampleToPython.h.
Public Member Functions | |
SampleToPython () | |
~SampleToPython () | |
std::string | sampleCode (const MultiLayer &sample) |
Private Member Functions | |
std::string | defineCoreShellParticles () const |
std::string | defineCrystals () const |
std::string | defineFormFactors () const |
std::string | defineGetSample () const |
std::string | defineInterferences () const |
std::string | defineLattices2D () const |
std::string | defineLattices3D () const |
std::string | defineLayers () const |
std::string | defineMaterials () const |
std::string | defineMesoCrystals () const |
std::string | defineMultiLayers () const |
std::string | defineParticleCompositions () const |
std::string | defineParticleLayouts () const |
std::string | defineParticles () const |
std::string | defineRoughnesses () const |
void | initLabels (const MultiLayer &sample) |
Private Attributes | |
std::unique_ptr< MaterialKeyHandler > | m_materials |
std::unique_ptr< ComponentKeyHandler > | m_objs |
|
default |
|
default |
|
private |
Definition at line 388 of file SampleToPython.cpp.
References Py::Fmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 492 of file SampleToPython.cpp.
References Py::Fmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 223 of file SampleToPython.cpp.
References Py::Fmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 134 of file SampleToPython.cpp.
References defineCoreShellParticles(), defineCrystals(), defineFormFactors(), defineInterferences(), defineLattices2D(), defineLattices3D(), defineLayers(), defineMaterials(), defineMesoCrystals(), defineMultiLayers(), defineParticleCompositions(), defineParticleLayouts(), defineParticles(), and defineRoughnesses().
Referenced by sampleCode().
|
private |
Definition at line 239 of file SampleToPython.cpp.
References ASSERT, Py::Fmt::indent(), m_objs, Py::Fmt::printDegrees(), Py::Fmt::printDouble(), Py::Fmt::printNm(), Py::Fmt::printNm2(), and IProfile2D::pythonConstructor().
Referenced by defineGetSample().
|
private |
Definition at line 450 of file SampleToPython.cpp.
References Py::Fmt::indent(), m_objs, Py::Fmt::printDegrees(), and Py::Fmt::printNm().
Referenced by defineGetSample().
|
private |
Definition at line 468 of file SampleToPython.cpp.
References Py::Fmt::indent(), m_objs, and Py::Fmt::printNm().
Referenced by defineGetSample().
|
private |
Definition at line 186 of file SampleToPython.cpp.
References Py::Fmt::indent(), m_materials, m_objs, and Py::Fmt::printNm().
Referenced by defineGetSample().
|
private |
Definition at line 147 of file SampleToPython.cpp.
References factory_names, Py::Fmt::indent(), Material::isScalarMaterial(), m_materials, Material::magnetization(), Material::materialData(), Material::materialName(), Py::Fmt::printDouble(), and Material::typeID().
Referenced by defineGetSample().
|
private |
Definition at line 427 of file SampleToPython.cpp.
References Py::Fmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 513 of file SampleToPython.cpp.
References ASSERT, Py::Fmt::indent(), m_objs, Py::Fmt::printScientificDouble(), and LayerInterface::roughness().
Referenced by defineGetSample().
|
private |
Definition at line 407 of file SampleToPython.cpp.
References Py::Fmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 342 of file SampleToPython.cpp.
References IParticle::abundance(), Py::Fmt::indent(), m_objs, and Py::Fmt::printDouble().
Referenced by defineGetSample().
|
private |
Definition at line 368 of file SampleToPython.cpp.
References ASSERT, Py::Fmt::indent(), m_materials, and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 208 of file SampleToPython.cpp.
References Py::Fmt::indent(), and m_objs.
Referenced by defineGetSample().
|
private |
Definition at line 95 of file SampleToPython.cpp.
References ISampleNode::containedMaterials(), m_materials, and m_objs.
Referenced by sampleCode().
std::string SampleToPython::sampleCode | ( | const MultiLayer & | sample | ) |
Definition at line 89 of file SampleToPython.cpp.
References defineGetSample(), and initLabels().
Referenced by Py::Export::sampleCode().
|
private |
Definition at line 60 of file SampleToPython.h.
Referenced by defineLayers(), defineMaterials(), defineParticles(), and initLabels().
|
private |
Definition at line 59 of file SampleToPython.h.
Referenced by defineCoreShellParticles(), defineCrystals(), defineFormFactors(), defineInterferences(), defineLattices2D(), defineLattices3D(), defineLayers(), defineMesoCrystals(), defineMultiLayers(), defineParticleCompositions(), defineParticleLayouts(), defineParticles(), defineRoughnesses(), and initLabels().