From 2d6ec5e1747ec4fd8a888cf4dae35cbfee8fa18f Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Fri, 2 Oct 2020 00:12:38 +0200 Subject: [PATCH] rm unused fct --- Core/Detector/IDetector2D.cpp | 7 -- Core/Detector/IDetector2D.h | 3 - auto/Wrap/doxygen_core.i | 107 ++++++++++++---------------- auto/Wrap/libBornAgainCore.py | 22 ++---- auto/Wrap/libBornAgainCore_wrap.cpp | 62 ++-------------- 5 files changed, 57 insertions(+), 144 deletions(-) diff --git a/Core/Detector/IDetector2D.cpp b/Core/Detector/IDetector2D.cpp index e8fd4d7502c..500a1f79c2b 100644 --- a/Core/Detector/IDetector2D.cpp +++ b/Core/Detector/IDetector2D.cpp @@ -41,13 +41,6 @@ void IDetector2D::setDetectorParameters(size_t n_x, double x_min, double x_max, addAxis(*createAxis(1, n_y, y_min, y_max)); } -void IDetector2D::setDetectorAxes(const IAxis& axis0, const IAxis& axis1) -{ - clear(); - addAxis(axis0); - addAxis(axis1); -} - const RegionOfInterest* IDetector2D::regionOfInterest() const { return m_region_of_interest.get(); diff --git a/Core/Detector/IDetector2D.h b/Core/Detector/IDetector2D.h index d64eea7eb1f..822e472a9eb 100644 --- a/Core/Detector/IDetector2D.h +++ b/Core/Detector/IDetector2D.h @@ -40,9 +40,6 @@ public: void setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max); - //! Sets detector parameters using axes - void setDetectorAxes(const IAxis& axis0, const IAxis& axis1); - //! Removes all masks from the detector void removeMasks(); diff --git a/auto/Wrap/doxygen_core.i b/auto/Wrap/doxygen_core.i index f35591954aa..e60f1a9c482 100644 --- a/auto/Wrap/doxygen_core.i +++ b/auto/Wrap/doxygen_core.i @@ -1427,12 +1427,6 @@ Set calculation flag (if it's false, zero intensity is assigned to the element) %feature("docstring") DepthProbeSimulation::DepthProbeSimulation "DepthProbeSimulation::DepthProbeSimulation() "; -%feature("docstring") DepthProbeSimulation::DepthProbeSimulation "DepthProbeSimulation::DepthProbeSimulation(const MultiLayer &sample) -"; - -%feature("docstring") DepthProbeSimulation::DepthProbeSimulation "DepthProbeSimulation::DepthProbeSimulation(const std::shared_ptr< ISampleBuilder > sample_builder) -"; - %feature("docstring") DepthProbeSimulation::~DepthProbeSimulation "DepthProbeSimulation::~DepthProbeSimulation() override "; @@ -2667,6 +2661,24 @@ Creates a new clipped axis. "; +// File: classFixedBuilder.xml +%feature("docstring") FixedBuilder " + +A trivial sample builder class that builds a fixed sample. + +C++ includes: FixedBuilder.h +"; + +%feature("docstring") FixedBuilder::FixedBuilder "FixedBuilder::FixedBuilder()=delete +"; + +%feature("docstring") FixedBuilder::FixedBuilder "FixedBuilder::FixedBuilder(const MultiLayer &) +"; + +%feature("docstring") FixedBuilder::buildSample "MultiLayer * FixedBuilder::buildSample() const +"; + + // File: classFootprintGauss.xml %feature("docstring") FootprintGauss " @@ -5562,12 +5574,6 @@ C++ includes: GISASSimulation.h %feature("docstring") GISASSimulation::GISASSimulation "GISASSimulation::GISASSimulation() "; -%feature("docstring") GISASSimulation::GISASSimulation "GISASSimulation::GISASSimulation(const MultiLayer &p_sample) -"; - -%feature("docstring") GISASSimulation::GISASSimulation "GISASSimulation::GISASSimulation(const std::shared_ptr< ISampleBuilder > p_sample_builder) -"; - %feature("docstring") GISASSimulation::~GISASSimulation "GISASSimulation::~GISASSimulation() "; @@ -6450,11 +6456,6 @@ C++ includes: IDetector2D.h Sets detector parameters using angle ranges. "; -%feature("docstring") IDetector2D::setDetectorAxes "void IDetector2D::setDetectorAxes(const IAxis &axis0, const IAxis &axis1) - -Sets detector parameters using axes. -"; - %feature("docstring") IDetector2D::removeMasks "void IDetector2D::removeMasks() Removes all masks from the detector. @@ -9525,7 +9526,7 @@ C++ includes: ISampleBuilder.h %feature("docstring") ISampleBuilder::buildSample "virtual MultiLayer* ISampleBuilder::buildSample() const =0 "; -%feature("docstring") ISampleBuilder::createSampleByIndex "virtual MultiLayer* ISampleBuilder::createSampleByIndex(size_t index) +%feature("docstring") ISampleBuilder::createSampleByIndex "virtual MultiLayer* ISampleBuilder::createSampleByIndex(size_t) "; %feature("docstring") ISampleBuilder::size "virtual size_t ISampleBuilder::size() @@ -11498,12 +11499,6 @@ C++ includes: OffSpecSimulation.h %feature("docstring") OffSpecSimulation::OffSpecSimulation "OffSpecSimulation::OffSpecSimulation() "; -%feature("docstring") OffSpecSimulation::OffSpecSimulation "OffSpecSimulation::OffSpecSimulation(const MultiLayer &p_sample) -"; - -%feature("docstring") OffSpecSimulation::OffSpecSimulation "OffSpecSimulation::OffSpecSimulation(const std::shared_ptr< class ISampleBuilder > p_sample_builder) -"; - %feature("docstring") OffSpecSimulation::~OffSpecSimulation "OffSpecSimulation::~OffSpecSimulation() final "; @@ -14545,7 +14540,7 @@ Retrieves a SampleBuilder from the registry, does the build, and returns the res // File: classSampleBuilderNode.xml %feature("docstring") SampleBuilderNode " -Enfolds MultiLayerBuilder to have it in INode tree. +Wraps an ISampleBuilder, and puts it in an INode tree. Used by SampleProvider. C++ includes: SampleBuilderNode.h "; @@ -14556,7 +14551,7 @@ C++ includes: SampleBuilderNode.h %feature("docstring") SampleBuilderNode::SampleBuilderNode "SampleBuilderNode::SampleBuilderNode(const SampleBuilderNode &other) "; -%feature("docstring") SampleBuilderNode::setSampleBuilder "void SampleBuilderNode::setSampleBuilder(builder_t sample_builder) +%feature("docstring") SampleBuilderNode::setSBN "void SampleBuilderNode::setSBN(const std::shared_ptr< ISampleBuilder > &sample_builder) Sets sample builder and borrows its parameters. "; @@ -14576,7 +14571,7 @@ Calls the INodeVisitor's visit method. Creates a multilayer using sample builder. "; -%feature("docstring") SampleBuilderNode::builder "SampleBuilderNode::builder_t SampleBuilderNode::builder() const +%feature("docstring") SampleBuilderNode::builder "std::shared_ptr< ISampleBuilder > SampleBuilderNode::builder() const Returns current sample builder. "; @@ -14720,7 +14715,7 @@ C++ includes: SampleLabelHandler.h // File: classSampleProvider.xml %feature("docstring") SampleProvider " -Gives access to the sample to simulate. Sample can come either directly from the user or from SampleBuilder. +Holds either a Sample, or a SampleBuilderNode (which holds an ISampleBuilder). Used in Simulation, which holds a SampleProvider member. C++ includes: SampleProvider.h "; @@ -14737,7 +14732,7 @@ C++ includes: SampleProvider.h %feature("docstring") SampleProvider::setSample "void SampleProvider::setSample(const MultiLayer &multilayer) "; -%feature("docstring") SampleProvider::setSampleBuilder "void SampleProvider::setSampleBuilder(const std::shared_ptr< ISampleBuilder > sample_builder) +%feature("docstring") SampleProvider::setBuilder "void SampleProvider::setBuilder(const std::shared_ptr< ISampleBuilder > &sample_builder) "; %feature("docstring") SampleProvider::sample "const MultiLayer * SampleProvider::sample() const @@ -15086,12 +15081,6 @@ C++ includes: Simulation.h %feature("docstring") Simulation::Simulation "Simulation::Simulation() "; -%feature("docstring") Simulation::Simulation "Simulation::Simulation(const MultiLayer &p_sample) -"; - -%feature("docstring") Simulation::Simulation "Simulation::Simulation(const std::shared_ptr< ISampleBuilder > p_sample_builder) -"; - %feature("docstring") Simulation::~Simulation "Simulation::~Simulation() "; @@ -15154,7 +15143,7 @@ The MultiLayer object will not be owned by the Simulation object. %feature("docstring") Simulation::sample "const MultiLayer * Simulation::sample() const "; -%feature("docstring") Simulation::setSampleBuilder "void Simulation::setSampleBuilder(const std::shared_ptr< ISampleBuilder > sample_builder) +%feature("docstring") Simulation::setSampleBuilder "void Simulation::setSampleBuilder(const std::shared_ptr< ISampleBuilder > &sample_builder) "; %feature("docstring") Simulation::setBackground "void Simulation::setBackground(const IBackground &bg) @@ -15232,12 +15221,6 @@ C++ includes: Simulation2D.h %feature("docstring") Simulation2D::Simulation2D "Simulation2D::Simulation2D() "; -%feature("docstring") Simulation2D::Simulation2D "Simulation2D::Simulation2D(const MultiLayer &p_sample) -"; - -%feature("docstring") Simulation2D::Simulation2D "Simulation2D::Simulation2D(const std::shared_ptr< ISampleBuilder > p_sample_builder) -"; - %feature("docstring") Simulation2D::~Simulation2D "Simulation2D::~Simulation2D() override "; @@ -16059,12 +16042,6 @@ C++ includes: SpecularSimulation.h %feature("docstring") SpecularSimulation::SpecularSimulation "SpecularSimulation::SpecularSimulation() "; -%feature("docstring") SpecularSimulation::SpecularSimulation "SpecularSimulation::SpecularSimulation(const MultiLayer &sample) -"; - -%feature("docstring") SpecularSimulation::SpecularSimulation "SpecularSimulation::SpecularSimulation(const std::shared_ptr< ISampleBuilder > sample_builder) -"; - %feature("docstring") SpecularSimulation::~SpecularSimulation "SpecularSimulation::~SpecularSimulation() override "; @@ -16942,10 +16919,10 @@ C++ includes: WavevectorInfo.h "; -// File: classConvolve_1_1Workspace.xml +// File: classFourierTransform_1_1Workspace.xml -// File: classFourierTransform_1_1Workspace.xml +// File: classConvolve_1_1Workspace.xml // File: classZLimits.xml @@ -17128,40 +17105,40 @@ C++ includes: ZLimits.h // File: namespace_0d498.xml -// File: namespace_0d504.xml +// File: namespace_0d506.xml -// File: namespace_0d516.xml +// File: namespace_0d518.xml -// File: namespace_0d539.xml +// File: namespace_0d541.xml -// File: namespace_0d547.xml +// File: namespace_0d549.xml -// File: namespace_0d553.xml +// File: namespace_0d555.xml -// File: namespace_0d555.xml +// File: namespace_0d557.xml -// File: namespace_0d571.xml +// File: namespace_0d573.xml -// File: namespace_0d583.xml +// File: namespace_0d585.xml -// File: namespace_0d589.xml +// File: namespace_0d591.xml -// File: namespace_0d593.xml +// File: namespace_0d595.xml -// File: namespace_0d611.xml +// File: namespace_0d613.xml -// File: namespace_0d630.xml +// File: namespace_0d632.xml // File: namespace_0d85.xml @@ -19905,6 +19882,12 @@ Creates averaged material. Square refractive index of returned material is arith // File: ScalarRTCoefficients_8h.xml +// File: FixedBuilder_8cpp.xml + + +// File: FixedBuilder_8h.xml + + // File: IRegistry_8h.xml diff --git a/auto/Wrap/libBornAgainCore.py b/auto/Wrap/libBornAgainCore.py index 33eedbf361f..e22fc889580 100644 --- a/auto/Wrap/libBornAgainCore.py +++ b/auto/Wrap/libBornAgainCore.py @@ -14011,7 +14011,7 @@ class ISampleBuilder(IParameterized): def createSampleByIndex(self, arg0): r""" createSampleByIndex(ISampleBuilder self, size_t arg0) -> MultiLayer - virtual MultiLayer* ISampleBuilder::createSampleByIndex(size_t index) + virtual MultiLayer* ISampleBuilder::createSampleByIndex(size_t) """ return _libBornAgainCore.ISampleBuilder_createSampleByIndex(self, arg0) @@ -17333,7 +17333,7 @@ class Simulation(ICloneable, INode): def setSampleBuilderCpp(self, sample_builder): r""" setSampleBuilderCpp(Simulation self, std::shared_ptr< ISampleBuilder > const & sample_builder) - void Simulation::setSampleBuilder(const std::shared_ptr< ISampleBuilder > sample_builder) + void Simulation::setSampleBuilder(const std::shared_ptr< ISampleBuilder > &sample_builder) """ return _libBornAgainCore.Simulation_setSampleBuilderCpp(self, sample_builder) @@ -17609,7 +17609,7 @@ class GISASSimulation(Simulation2D): def __init__(self): r""" __init__(GISASSimulation self) -> GISASSimulation - GISASSimulation::GISASSimulation(const std::shared_ptr< ISampleBuilder > p_sample_builder) + GISASSimulation::GISASSimulation() """ _libBornAgainCore.GISASSimulation_swiginit(self, _libBornAgainCore.new_GISASSimulation()) @@ -17685,7 +17685,7 @@ class DepthProbeSimulation(Simulation): def __init__(self): r""" __init__(DepthProbeSimulation self) -> DepthProbeSimulation - DepthProbeSimulation::DepthProbeSimulation(const std::shared_ptr< ISampleBuilder > sample_builder) + DepthProbeSimulation::DepthProbeSimulation() """ _libBornAgainCore.DepthProbeSimulation_swiginit(self, _libBornAgainCore.new_DepthProbeSimulation()) @@ -17788,7 +17788,7 @@ class SpecularSimulation(Simulation): def __init__(self): r""" __init__(SpecularSimulation self) -> SpecularSimulation - SpecularSimulation::SpecularSimulation(const std::shared_ptr< ISampleBuilder > sample_builder) + SpecularSimulation::SpecularSimulation() """ _libBornAgainCore.SpecularSimulation_swiginit(self, _libBornAgainCore.new_SpecularSimulation()) @@ -17896,7 +17896,7 @@ class OffSpecSimulation(Simulation2D): def __init__(self): r""" __init__(OffSpecSimulation self) -> OffSpecSimulation - OffSpecSimulation::OffSpecSimulation(const std::shared_ptr< class ISampleBuilder > p_sample_builder) + OffSpecSimulation::OffSpecSimulation() """ _libBornAgainCore.OffSpecSimulation_swiginit(self, _libBornAgainCore.new_OffSpecSimulation()) @@ -18510,16 +18510,6 @@ class IDetector2D(IDetector): """ return _libBornAgainCore.IDetector2D_setDetectorParameters(self, n_x, x_min, x_max, n_y, y_min, y_max) - def setDetectorAxes(self, axis0, axis1): - r""" - setDetectorAxes(IDetector2D self, IAxis axis0, IAxis axis1) - void IDetector2D::setDetectorAxes(const IAxis &axis0, const IAxis &axis1) - - Sets detector parameters using axes. - - """ - return _libBornAgainCore.IDetector2D_setDetectorAxes(self, axis0, axis1) - def removeMasks(self): r""" removeMasks(IDetector2D self) diff --git a/auto/Wrap/libBornAgainCore_wrap.cpp b/auto/Wrap/libBornAgainCore_wrap.cpp index a91c21eda72..d7df9df7dd9 100644 --- a/auto/Wrap/libBornAgainCore_wrap.cpp +++ b/auto/Wrap/libBornAgainCore_wrap.cpp @@ -104697,49 +104697,6 @@ fail: } -SWIGINTERN PyObject *_wrap_IDetector2D_setDetectorAxes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IDetector2D *arg1 = (IDetector2D *) 0 ; - IAxis *arg2 = 0 ; - IAxis *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - - if (!SWIG_Python_UnpackTuple(args, "IDetector2D_setDetectorAxes", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector2D, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector2D_setDetectorAxes" "', argument " "1"" of type '" "IDetector2D *""'"); - } - arg1 = reinterpret_cast< IDetector2D * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_IAxis, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector2D_setDetectorAxes" "', argument " "2"" of type '" "IAxis const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector2D_setDetectorAxes" "', argument " "2"" of type '" "IAxis const &""'"); - } - arg2 = reinterpret_cast< IAxis * >(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_IAxis, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IDetector2D_setDetectorAxes" "', argument " "3"" of type '" "IAxis const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector2D_setDetectorAxes" "', argument " "3"" of type '" "IAxis const &""'"); - } - arg3 = reinterpret_cast< IAxis * >(argp3); - (arg1)->setDetectorAxes((IAxis const &)*arg2,(IAxis const &)*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_IDetector2D_removeMasks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IDetector2D *arg1 = (IDetector2D *) 0 ; @@ -128092,7 +128049,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "ISampleBuilder_createSampleByIndex", _wrap_ISampleBuilder_createSampleByIndex, METH_VARARGS, "\n" "ISampleBuilder_createSampleByIndex(ISampleBuilder self, size_t arg0) -> MultiLayer\n" - "virtual MultiLayer* ISampleBuilder::createSampleByIndex(size_t index)\n" + "virtual MultiLayer* ISampleBuilder::createSampleByIndex(size_t)\n" "\n" ""}, { "ISampleBuilder_size", _wrap_ISampleBuilder_size, METH_O, "\n" @@ -129966,7 +129923,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "Simulation_setSampleBuilderCpp", _wrap_Simulation_setSampleBuilderCpp, METH_VARARGS, "\n" "Simulation_setSampleBuilderCpp(Simulation self, std::shared_ptr< ISampleBuilder > const & sample_builder)\n" - "void Simulation::setSampleBuilder(const std::shared_ptr< ISampleBuilder > sample_builder)\n" + "void Simulation::setSampleBuilder(const std::shared_ptr< ISampleBuilder > &sample_builder)\n" "\n" ""}, { "Simulation_setBackground", _wrap_Simulation_setBackground, METH_VARARGS, "\n" @@ -130145,7 +130102,7 @@ static PyMethodDef SwigMethods[] = { { "Simulation2D_swigregister", Simulation2D_swigregister, METH_O, NULL}, { "new_GISASSimulation", _wrap_new_GISASSimulation, METH_NOARGS, "\n" "new_GISASSimulation() -> GISASSimulation\n" - "GISASSimulation::GISASSimulation(const std::shared_ptr< ISampleBuilder > p_sample_builder)\n" + "GISASSimulation::GISASSimulation()\n" "\n" ""}, { "delete_GISASSimulation", _wrap_delete_GISASSimulation, METH_O, "\n" @@ -130197,7 +130154,7 @@ static PyMethodDef SwigMethods[] = { { "GISASSimulation_swiginit", GISASSimulation_swiginit, METH_VARARGS, NULL}, { "new_DepthProbeSimulation", _wrap_new_DepthProbeSimulation, METH_NOARGS, "\n" "new_DepthProbeSimulation() -> DepthProbeSimulation\n" - "DepthProbeSimulation::DepthProbeSimulation(const std::shared_ptr< ISampleBuilder > sample_builder)\n" + "DepthProbeSimulation::DepthProbeSimulation()\n" "\n" ""}, { "delete_DepthProbeSimulation", _wrap_delete_DepthProbeSimulation, METH_O, "\n" @@ -130263,7 +130220,7 @@ static PyMethodDef SwigMethods[] = { { "DepthProbeSimulation_swiginit", DepthProbeSimulation_swiginit, METH_VARARGS, NULL}, { "new_SpecularSimulation", _wrap_new_SpecularSimulation, METH_NOARGS, "\n" "new_SpecularSimulation() -> SpecularSimulation\n" - "SpecularSimulation::SpecularSimulation(const std::shared_ptr< ISampleBuilder > sample_builder)\n" + "SpecularSimulation::SpecularSimulation()\n" "\n" ""}, { "delete_SpecularSimulation", _wrap_delete_SpecularSimulation, METH_O, "\n" @@ -130329,7 +130286,7 @@ static PyMethodDef SwigMethods[] = { { "SpecularSimulation_swiginit", SpecularSimulation_swiginit, METH_VARARGS, NULL}, { "new_OffSpecSimulation", _wrap_new_OffSpecSimulation, METH_NOARGS, "\n" "new_OffSpecSimulation() -> OffSpecSimulation\n" - "OffSpecSimulation::OffSpecSimulation(const std::shared_ptr< class ISampleBuilder > p_sample_builder)\n" + "OffSpecSimulation::OffSpecSimulation()\n" "\n" ""}, { "delete_OffSpecSimulation", _wrap_delete_OffSpecSimulation, METH_O, "\n" @@ -130671,13 +130628,6 @@ static PyMethodDef SwigMethods[] = { "Sets detector parameters using angle ranges. \n" "\n" ""}, - { "IDetector2D_setDetectorAxes", _wrap_IDetector2D_setDetectorAxes, METH_VARARGS, "\n" - "IDetector2D_setDetectorAxes(IDetector2D self, IAxis axis0, IAxis axis1)\n" - "void IDetector2D::setDetectorAxes(const IAxis &axis0, const IAxis &axis1)\n" - "\n" - "Sets detector parameters using axes. \n" - "\n" - ""}, { "IDetector2D_removeMasks", _wrap_IDetector2D_removeMasks, METH_O, "\n" "IDetector2D_removeMasks(IDetector2D self)\n" "void IDetector2D::removeMasks()\n" -- GitLab