BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
SampleToPython.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file Sim/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_SIM_EXPORT_SAMPLETOPYTHON_H
21
#define BORNAGAIN_SIM_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
& sample);
39
40
private
:
41
void
initLabels
(
const
MultiLayer
& sample);
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
defineParticleCompositions
()
const
;
50
std::string
defineLattices2D
()
const
;
51
std::string
defineLattices3D
()
const
;
52
std::string
defineCrystals
()
const
;
53
std::string
defineMesoCrystals
()
const
;
54
std::string
defineInterferences
()
const
;
55
std::string
defineParticleLayouts
()
const
;
56
std::string
defineRoughnesses
()
const
;
57
std::string
defineMultiLayers
()
const
;
58
59
std::unique_ptr<ComponentKeyHandler>
m_objs
;
60
std::unique_ptr<MaterialKeyHandler>
m_materials
;
61
};
62
63
#endif
// BORNAGAIN_SIM_EXPORT_SAMPLETOPYTHON_H
64
#endif
// USER_API
ComponentKeyHandler
Stores INode instances, associates them with given tag, and provides unique keys.
Definition:
ComponentKeyHandler.h:31
IParticle
Abstract base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal....
Definition:
IParticle.h:31
MaterialKeyHandler
Stores Material instances, associates them with given tag, and provides unique keys.
Definition:
MaterialKeyHandler.h:31
MultiLayer
Our sample model: a stack of layers one below the other.
Definition:
MultiLayer.h:43
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:186
SampleToPython::defineGetSample
std::string defineGetSample() const
Definition:
SampleToPython.cpp:134
SampleToPython::defineFormFactors
std::string defineFormFactors() const
Definition:
SampleToPython.cpp:223
SampleToPython::defineMaterials
std::string defineMaterials() const
Definition:
SampleToPython.cpp:147
SampleToPython::defineLattices3D
std::string defineLattices3D() const
Definition:
SampleToPython.cpp:468
SampleToPython::defineMesoCrystals
std::string defineMesoCrystals() const
Definition:
SampleToPython.cpp:427
SampleToPython::defineCrystals
std::string defineCrystals() const
Definition:
SampleToPython.cpp:492
SampleToPython::defineParticles
std::string defineParticles() const
Definition:
SampleToPython.cpp:368
SampleToPython::defineParticleCompositions
std::string defineParticleCompositions() const
Definition:
SampleToPython.cpp:407
SampleToPython::~SampleToPython
~SampleToPython()
SampleToPython::m_objs
std::unique_ptr< ComponentKeyHandler > m_objs
Definition:
SampleToPython.h:59
SampleToPython::defineLattices2D
std::string defineLattices2D() const
Definition:
SampleToPython.cpp:450
SampleToPython::defineInterferences
std::string defineInterferences() const
Definition:
SampleToPython.cpp:239
SampleToPython::defineParticleLayouts
std::string defineParticleLayouts() const
Definition:
SampleToPython.cpp:342
SampleToPython::defineCoreShellParticles
std::string defineCoreShellParticles() const
Definition:
SampleToPython.cpp:388
SampleToPython::sampleCode
std::string sampleCode(const MultiLayer &sample)
Definition:
SampleToPython.cpp:89
SampleToPython::initLabels
void initLabels(const MultiLayer &sample)
Definition:
SampleToPython.cpp:95
SampleToPython::defineMultiLayers
std::string defineMultiLayers() const
Definition:
SampleToPython.cpp:513
SampleToPython::SampleToPython
SampleToPython()
SampleToPython::defineRoughnesses
std::string defineRoughnesses() const
Definition:
SampleToPython.cpp:208
SampleToPython::m_materials
std::unique_ptr< MaterialKeyHandler > m_materials
Definition:
SampleToPython.h:60
Sim
Export
SampleToPython.h
Generated by
1.9.1