From 2e4a8c532d6c7360aea3a6b60bc4aa682ddded00 Mon Sep 17 00:00:00 2001
From: Gennady Pospelov <g.pospelov@fz-juelich.de>
Date: Mon, 29 Jul 2013 18:15:44 +0200
Subject: [PATCH] Version number moved in Core

---
 App/App.pro                             |  1 -
 App/src/main.cpp                        |  2 +-
 Core/Core.pro                           |  3 ++-
 Core/PythonAPI/inc/PythonCoreList.h     |  1 +
 {App => Core/Samples}/inc/Version.h     | 27 +++++++++++++++++++++----
 dev-tools/python-bindings/MakePyCore.py |  2 +-
 6 files changed, 28 insertions(+), 8 deletions(-)
 rename {App => Core/Samples}/inc/Version.h (59%)

diff --git a/App/App.pro b/App/App.pro
index 9c654cb1517..e35e6e81229 100644
--- a/App/App.pro
+++ b/App/App.pro
@@ -147,7 +147,6 @@ HEADERS += \
     inc/TestSpecularMatrix.h \
     inc/TestToySimulation.h \
     inc/TreeEventStructure.h \
-    inc/Version.h \
     inc/TestBugs.h
 
 myIncludes = $$PWD/inc \
diff --git a/App/src/main.cpp b/App/src/main.cpp
index 185ff88ff19..6a6815ea852 100644
--- a/App/src/main.cpp
+++ b/App/src/main.cpp
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
     Utils::EnableFloatingPointExceptions();
 
     std::cout << AppVersion::g_app_name << " "
-              << AppVersion::g_app_version_number << std::endl;
+              << AppVersion::GetVersionNumber() << std::endl;
 
     FunctionalTestFactory test_factory;
     RegisterFunctionalTests(&test_factory);
diff --git a/Core/Core.pro b/Core/Core.pro
index 8b03c8cb797..9a4a87c85be 100644
--- a/Core/Core.pro
+++ b/Core/Core.pro
@@ -302,7 +302,8 @@ HEADERS += \
     StandardSamples/IsGISAXS06Builder.h \
     StandardSamples/IsGISAXS09Builder.h \
     Algorithms/inc/LayerStrategyBuilder.h \
-    Algorithms/inc/DecoratedLayerDWBASimulation.h
+    Algorithms/inc/DecoratedLayerDWBASimulation.h \
+    Samples/inc/Version.h
 
 contains(CONFIG, BORNAGAIN_PYTHON) {
    include($$PWD/python_module.pri)
diff --git a/Core/PythonAPI/inc/PythonCoreList.h b/Core/PythonAPI/inc/PythonCoreList.h
index 73aa060f44d..d4954d3339c 100644
--- a/Core/PythonAPI/inc/PythonCoreList.h
+++ b/Core/PythonAPI/inc/PythonCoreList.h
@@ -79,6 +79,7 @@
 #include "StochasticSampledParameter.h"
 #include "Types.h"
 #include "Units.h"
+#include "Version.h"
 
 //! file containig additional exposers
 #include "PythonCoreExposer.h"
diff --git a/App/inc/Version.h b/Core/Samples/inc/Version.h
similarity index 59%
rename from App/inc/Version.h
rename to Core/Samples/inc/Version.h
index 0f580d264a3..4554463d479 100644
--- a/App/inc/Version.h
+++ b/Core/Samples/inc/Version.h
@@ -1,5 +1,5 @@
 // ************************************************************************** //
-//                                                                         
+//
 //  BornAgain: simulate and fit scattering at grazing incidence
 //
 //! @file      App/inc/Version.h
@@ -16,11 +16,30 @@
 #ifndef VERSION_H_
 #define VERSION_H_
 
+#include <string>
+#include <sstream>
+
 namespace AppVersion {
-    const std::string g_app_name = "Born Again Functional tests";
-    const std::string g_app_version_number = "v0.8.1";
+    const std::string g_app_name = "Born Again";
+    const int major_version_number = 0;
+    const int minor_version_number = 8;
+    const int patch_version_number = 2;
+
+    std::string GetVersionNumber()
+    {
+        std::ostringstream ostr;
+        ostr << major_version_number
+             << "."
+             << minor_version_number
+             << "."
+             << patch_version_number ;
+
+        return ostr.str();
+    }
+
 }
 
-#endif /* VERSION_H_ */
 
 
+#endif /* VERSION_H_ */
+
diff --git a/dev-tools/python-bindings/MakePyCore.py b/dev-tools/python-bindings/MakePyCore.py
index 674544cafbb..5b23a803494 100644
--- a/dev-tools/python-bindings/MakePyCore.py
+++ b/dev-tools/python-bindings/MakePyCore.py
@@ -211,7 +211,7 @@ def ManualClassTunings(mb):
     for fun in cl.member_functions():
         if fun.name == "setMaterial":fun.include()
     for fun in cl.member_functions():
-        print "XXX", fun
+        if("void ( ::Layer::* )( ::IDecoration * )" in fun.decl_string): fun.exclude()
     cl.constructors().include() # including back constructors with pointers
     #
     cl = mb.class_("Simulation")
-- 
GitLab