BornAgain
1.18.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 scattering at grazing incidence
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
#ifndef BORNAGAIN_CORE_EXPORT_SAMPLETOPYTHON_H
16
#define BORNAGAIN_CORE_EXPORT_SAMPLETOPYTHON_H
17
18
#include <memory>
19
#include <string>
20
21
class
IParticle
;
22
class
MultiLayer
;
23
class
SampleLabelHandler
;
24
25
//! Generates Python code snippet from domain (C++) objects representing sample construction.
26
27
class
SampleToPython
28
{
29
public
:
30
SampleToPython
();
31
~SampleToPython
();
32
33
std::string
generateSampleCode
(
const
MultiLayer
& multilayer);
34
35
private
:
36
void
initLabels
(
const
MultiLayer
& multilayer);
37
38
std::string
defineGetSample
()
const
;
39
std::string
defineMaterials
()
const
;
40
std::string
defineLayers
()
const
;
41
std::string
defineFormFactors
()
const
;
42
std::string
defineParticles
()
const
;
43
std::string
defineCoreShellParticles
()
const
;
44
std::string
defineParticleDistributions
()
const
;
45
std::string
defineParticleCompositions
()
const
;
46
std::string
defineLattices
()
const
;
47
std::string
defineCrystals
()
const
;
48
std::string
defineMesoCrystals
()
const
;
49
std::string
defineInterferenceFunctions
()
const
;
50
std::string
defineParticleLayouts
()
const
;
51
std::string
defineRoughnesses
()
const
;
52
std::string
addLayoutsToLayers
()
const
;
53
std::string
defineMultiLayers
()
const
;
54
55
std::string
indent
()
const
;
56
57
void
setRotationInformation
(
const
IParticle
* particle, std::string particle_name,
58
std::ostringstream& result)
const
;
59
void
setPositionInformation
(
const
IParticle
* particle, std::string particle_name,
60
std::ostringstream& result)
const
;
61
62
std::unique_ptr<SampleLabelHandler>
m_label
;
63
};
64
65
#endif
// BORNAGAIN_CORE_EXPORT_SAMPLETOPYTHON_H
IParticle
Pure virtual base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal.
Definition:
IParticle.h:33
MultiLayer
Our sample model: a stack of layers one below the other.
Definition:
MultiLayer.h:42
SampleLabelHandler
The handler which construct labels for sample variables during python script generation.
Definition:
SampleLabelHandler.h:46
SampleToPython
Generates Python code snippet from domain (C++) objects representing sample construction.
Definition:
SampleToPython.h:28
SampleToPython::defineLayers
std::string defineLayers() const
Definition:
SampleToPython.cpp:135
SampleToPython::defineGetSample
std::string defineGetSample() const
Definition:
SampleToPython.cpp:83
SampleToPython::defineFormFactors
std::string defineFormFactors() const
Definition:
SampleToPython.cpp:157
SampleToPython::generateSampleCode
std::string generateSampleCode(const MultiLayer &multilayer)
Definition:
SampleToPython.cpp:37
SampleToPython::defineMaterials
std::string defineMaterials() const
Definition:
SampleToPython.cpp:97
SampleToPython::defineMesoCrystals
std::string defineMesoCrystals() const
Definition:
SampleToPython.cpp:335
SampleToPython::initLabels
void initLabels(const MultiLayer &multilayer)
Definition:
SampleToPython.cpp:43
SampleToPython::defineCrystals
std::string defineCrystals() const
Definition:
SampleToPython.cpp:313
SampleToPython::m_label
std::unique_ptr< SampleLabelHandler > m_label
Definition:
SampleToPython.h:62
SampleToPython::defineParticles
std::string defineParticles() const
Definition:
SampleToPython.cpp:173
SampleToPython::defineParticleCompositions
std::string defineParticleCompositions() const
Definition:
SampleToPython.cpp:265
SampleToPython::~SampleToPython
~SampleToPython()
SampleToPython::indent
std::string indent() const
Definition:
SampleToPython.cpp:591
SampleToPython::defineParticleDistributions
std::string defineParticleDistributions() const
Definition:
SampleToPython.cpp:217
SampleToPython::addLayoutsToLayers
std::string addLayoutsToLayers() const
Definition:
SampleToPython.cpp:527
SampleToPython::defineParticleLayouts
std::string defineParticleLayouts() const
Definition:
SampleToPython.cpp:482
SampleToPython::setRotationInformation
void setRotationInformation(const IParticle *particle, std::string particle_name, std::ostringstream &result) const
Definition:
SampleToPython.cpp:596
SampleToPython::setPositionInformation
void setPositionInformation(const IParticle *particle, std::string particle_name, std::ostringstream &result) const
Definition:
SampleToPython.cpp:632
SampleToPython::defineLattices
std::string defineLattices() const
Definition:
SampleToPython.cpp:288
SampleToPython::defineCoreShellParticles
std::string defineCoreShellParticles() const
Definition:
SampleToPython.cpp:196
SampleToPython::defineInterferenceFunctions
std::string defineInterferenceFunctions() const
Definition:
SampleToPython.cpp:359
SampleToPython::defineMultiLayers
std::string defineMultiLayers() const
Definition:
SampleToPython.cpp:545
SampleToPython::SampleToPython
SampleToPython()
SampleToPython::defineRoughnesses
std::string defineRoughnesses() const
Definition:
SampleToPython.cpp:513
Core
Export
SampleToPython.h
Generated by
1.9.1