diff --git a/Core/Export/PyGenVisitor.cpp b/Core/Export/PyGenVisitor.cpp index c9e1a707fd9a59e84d248c3b7d5ec215cc640574..37328888d334bf336e425b3d48256d1e71f993bc 100644 --- a/Core/Export/PyGenVisitor.cpp +++ b/Core/Export/PyGenVisitor.cpp @@ -350,7 +350,7 @@ std::string PyGenVisitor::defineMaterials() const double delta = 1.0 - std::real(ri); double beta = std::imag(ri); if (p_material->isScalarMaterial()) { - result << indent() << m_label->getLabel(p_material) << + result << indent() << m_label->getLabelMaterial(p_material) << " = ba.HomogeneousMaterial(\"" << p_material->getName() << "\", " << PyGenTools::printDouble(delta) << ", " << PyGenTools::printDouble(beta) << ")\n"; @@ -365,7 +365,7 @@ std::string PyGenVisitor::defineMaterials() const result << indent() << "magnetic_field = kvector_t(" << magnetic_field.x() << ", " << magnetic_field.y() << ", " << magnetic_field.z() << ", " << ")\n"; - result << indent() << m_label->getLabel(p_material) + result << indent() << m_label->getLabelMaterial(p_material) << " = ba.HomogeneousMagneticMaterial(\"" << p_material->getName(); result << "\", " << PyGenTools::printDouble(delta) << ", " << PyGenTools::printDouble(beta) << ", " @@ -386,7 +386,7 @@ std::string PyGenVisitor::defineLayers() const for (auto it=themap->begin(); it != themap->end(); ++it) { const Layer* layer = it->first; result << indent() << it->second << " = ba.Layer(" << - m_label->getLabel(layer->getMaterial()); + m_label->getLabelMaterial(layer->getMaterial()); if (layer->getThickness() != 0) { result << ", " << layer->getThickness(); } @@ -578,8 +578,8 @@ std::string PyGenVisitor::defineParticles() const const Particle* p_particle = it->first; std::string particle_name = it->second; result << indent() << particle_name << " = ba.Particle(" - << m_label->getLabel(p_particle->getMaterial()) << ", " - << m_label->getLabel(p_particle->getFormFactor()); + << m_label->getLabelMaterial(p_particle->getMaterial()) << ", " + << m_label->getLabelFormFactor(p_particle->getFormFactor()); result << ")\n"; setRotationInformation(p_particle, particle_name, result); setPositionInformation(p_particle, particle_name, result); @@ -598,8 +598,8 @@ std::string PyGenVisitor::defineCoreShellParticles() const for (auto it=themap->begin(); it!=themap->end(); ++it) { const ParticleCoreShell* p_coreshell = it->first; result << "\n" << indent() << it->second << " = ba.ParticleCoreShell(" - << m_label->getLabel(p_coreshell->getShellParticle()) << ", " - << m_label->getLabel(p_coreshell->getCoreParticle()) << ")\n"; + << m_label->getLabelParticle(p_coreshell->getShellParticle()) << ", " + << m_label->getLabelParticle(p_coreshell->getCoreParticle()) << ")\n"; std::string core_shell_name = it->second; setRotationInformation(p_coreshell, core_shell_name, result); setPositionInformation(p_coreshell, core_shell_name, result); @@ -648,7 +648,8 @@ std::string PyGenVisitor::defineParticleDistributions() const } result << indent() << it->second << " = ba.ParticleDistribution(" - << m_label->getLabel(it->first->getParticle()) << ", " << s_par_distr.str() << ")\n"; + << m_label->getLabelParticle(it->first->getParticle()) + << ", " << s_par_distr.str() << ")\n"; index++; } return result.str(); @@ -668,7 +669,7 @@ std::string PyGenVisitor::defineParticleCompositions() const result << indent() << particle_composition_name << " = ba.ParticleComposition()\n"; for (size_t i = 0; i < p_particle_composition->getNbrParticles(); ++i) { result << indent() << particle_composition_name << ".addParticle(" - << m_label->getLabel(p_particle_composition->getParticle(i)) + << m_label->getLabelParticle(p_particle_composition->getParticle(i)) << ")\n"; } setRotationInformation(p_particle_composition, particle_composition_name, result); @@ -1095,7 +1096,7 @@ std::string PyGenVisitor::defineParticleLayouts() const const IAbstractParticle* p_particle = particleLayout->getParticle(particleIndex); double abundance = particleLayout->getAbundanceOfParticle(particleIndex); result << indent() << it->second << ".addParticle(" - << m_label->getLabel(p_particle) << ", " + << m_label->getLabelParticle(p_particle) << ", " << PyGenTools::printDouble(abundance) << ")\n"; particleIndex++; } @@ -1103,7 +1104,7 @@ std::string PyGenVisitor::defineParticleLayouts() const const IInterferenceFunction* p_iff = particleLayout->getInterferenceFunction(); if (p_iff) { result << indent() << it->second << ".addInterferenceFunction(" - << m_label->getLabel(p_iff) << ")\n"; + << m_label->getLabelInterferenceFunction(p_iff) << ")\n"; } switch (particleLayout->getApproximation()) { @@ -1151,7 +1152,7 @@ std::string PyGenVisitor::addLayoutsToLayers() const size_t numberOfLayouts = layer->getNumberOfLayouts(); for(size_t i = 0; i < numberOfLayouts; ++i) result << "\n" << indent() << it->second << ".addLayout(" - << m_label->getLabel(layer->getLayout(i)) << ")\n"; + << m_label->getLabelLayout(layer->getLayout(i)) << ")\n"; } return result.str(); } @@ -1171,7 +1172,7 @@ std::string PyGenVisitor::defineMultiLayers() const if (numberOfLayers) { result << indent() << it->second << ".addLayer(" - << m_label->getLabel(it->first->getLayer(0)) << ")\n"; + << m_label->getLabelLayer(it->first->getLayer(0)) << ")\n"; size_t layerIndex = 1; while (layerIndex != numberOfLayers) { @@ -1179,13 +1180,13 @@ std::string PyGenVisitor::defineMultiLayers() const if (m_label->getLayerRoughnessMap()->find(layerInterface->getRoughness()) == m_label->getLayerRoughnessMap()->end()) { result << indent() << it->second << ".addLayer(" - << m_label->getLabel(it->first->getLayer(layerIndex)) << ")\n"; + << m_label->getLabelLayer(it->first->getLayer(layerIndex)) << ")\n"; } else { result << indent() << it->second << ".addLayerWithTopRoughness(" - << m_label->getLabel(it->first->getLayer(layerIndex)) << ", " - << m_label->getLabel(layerInterface->getRoughness()) << ")\n"; + << m_label->getLabelLayer(it->first->getLayer(layerIndex)) << ", " + << m_label->getLabelRoughness(layerInterface->getRoughness()) << ")\n"; } layerIndex++; } diff --git a/Core/Export/SampleLabelHandler.cpp b/Core/Export/SampleLabelHandler.cpp index b56cc040939fba759ba816ed7d641ee11f031942..a6db04001f958902c1715984dce3047757b003f1 100644 --- a/Core/Export/SampleLabelHandler.cpp +++ b/Core/Export/SampleLabelHandler.cpp @@ -24,37 +24,37 @@ #include "ParticleCoreShell.h" #include "ParticleDistribution.h" -std::string SampleLabelHandler::getLabel(const IFormFactor* sample) +std::string SampleLabelHandler::getLabelFormFactor(const IFormFactor* sample) { return m_FormFactorLabel[sample]; } -std::string SampleLabelHandler::getLabel(const IInterferenceFunction* sample) +std::string SampleLabelHandler::getLabelInterferenceFunction(const IInterferenceFunction* sample) { return m_InterferenceFunctionLabel[sample]; } -std::string SampleLabelHandler::getLabel(const IMaterial* sample) +std::string SampleLabelHandler::getLabelMaterial(const IMaterial* sample) { return m_MaterialLabel[sample]; } -std::string SampleLabelHandler::getLabel(const Layer* sample) +std::string SampleLabelHandler::getLabelLayer(const Layer* sample) { return m_LayerLabel[sample]; } -std::string SampleLabelHandler::getLabel(const LayerRoughness* sample) +std::string SampleLabelHandler::getLabelRoughness(const LayerRoughness* sample) { return m_LayerRoughnessLabel[sample]; } -std::string SampleLabelHandler::getLabel(const MultiLayer* sample) +std::string SampleLabelHandler::getLabelMultiLayer(const MultiLayer* sample) { return m_MultiLayerLabel[sample]; } -std::string SampleLabelHandler::getLabel(const IAbstractParticle* sample) +std::string SampleLabelHandler::getLabelParticle(const IAbstractParticle* sample) { if (const ParticleCoreShell* core_shell_particle = dynamic_cast<const ParticleCoreShell*>(sample)) @@ -70,27 +70,27 @@ std::string SampleLabelHandler::getLabel(const IAbstractParticle* sample) "SampleLabelHandler::getLabel: called for unknown IParticle type"); } -std::string SampleLabelHandler::getLabel(const ParticleCoreShell* sample) +std::string SampleLabelHandler::getLabelParticleCoreShell(const ParticleCoreShell* sample) { return m_ParticleCoreShellLabel[sample]; } -std::string SampleLabelHandler::getLabel(const ParticleDistribution* sample) +std::string SampleLabelHandler::getLabelParticleDistribution(const ParticleDistribution* sample) { return m_ParticleDistributionLabel[sample]; } -std::string SampleLabelHandler::getLabel(const ILayout* sample) +std::string SampleLabelHandler::getLabelLayout(const ILayout* sample) { return m_ILayoutLabel[sample]; } -std::string SampleLabelHandler::getLabel(const ParticleComposition* sample) +std::string SampleLabelHandler::getLabelParticleComposition(const ParticleComposition* sample) { return m_ParticleCompositionLabel[sample]; } -std::string SampleLabelHandler::getLabel(const IRotation* sample) +std::string SampleLabelHandler::getLabelRotation(const IRotation* sample) { return m_RotationsLabel[sample]; } diff --git a/Core/Export/SampleLabelHandler.h b/Core/Export/SampleLabelHandler.h index 0f519d281f63293635dd1ef23ff8f728def431a3..021e6d90bc8fd0a4e28f46ce982aedb9c1e00854 100644 --- a/Core/Export/SampleLabelHandler.h +++ b/Core/Export/SampleLabelHandler.h @@ -142,18 +142,18 @@ public: rotations_t* getRotationsMap() { return &m_RotationsLabel; } roughnesses_t* getLayerRoughnessMap() { return &m_LayerRoughnessLabel; } - std::string getLabel(const IAbstractParticle* sample); - std::string getLabel(const IFormFactor* sample); - std::string getLabel(const IInterferenceFunction* sample); - std::string getLabel(const ILayout* sample); - std::string getLabel(const IMaterial* sample); - std::string getLabel(const IRotation* sample); - std::string getLabel(const Layer* sample); - std::string getLabel(const LayerRoughness* sample); - std::string getLabel(const MultiLayer* sample); - std::string getLabel(const ParticleComposition* sample); - std::string getLabel(const ParticleCoreShell* sample); - std::string getLabel(const ParticleDistribution* sample); + std::string getLabelParticle(const IAbstractParticle* sample); + std::string getLabelFormFactor(const IFormFactor* sample); + std::string getLabelInterferenceFunction(const IInterferenceFunction* sample); + std::string getLabelLayout(const ILayout* sample); + std::string getLabelMaterial(const IMaterial* sample); + std::string getLabelRotation(const IRotation* sample); + std::string getLabelLayer(const Layer* sample); + std::string getLabelRoughness(const LayerRoughness* sample); + std::string getLabelMultiLayer(const MultiLayer* sample); + std::string getLabelParticleComposition(const ParticleComposition* sample); + std::string getLabelParticleCoreShell(const ParticleCoreShell* sample); + std::string getLabelParticleDistribution(const ParticleDistribution* sample); void insertMaterial(const IMaterial* sample); void setLabel(const IFormFactor* sample);