From f18a5df22dc1581166d42e4054fcc2f2a9118827 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Wed, 28 Jul 2021 21:50:20 +0200 Subject: [PATCH] mv src to Base/Element --- {Core => Base}/Element/DepthProbeElement.cpp | 14 ++------------ {Core => Base}/Element/DepthProbeElement.h | 12 +++++------- Core/Computation/DepthProbeComputation.cpp | 2 +- Core/Simulation/DepthProbeSimulation.h | 2 +- Tests/Unit/Core/DepthProbeElementTest.cpp | 2 +- auto/Wrap/doxygenCore.i | 2 +- 6 files changed, 11 insertions(+), 23 deletions(-) rename {Core => Base}/Element/DepthProbeElement.cpp (79%) rename {Core => Base}/Element/DepthProbeElement.h (87%) diff --git a/Core/Element/DepthProbeElement.cpp b/Base/Element/DepthProbeElement.cpp similarity index 79% rename from Core/Element/DepthProbeElement.cpp rename to Base/Element/DepthProbeElement.cpp index 594be8636b8..ec3e318b074 100644 --- a/Core/Element/DepthProbeElement.cpp +++ b/Base/Element/DepthProbeElement.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Core/Element/DepthProbeElement.cpp +//! @file Base/Element/DepthProbeElement.cpp //! @brief Implements class DepthProbeElement. //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "Core/Element/DepthProbeElement.h" +#include "Base/Element/DepthProbeElement.h" #include "Base/Axis/IAxis.h" #include "Base/Vector/Direction.h" @@ -31,16 +31,6 @@ DepthProbeElement::DepthProbeElement(double wavelength, double alpha_i, const IA m_intensities.resize(z_positions->size(), 0.0); } -DepthProbeElement::DepthProbeElement(const DepthProbeElement& other) - : IElement(PolarizerPair()) - , m_wavelength(other.m_wavelength) - , m_alpha_i(other.m_alpha_i) - , m_intensities(other.m_intensities) - , m_z_positions(other.m_z_positions) - , m_calculation_flag(other.m_calculation_flag) -{ -} - DepthProbeElement::DepthProbeElement(DepthProbeElement&& other) noexcept : IElement(PolarizerPair()) , m_wavelength(other.m_wavelength) diff --git a/Core/Element/DepthProbeElement.h b/Base/Element/DepthProbeElement.h similarity index 87% rename from Core/Element/DepthProbeElement.h rename to Base/Element/DepthProbeElement.h index 326eaaebdea..5be71d58400 100644 --- a/Core/Element/DepthProbeElement.h +++ b/Base/Element/DepthProbeElement.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file Core/Element/DepthProbeElement.h +//! @file Base/Element/DepthProbeElement.h //! @brief Defines class DepthProbeElement. //! //! @homepage http://www.bornagainproject.org @@ -17,8 +17,8 @@ #endif #ifndef USER_API -#ifndef BORNAGAIN_CORE_ELEMENT_DEPTHPROBEELEMENT_H -#define BORNAGAIN_CORE_ELEMENT_DEPTHPROBEELEMENT_H +#ifndef BORNAGAIN_BASE_ELEMENT_DEPTHPROBEELEMENT_H +#define BORNAGAIN_BASE_ELEMENT_DEPTHPROBEELEMENT_H #include "Base/Element/IElement.h" #include "Base/Vector/Vectors3D.h" @@ -29,13 +29,11 @@ class IAxis; class DepthProbeElement : public IElement { public: DepthProbeElement(double wavelength, double alpha_i, const IAxis* z_positions); - DepthProbeElement(const DepthProbeElement& other); + DepthProbeElement(const DepthProbeElement& other) = delete; DepthProbeElement(DepthProbeElement&& other) noexcept; ~DepthProbeElement(); - DepthProbeElement& operator=(const DepthProbeElement& other) = delete; - double wavelength() const { return m_wavelength; } double getAlphaI() const { return m_alpha_i; } kvector_t getKi() const; @@ -66,5 +64,5 @@ private: bool m_calculation_flag; }; -#endif // BORNAGAIN_CORE_ELEMENT_DEPTHPROBEELEMENT_H +#endif // BORNAGAIN_BASE_ELEMENT_DEPTHPROBEELEMENT_H #endif // USER_API diff --git a/Core/Computation/DepthProbeComputation.cpp b/Core/Computation/DepthProbeComputation.cpp index 470fb5261dd..858a2aeb5df 100644 --- a/Core/Computation/DepthProbeComputation.cpp +++ b/Core/Computation/DepthProbeComputation.cpp @@ -16,7 +16,7 @@ #include "Base/Axis/IAxis.h" #include "Base/Progress/ProgressHandler.h" #include "Base/Utils/Assert.h" -#include "Core/Element/DepthProbeElement.h" +#include "Base/Element/DepthProbeElement.h" #include "Resample/Flux/ScalarFlux.h" #include "Resample/Processed/ProcessedSample.h" diff --git a/Core/Simulation/DepthProbeSimulation.h b/Core/Simulation/DepthProbeSimulation.h index 16dc306e62b..8313c6df983 100644 --- a/Core/Simulation/DepthProbeSimulation.h +++ b/Core/Simulation/DepthProbeSimulation.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_CORE_SIMULATION_DEPTHPROBESIMULATION_H #define BORNAGAIN_CORE_SIMULATION_DEPTHPROBESIMULATION_H -#include "Core/Element/DepthProbeElement.h" +#include "Base/Element/DepthProbeElement.h" #include "Core/Simulation/ISimulation.h" #include <vector> diff --git a/Tests/Unit/Core/DepthProbeElementTest.cpp b/Tests/Unit/Core/DepthProbeElementTest.cpp index e9bc5e86f6c..25091838f52 100644 --- a/Tests/Unit/Core/DepthProbeElementTest.cpp +++ b/Tests/Unit/Core/DepthProbeElementTest.cpp @@ -1,4 +1,4 @@ -#include "Core/Element/DepthProbeElement.h" +#include "Base/Element/DepthProbeElement.h" #include "Base/Axis/FixedBinAxis.h" #include "Base/Vector/Direction.h" #include "Tests/GTestWrapper/google_test.h" diff --git a/auto/Wrap/doxygenCore.i b/auto/Wrap/doxygenCore.i index 7874c81236d..a73d04d12b0 100644 --- a/auto/Wrap/doxygenCore.i +++ b/auto/Wrap/doxygenCore.i @@ -302,7 +302,7 @@ C++ includes: DepthProbeComputation.h %feature("docstring") DepthProbeElement::DepthProbeElement "DepthProbeElement::DepthProbeElement(double wavelength, double alpha_i, const IAxis *z_positions) "; -%feature("docstring") DepthProbeElement::DepthProbeElement "DepthProbeElement::DepthProbeElement(const DepthProbeElement &other) +%feature("docstring") DepthProbeElement::DepthProbeElement "DepthProbeElement::DepthProbeElement(const DepthProbeElement &other)=delete "; %feature("docstring") DepthProbeElement::DepthProbeElement "DepthProbeElement::DepthProbeElement(DepthProbeElement &&other) noexcept -- GitLab