From 22defddfb547c395567117f7cc922be7719670df Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Wed, 25 Nov 2020 11:45:45 +0100
Subject: [PATCH] mv exporter fcts to Core/Export

---
 Core/Export/PyFmt2.cpp                        |  2 +-
 {Param/Varia => Core/Export}/PyFmtLimits.cpp  |  4 +--
 {Param/Varia => Core/Export}/PyFmtLimits.h    |  2 +-
 Core/Export/SimulationToPython.cpp            |  2 +-
 .../ExportToPython/PythonFormattingTest.cpp   |  2 +-
 auto/Wrap/doxygenCore.i                       | 36 +++++++++++++------
 6 files changed, 32 insertions(+), 16 deletions(-)
 rename {Param/Varia => Core/Export}/PyFmtLimits.cpp (96%)
 rename {Param/Varia => Core/Export}/PyFmtLimits.h (96%)

diff --git a/Core/Export/PyFmt2.cpp b/Core/Export/PyFmt2.cpp
index 02470d102db..00227beb568 100644
--- a/Core/Export/PyFmt2.cpp
+++ b/Core/Export/PyFmt2.cpp
@@ -28,7 +28,7 @@
 #include "Param/Distrib/Distributions.h"
 #include "Param/Distrib/ParameterDistribution.h"
 #include "Param/Distrib/RangedDistributions.h"
-#include "Param/Varia/PyFmtLimits.h"
+#include "Core/Export/PyFmtLimits.h"
 #include <iomanip>
 
 namespace pyfmt2 {
diff --git a/Param/Varia/PyFmtLimits.cpp b/Core/Export/PyFmtLimits.cpp
similarity index 96%
rename from Param/Varia/PyFmtLimits.cpp
rename to Core/Export/PyFmtLimits.cpp
index 816dd668215..dbfb64c6058 100644
--- a/Param/Varia/PyFmtLimits.cpp
+++ b/Core/Export/PyFmtLimits.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit scattering at grazing incidence
 //
-//! @file      Param/Varia/PyFmtLimits.cpp
+//! @file      Core/Export/PyFmtLimits.cpp
 //! @brief     Implements functions from namespace pyfmt.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "Param/Varia/PyFmtLimits.h"
+#include "Core/Export/PyFmtLimits.h"
 #include "Base/Utils/PyFmt.h"
 #include "Fit/Param/RealLimits.h"
 #include <iomanip>
diff --git a/Param/Varia/PyFmtLimits.h b/Core/Export/PyFmtLimits.h
similarity index 96%
rename from Param/Varia/PyFmtLimits.h
rename to Core/Export/PyFmtLimits.h
index 4ffd3ebd634..60cd8181a99 100644
--- a/Param/Varia/PyFmtLimits.h
+++ b/Core/Export/PyFmtLimits.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit scattering at grazing incidence
 //
-//! @file      Param/Varia/PyFmtLimits.h
+//! @file      Core/Export/PyFmtLimits.h
 //! @brief     Defines functions in namespace pyfmt.
 //!
 //! @homepage  http://www.bornagainproject.org
diff --git a/Core/Export/SimulationToPython.cpp b/Core/Export/SimulationToPython.cpp
index 71c0b8bdbb3..05d5b0ee968 100644
--- a/Core/Export/SimulationToPython.cpp
+++ b/Core/Export/SimulationToPython.cpp
@@ -36,7 +36,7 @@
 #include "Device/Resolution/ScanResolution.h"
 #include "Param/Distrib/RangedDistributions.h"
 #include "Param/Varia/ParameterUtils.h"
-#include "Param/Varia/PyFmtLimits.h"
+#include "Core/Export/PyFmtLimits.h"
 #include <iomanip>
 
 using pyfmt::indent;
diff --git a/Tests/UnitTests/Core/ExportToPython/PythonFormattingTest.cpp b/Tests/UnitTests/Core/ExportToPython/PythonFormattingTest.cpp
index ba9615b9035..13e2632f2f1 100644
--- a/Tests/UnitTests/Core/ExportToPython/PythonFormattingTest.cpp
+++ b/Tests/UnitTests/Core/ExportToPython/PythonFormattingTest.cpp
@@ -5,7 +5,7 @@
 #include "Core/Export/PyFmt2.h"
 #include "Param/Distrib/Distributions.h"
 #include "Param/Distrib/ParameterDistribution.h"
-#include "Param/Varia/PyFmtLimits.h"
+#include "Core/Export/PyFmtLimits.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class PythonFormattingTest : public ::testing::Test {};
diff --git a/auto/Wrap/doxygenCore.i b/auto/Wrap/doxygenCore.i
index 9a80bf6237f..602f878b6db 100644
--- a/auto/Wrap/doxygenCore.i
+++ b/auto/Wrap/doxygenCore.i
@@ -2303,40 +2303,40 @@ Returns default units to convert to.
 // File: namespace_0d19.xml
 
 
-// File: namespace_0d37.xml
+// File: namespace_0d39.xml
 
 
-// File: namespace_0d42.xml
-
-
-// File: namespace_0d51.xml
+// File: namespace_0d44.xml
 
 
 // File: namespace_0d53.xml
 
 
-// File: namespace_0d57.xml
+// File: namespace_0d55.xml
 
 
 // File: namespace_0d59.xml
 
 
-// File: namespace_0d64.xml
+// File: namespace_0d61.xml
 
 
 // File: namespace_0d66.xml
 
 
-// File: namespace_0d70.xml
+// File: namespace_0d68.xml
 
 
-// File: namespace_0d80.xml
+// File: namespace_0d72.xml
 
 
 // File: namespace_0d82.xml
 
 
-// File: namespace_0d88.xml
+// File: namespace_0d84.xml
+
+
+// File: namespace_0d90.xml
 
 
 // File: namespaceExportToPython.xml
@@ -2408,6 +2408,16 @@ Returns default metric name.
 ";
 
 
+// File: namespacepyfmt.xml
+%feature("docstring")  pyfmt::printRealLimits "std::string pyfmt::printRealLimits(const RealLimits &limits, const std::string &units)
+";
+
+%feature("docstring")  pyfmt::printRealLimitsArg "std::string pyfmt::printRealLimitsArg(const RealLimits &limits, const std::string &units)
+
+Prints RealLimits in the form of argument (in the context of ParameterDistribution and similar). Default RealLimits will not be printed, any other will be printed as \", ba.RealLimits.limited(1*deg, 2*deg)\" 
+";
+
+
 // File: namespacepyfmt2.xml
 %feature("docstring")  pyfmt2::representShape2D "std::string pyfmt2::representShape2D(const std::string &indent, const IShape2D *ishape, bool mask_value, std::function< std::string(double)> printValueFunc)
 
@@ -2733,6 +2743,12 @@ Helper factory function to use in  GISASSimulation. Depending on the type of det
 // File: PyFmt2_8h.xml
 
 
+// File: PyFmtLimits_8cpp.xml
+
+
+// File: PyFmtLimits_8h.xml
+
+
 // File: SampleLabelHandler_8cpp.xml
 
 
-- 
GitLab