From ea0e7efefe74e74983761f2d676ae2d9966e8835 Mon Sep 17 00:00:00 2001 From: Walter Van Herck <w.van.herck@fz-juelich.de> Date: Thu, 28 Aug 2014 13:09:43 +0200 Subject: [PATCH] Regenerated Python API --- .../src/IntensityDataFunctions.pypp.cpp | 8 +- Core/PythonAPI/src/Layer.pypp.cpp | 19 ++ Core/PythonAPI/src/PythonModule.cpp | 212 +++++++++--------- Fit/PythonAPI/src/PythonModule.cpp | 46 ++-- 4 files changed, 152 insertions(+), 133 deletions(-) diff --git a/Core/PythonAPI/src/IntensityDataFunctions.pypp.cpp b/Core/PythonAPI/src/IntensityDataFunctions.pypp.cpp index 19e6d771c38..e494ecaf3b9 100644 --- a/Core/PythonAPI/src/IntensityDataFunctions.pypp.cpp +++ b/Core/PythonAPI/src/IntensityDataFunctions.pypp.cpp @@ -14,7 +14,7 @@ GCC_DIAG_ON(missing-field-initializers) namespace bp = boost::python; -void register_IntensityDataFunctions_class() { +void register_IntensityDataFunctions_class(){ { //::IntensityDataFunctions typedef bp::class_< IntensityDataFunctions > IntensityDataFunctions_exposer_t; @@ -40,8 +40,8 @@ void register_IntensityDataFunctions_class() { , getRelativeDifference_function_type( &::IntensityDataFunctions::getRelativeDifference ) , ( bp::arg("result"), bp::arg("reference") ) ); - } - { //::IntensityDataFunctions::setEllipticMask + } + { //::IntensityDataFunctions::setEllipticMask typedef void ( *setEllipticMask_function_type )( ::OutputData< double > &,double,double,double,double ); @@ -64,7 +64,7 @@ void register_IntensityDataFunctions_class() { IntensityDataFunctions_exposer.staticmethod( "createClippedDataSet" ); IntensityDataFunctions_exposer.staticmethod( "getRelativeDifference" ); IntensityDataFunctions_exposer.staticmethod( "setEllipticMask" ); - IntensityDataFunctions_exposer.staticmethod( "setRectangularMask" );; + IntensityDataFunctions_exposer.staticmethod( "setRectangularMask" ); } } diff --git a/Core/PythonAPI/src/Layer.pypp.cpp b/Core/PythonAPI/src/Layer.pypp.cpp index 81752c6fd50..c066ffcba82 100644 --- a/Core/PythonAPI/src/Layer.pypp.cpp +++ b/Core/PythonAPI/src/Layer.pypp.cpp @@ -379,6 +379,15 @@ void register_Layer_class(){ , default_getMaterial_function_type(&Layer_wrapper::default_getMaterial) , bp::return_value_policy< bp::reference_existing_object >() ); + } + { //::Layer::getNumberOfLayers + + typedef ::std::size_t ( ::Layer::*getNumberOfLayers_function_type)( ) const; + + Layer_exposer.def( + "getNumberOfLayers" + , getNumberOfLayers_function_type( &::Layer::getNumberOfLayers ) ); + } { //::Layer::getRefractiveIndex @@ -448,6 +457,16 @@ void register_Layer_class(){ , default_setMaterialAndThickness_function_type(&Layer_wrapper::default_setMaterialAndThickness) , ( bp::arg("material"), bp::arg("thickness") ) ); + } + { //::Layer::setNumberOfLayers + + typedef void ( ::Layer::*setNumberOfLayers_function_type)( ::std::size_t ) ; + + Layer_exposer.def( + "setNumberOfLayers" + , setNumberOfLayers_function_type( &::Layer::setNumberOfLayers ) + , ( bp::arg("n_layers") ) ); + } { //::Layer::setThickness diff --git a/Core/PythonAPI/src/PythonModule.cpp b/Core/PythonAPI/src/PythonModule.cpp index 86cc77955aa..891d628494b 100644 --- a/Core/PythonAPI/src/PythonModule.cpp +++ b/Core/PythonAPI/src/PythonModule.cpp @@ -10,129 +10,129 @@ GCC_DIAG_ON(missing-field-initializers) #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #define PY_ARRAY_UNIQUE_SYMBOL BORNAGAIN_PYTHONAPI_ARRAY #include "numpy/arrayobject.h" -#include "FormFactorFullSphere.pypp.h" -#include "Lattice.pypp.h" -#include "FormFactorInfLongBox.pypp.h" -#include "PositionParticleInfo.pypp.h" -#include "Layer.pypp.h" -#include "FormFactorHemiEllipsoid.pypp.h" -#include "FormFactorPrism3.pypp.h" +#include "ParticleBuilder.pypp.h" +#include "FormFactorFullSpheroid.pypp.h" +#include "DistributionGate.pypp.h" +#include "SimpleSelectionRule.pypp.h" +#include "RealParameterWrapper.pypp.h" +#include "vdouble1d_t.pypp.h" #include "SimulationParameters.pypp.h" -#include "FormFactorInfLongRipple1.pypp.h" -#include "FTDistribution1DVoigt.pypp.h" -#include "FormFactorRipple1.pypp.h" -#include "ParticleInfo.pypp.h" -#include "ICompositeSample.pypp.h" -#include "OffSpecSimulation.pypp.h" -#include "IResolutionFunction2D.pypp.h" -#include "vector_kvector_t.pypp.h" -#include "FTDistribution1DGate.pypp.h" -#include "LatticeBasis.pypp.h" -#include "StochasticSampledParameter.pypp.h" -#include "FormFactorRipple2.pypp.h" -#include "FTDistribution2DVoigt.pypp.h" -#include "IFormFactorBorn.pypp.h" -#include "FormFactorPyramid.pypp.h" -#include "ISample.pypp.h" +#include "Transform3D.pypp.h" +#include "ThreadInfo.pypp.h" +#include "InterferenceFunction2DLattice.pypp.h" +#include "LayerInterface.pypp.h" #include "ILayout.pypp.h" +#include "FormFactorCone6.pypp.h" #include "FormFactorTetrahedron.pypp.h" -#include "InterferenceFunction1DParaCrystal.pypp.h" -#include "Simulation.pypp.h" -#include "ParticleLayout.pypp.h" -#include "FTDistribution2DCone.pypp.h" -#include "FormFactorEllipsoidalCylinder.pypp.h" -#include "vector_IFormFactorPtr_t.pypp.h" -#include "FTDistribution1DGauss.pypp.h" -#include "HomogeneousMaterial.pypp.h" -#include "cvector_t.pypp.h" -#include "FTDistribution2DGauss.pypp.h" -#include "StochasticParameter_t.pypp.h" -#include "IObservable.pypp.h" -#include "FormFactorBox.pypp.h" -#include "DistributionLogNormal.pypp.h" -#include "FormFactorCylinder.pypp.h" -#include "Detector.pypp.h" -#include "IObserver.pypp.h" -#include "IParameterized.pypp.h" -#include "FormFactorGauss.pypp.h" -#include "FormFactorDecoratorDebyeWaller.pypp.h" -#include "IDetectorResolution.pypp.h" +#include "FTDistribution1DCosine.pypp.h" +#include "FTDistribution1DTriangle.pypp.h" #include "FormFactorWeighted.pypp.h" -#include "InterferenceFunction2DLattice.pypp.h" -#include "RealParameterWrapper.pypp.h" -#include "LayerInterface.pypp.h" -#include "ParticleCoreShell.pypp.h" -#include "InterferenceFunction1DLattice.pypp.h" -#include "FormFactorCrystal.pypp.h" -#include "Instrument.pypp.h" -#include "PythonInterface_global_variables.pypp.h" -#include "IFTDistribution1D.pypp.h" #include "DistributionGaussian.pypp.h" -#include "Lattice1DIFParameters.pypp.h" -#include "DistributionCosine.pypp.h" -#include "IClusteredParticles.pypp.h" -#include "FormFactorLorentz.pypp.h" -#include "Bin1DCVector.pypp.h" +#include "IDetectorResolution.pypp.h" +#include "FormFactorCylinder.pypp.h" +#include "Crystal.pypp.h" +#include "FTDistribution1DCauchy.pypp.h" +#include "IFormFactorBorn.pypp.h" +#include "FormFactorEllipsoidalCylinder.pypp.h" #include "InterferenceFunctionNone.pypp.h" -#include "IFormFactorDecorator.pypp.h" -#include "Bin1D.pypp.h" -#include "ISampleBuilder.pypp.h" -#include "IntensityDataIOFactory.pypp.h" #include "FTDistribution2DGate.pypp.h" -#include "StochasticDoubleGaussian.pypp.h" -#include "FormFactorInfLongRipple2.pypp.h" -#include "IMaterial.pypp.h" -#include "InterferenceFunction2DParaCrystal.pypp.h" -#include "Particle.pypp.h" +#include "vector_kvector_t.pypp.h" #include "FormFactorTruncatedSpheroid.pypp.h" -#include "MesoCrystal.pypp.h" +#include "Particle.pypp.h" +#include "ConstKBinAxis.pypp.h" #include "FTDistribution2DCauchy.pypp.h" -#include "IInterferenceFunction.pypp.h" -#include "FTDistribution1DCosine.pypp.h" -#include "FTDistribution1DTriangle.pypp.h" -#include "FormFactorPrism6.pypp.h" -#include "HomogeneousMagneticMaterial.pypp.h" -#include "FormFactorFullSpheroid.pypp.h" -#include "Transform3D.pypp.h" -#include "IntensityData.pypp.h" -#include "DistributionGate.pypp.h" -#include "ThreadInfo.pypp.h" -#include "IAxis.pypp.h" -#include "CustomBinAxis.pypp.h" -#include "FormFactorCone6.pypp.h" -#include "ICloneable.pypp.h" -#include "PythonInterface_free_functions.pypp.h" +#include "FormFactorCrystal.pypp.h" #include "vector_longinteger_t.pypp.h" -#include "FormFactorSphereLogNormalRadius.pypp.h" -#include "FormFactorSphereGaussianRadius.pypp.h" -#include "FormFactorTruncatedSphere.pypp.h" -#include "IntensityDataFunctions.pypp.h" -#include "DistributionLorentz.pypp.h" -#include "ResolutionFunction2DSimple.pypp.h" -#include "ConstKBinAxis.pypp.h" -#include "ParameterPool.pypp.h" +#include "FTDistribution1DGauss.pypp.h" +#include "FTDistribution1DGate.pypp.h" #include "FormFactorAnisoPyramid.pypp.h" -#include "FormFactorCuboctahedron.pypp.h" -#include "MultiLayer.pypp.h" -#include "FormFactorCone.pypp.h" -#include "IDistribution1D.pypp.h" -#include "LayerRoughness.pypp.h" -#include "VariableBinAxis.pypp.h" -#include "SimpleSelectionRule.pypp.h" #include "FixedBinAxis.pypp.h" -#include "Lattice2DIFParameters.pypp.h" +#include "MultiLayer.pypp.h" #include "IFormFactor.pypp.h" -#include "vdouble1d_t.pypp.h" -#include "IFTDistribution2D.pypp.h" -#include "Beam.pypp.h" -#include "ParticleBuilder.pypp.h" -#include "FormFactorSphereUniformRadius.pypp.h" -#include "FTDistribution1DCauchy.pypp.h" #include "kvector_t.pypp.h" -#include "Crystal.pypp.h" +#include "FormFactorSphereUniformRadius.pypp.h" +#include "OffSpecSimulation.pypp.h" +#include "FormFactorRipple1.pypp.h" +#include "InterferenceFunction1DParaCrystal.pypp.h" +#include "Simulation.pypp.h" +#include "IObservable.pypp.h" +#include "FormFactorLorentz.pypp.h" #include "ISelectionRule.pypp.h" +#include "FormFactorRipple2.pypp.h" #include "StochasticDoubleGate.pypp.h" +#include "LayerRoughness.pypp.h" +#include "Bin1DCVector.pypp.h" +#include "FormFactorSphereGaussianRadius.pypp.h" +#include "ParameterPool.pypp.h" +#include "FormFactorPrism3.pypp.h" +#include "StochasticDoubleGaussian.pypp.h" +#include "IMaterial.pypp.h" +#include "FTDistribution1DVoigt.pypp.h" +#include "ResolutionFunction2DSimple.pypp.h" +#include "IntensityDataFunctions.pypp.h" +#include "FormFactorPrism6.pypp.h" +#include "IClusteredParticles.pypp.h" +#include "VariableBinAxis.pypp.h" +#include "DistributionCosine.pypp.h" +#include "FormFactorHemiEllipsoid.pypp.h" +#include "IAxis.pypp.h" #include "vector_integer_t.pypp.h" +#include "IntensityDataIOFactory.pypp.h" +#include "Layer.pypp.h" +#include "FormFactorPyramid.pypp.h" +#include "StochasticSampledParameter.pypp.h" +#include "CustomBinAxis.pypp.h" +#include "FTDistribution2DCone.pypp.h" +#include "IFTDistribution1D.pypp.h" +#include "DistributionLorentz.pypp.h" +#include "IDistribution1D.pypp.h" +#include "PositionParticleInfo.pypp.h" +#include "HomogeneousMagneticMaterial.pypp.h" +#include "FormFactorCuboctahedron.pypp.h" +#include "cvector_t.pypp.h" +#include "PythonInterface_free_functions.pypp.h" +#include "FormFactorSphereLogNormalRadius.pypp.h" +#include "FormFactorInfLongRipple1.pypp.h" +#include "IResolutionFunction2D.pypp.h" +#include "vector_IFormFactorPtr_t.pypp.h" +#include "FormFactorFullSphere.pypp.h" +#include "ParticleLayout.pypp.h" +#include "StochasticParameter_t.pypp.h" +#include "FormFactorBox.pypp.h" +#include "IParameterized.pypp.h" +#include "Lattice2DIFParameters.pypp.h" +#include "IFormFactorDecorator.pypp.h" +#include "InterferenceFunction1DLattice.pypp.h" +#include "ISample.pypp.h" +#include "ISampleBuilder.pypp.h" +#include "PythonInterface_global_variables.pypp.h" +#include "Beam.pypp.h" +#include "HomogeneousMaterial.pypp.h" +#include "ICloneable.pypp.h" +#include "ParticleCoreShell.pypp.h" +#include "FormFactorDecoratorDebyeWaller.pypp.h" +#include "MesoCrystal.pypp.h" +#include "Lattice1DIFParameters.pypp.h" +#include "IObserver.pypp.h" +#include "IntensityData.pypp.h" +#include "Lattice.pypp.h" +#include "IInterferenceFunction.pypp.h" +#include "ParticleInfo.pypp.h" +#include "Instrument.pypp.h" +#include "FormFactorInfLongBox.pypp.h" +#include "FormFactorCone.pypp.h" +#include "FTDistribution2DGauss.pypp.h" +#include "FormFactorTruncatedSphere.pypp.h" +#include "FTDistribution2DVoigt.pypp.h" +#include "FormFactorGauss.pypp.h" +#include "InterferenceFunction2DParaCrystal.pypp.h" +#include "Detector.pypp.h" +#include "FormFactorInfLongRipple2.pypp.h" +#include "LatticeBasis.pypp.h" +#include "ICompositeSample.pypp.h" +#include "Bin1D.pypp.h" +#include "DistributionLogNormal.pypp.h" +#include "IFTDistribution2D.pypp.h" #include "__call_policies.pypp.hpp" #include "__convenience.pypp.hpp" #include "__call_policies.pypp.hpp" diff --git a/Fit/PythonAPI/src/PythonModule.cpp b/Fit/PythonAPI/src/PythonModule.cpp index 9e316599b4c..ef8312b19c0 100644 --- a/Fit/PythonAPI/src/PythonModule.cpp +++ b/Fit/PythonAPI/src/PythonModule.cpp @@ -5,38 +5,38 @@ GCC_DIAG_OFF(missing-field-initializers) #include "boost/python.hpp" GCC_DIAG_ON(unused-parameter) GCC_DIAG_ON(missing-field-initializers) -#include "FitObject.pypp.h" -#include "IntensityFunctionLog.pypp.h" #include "IntensityFunctionSqrt.pypp.h" -#include "FitStrategyDefault.pypp.h" -#include "IChiSquaredModule.pypp.h" +#include "MinimizerFactory.pypp.h" +#include "IMinimizer.pypp.h" +#include "vector_string_t.pypp.h" +#include "SquaredFunctionSystematicError.pypp.h" +#include "IntensityNormalizer.pypp.h" +#include "IIntensityFunction.pypp.h" +#include "INamed.pypp.h" +#include "IntensityFunctionLog.pypp.h" +#include "FitSuiteParameters.pypp.h" #include "AttFitting.pypp.h" -#include "FitStrategyAdjustParameters.pypp.h" +#include "FitParameter.pypp.h" +#include "IntensityScaleAndShiftNormalizer.pypp.h" +#include "IChiSquaredModule.pypp.h" #include "FitStrategyAdjustMinimizer.pypp.h" -#include "ISquaredFunction.pypp.h" +#include "IFitStrategy.pypp.h" +#include "FitStrategyFixParameters.pypp.h" #include "SquaredFunctionGaussianError.pypp.h" -#include "IIntensityFunction.pypp.h" -#include "IntensityScaleAndShiftNormalizer.pypp.h" -#include "SquaredFunctionMeanSquaredError.pypp.h" -#include "FitSuiteParameters.pypp.h" -#include "IMinimizer.pypp.h" #include "IIntensityNormalizer.pypp.h" -#include "FitParameter.pypp.h" -#include "INamed.pypp.h" -#include "FitStrategyReleaseParameters.pypp.h" #include "FitSuite.pypp.h" -#include "IntensityNormalizer.pypp.h" -#include "FitStrategyFixParameters.pypp.h" -#include "FitSuiteObjects.pypp.h" -#include "SquaredFunctionSystematicError.pypp.h" -#include "MinimizerFactory.pypp.h" +#include "FitStrategyAdjustParameters.pypp.h" #include "ChiSquaredModule.pypp.h" -#include "SquaredFunctionSimError.pypp.h" #include "MinimizerOptions.pypp.h" -#include "AttLimits.pypp.h" #include "SquaredFunctionDefault.pypp.h" -#include "vector_string_t.pypp.h" -#include "IFitStrategy.pypp.h" +#include "SquaredFunctionMeanSquaredError.pypp.h" +#include "ISquaredFunction.pypp.h" +#include "FitStrategyDefault.pypp.h" +#include "AttLimits.pypp.h" +#include "FitObject.pypp.h" +#include "FitSuiteObjects.pypp.h" +#include "SquaredFunctionSimError.pypp.h" +#include "FitStrategyReleaseParameters.pypp.h" BOOST_PYTHON_MODULE(libBornAgainFit){ boost::python::docstring_options doc_options(true, true, false); -- GitLab