16 #include "Base/Util/Assert.h"
19 #include "Sample/Multilayer/MultiLayer.h"
20 #include "Sample/StandardSamples/ExemplarySamples.h"
27 const QMap<QString, std::tuple<QString, QString, std::function<MultiLayer*()>>> builders{
28 {
"CylindersAndPrismsBuilder",
29 {
"Cylinder and prisms",
"Mixture of cylinders and prisms without interference",
30 ExemplarySamples::createCylindersAndPrisms}},
32 {
"RadialParaCrystalBuilder",
33 {
"Interference 1D paracrystal",
"Interference 1D radial paracrystal",
34 ExemplarySamples::createRadialParaCrystal}},
36 {
"HexParaCrystalBuilder",
37 {
"Interference 2D paracrystal",
"Interference 2D paracrystal",
38 ExemplarySamples::createHexParaCrystal}},
40 {
"CoreShellParticleBuilder",
41 {
"Core shell particles",
"Core shell particles", ExemplarySamples::createCoreShellParticle}},
43 {
"MultiLayerWithRoughnessBuilder",
44 {
"Multilayer with correlated roughness",
"Multilayer with correlated roughness",
45 ExemplarySamples::createMultiLayerWithRoughness}},
47 {
"SquareLattice2DBuilder",
48 {
"Interference 2D square lattice",
"Interference 2D lattice",
49 ExemplarySamples::createSquareLattice2D}},
51 {
"RotatedPyramidsBuilder",
52 {
"Rotated pyramids",
"Rotated pyramids on top of substrate",
53 ExemplarySamples::createRotatedPyramids}},
55 {
"ParticleCompositionBuilder",
56 {
"Hexagonal lattice with basis",
57 "Hexagonal lattice with basis to represent two layers of spheres",
58 ExemplarySamples::createParticleComposition}},
60 {
"MesoCrystalBuilder", {
"Mesocrystal",
"", ExemplarySamples::createMesoCrystal}}};
67 return builders.find(
name) != builders.end();
73 MultiLayer* sample = std::get<2>(builders[
name])();
80 return builders.keys();
86 auto [title, description, builder] = builders[
name];
87 return {title, description};
Defines class GUI::ExamplesFactory.
Defines class GUISampleBuilder.
Defines namespace GUI::Model::ObjectBuilder.
MultiLayerItem * itemizeSample(const QString &name)
Create a sample item of the built-in example with the given internal name.
QStringList exampleNames()
The internal example name, e.g. for creation with itemizeSample.
std::tuple< QString, QString > exampleInfo(const QString &name)
Returns human readable name and description.
bool isValidExampleName(const QString &name)
QString const & name(EShape k)