BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SampleToPython.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file Core/Export/SampleToPython.h
6
//! @brief Defines class SampleToPython.
7
//!
8
//! @homepage http://www.bornagainproject.org
9
//! @license GNU General Public License v3 or higher (see COPYING)
10
//! @copyright Forschungszentrum Jülich GmbH 2018
11
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12
//
13
// ************************************************************************************************
14
15
#ifdef SWIG
16
#error no need to expose this header to Swig
17
#endif
18
19
#ifndef USER_API
20
#ifndef BORNAGAIN_CORE_EXPORT_SAMPLETOPYTHON_H
21
#define BORNAGAIN_CORE_EXPORT_SAMPLETOPYTHON_H
22
23
#include <memory>
24
#include <string>
25
26
class
IParticle
;
27
class
MultiLayer
;
28
class
ComponentKeyHandler
;
29
class
MaterialKeyHandler
;
30
31
//! Generates Python code snippet from domain (C++) objects representing sample construction.
32
33
class
SampleToPython
{
34
public
:
35
SampleToPython
();
36
~SampleToPython
();
37
38
std::string
sampleCode
(
const
MultiLayer
& multilayer);
39
40
private
:
41
void
initLabels
(
const
MultiLayer
& multilayer);
42
43
std::string
defineGetSample
()
const
;
44
std::string
defineMaterials
()
const
;
45
std::string
defineLayers
()
const
;
46
std::string
defineFormFactors
()
const
;
47
std::string
defineParticles
()
const
;
48
std::string
defineCoreShellParticles
()
const
;
49
std::string
defineParticleDistributions
()
const
;
50
std::string
defineParticleCompositions
()
const
;
51
std::string
defineLattices2D
()
const
;
52
std::string
defineLattices3D
()
const
;
53
std::string
defineCrystals
()
const
;
54
std::string
defineMesoCrystals
()
const
;
55
std::string
defineInterferenceFunctions
()
const
;
56
std::string
defineParticleLayouts
()
const
;
57
std::string
defineRoughnesses
()
const
;
58
std::string
defineMultiLayers
()
const
;
59
60
std::unique_ptr<ComponentKeyHandler>
m_objs
;
61
std::unique_ptr<MaterialKeyHandler>
m_materials
;
62
};
63
64
#endif
// BORNAGAIN_CORE_EXPORT_SAMPLETOPYTHON_H
65
#endif
// USER_API
ComponentKeyHandler
Stores IComponent instances, associates them with given tag, and provides unique keys.
Definition:
ComponentKeyHandler.h:32
IParticle
Abstract base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal.
Definition:
IParticle.h:33
MaterialKeyHandler
Stores Material instances, associates them with given tag, and provides unique keys.
Definition:
MaterialKeyHandler.h:32
MultiLayer
Our sample model: a stack of layers one below the other.
Definition:
MultiLayer.h:41
SampleToPython
Generates Python code snippet from domain (C++) objects representing sample construction.
Definition:
SampleToPython.h:33
SampleToPython::defineLayers
std::string defineLayers() const
Definition:
SampleToPython.cpp:195
SampleToPython::defineGetSample
std::string defineGetSample() const
Definition:
SampleToPython.cpp:143
SampleToPython::defineFormFactors
std::string defineFormFactors() const
Definition:
SampleToPython.cpp:232
SampleToPython::defineMaterials
std::string defineMaterials() const
Definition:
SampleToPython.cpp:156
SampleToPython::defineLattices3D
std::string defineLattices3D() const
Definition:
SampleToPython.cpp:537
SampleToPython::defineMesoCrystals
std::string defineMesoCrystals() const
Definition:
SampleToPython.cpp:496
SampleToPython::initLabels
void initLabels(const MultiLayer &multilayer)
Definition:
SampleToPython.cpp:102
SampleToPython::defineCrystals
std::string defineCrystals() const
Definition:
SampleToPython.cpp:561
SampleToPython::defineParticles
std::string defineParticles() const
Definition:
SampleToPython.cpp:393
SampleToPython::defineParticleCompositions
std::string defineParticleCompositions() const
Definition:
SampleToPython.cpp:475
SampleToPython::~SampleToPython
~SampleToPython()
SampleToPython::defineParticleDistributions
std::string defineParticleDistributions() const
Definition:
SampleToPython.cpp:432
SampleToPython::m_objs
std::unique_ptr< ComponentKeyHandler > m_objs
Definition:
SampleToPython.h:60
SampleToPython::defineLattices2D
std::string defineLattices2D() const
Definition:
SampleToPython.cpp:519
SampleToPython::defineParticleLayouts
std::string defineParticleLayouts() const
Definition:
SampleToPython.cpp:366
SampleToPython::defineCoreShellParticles
std::string defineCoreShellParticles() const
Definition:
SampleToPython.cpp:413
SampleToPython::defineInterferenceFunctions
std::string defineInterferenceFunctions() const
Definition:
SampleToPython.cpp:248
SampleToPython::defineMultiLayers
std::string defineMultiLayers() const
Definition:
SampleToPython.cpp:582
SampleToPython::SampleToPython
SampleToPython()
SampleToPython::defineRoughnesses
std::string defineRoughnesses() const
Definition:
SampleToPython.cpp:217
SampleToPython::sampleCode
std::string sampleCode(const MultiLayer &multilayer)
Definition:
SampleToPython.cpp:96
SampleToPython::m_materials
std::unique_ptr< MaterialKeyHandler > m_materials
Definition:
SampleToPython.h:61
Core
Export
SampleToPython.h
Generated by
1.9.1