From 7690d12b0d1e22336081c67eab3b584964eb0577 Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Sat, 3 Apr 2021 18:15:26 +0200
Subject: [PATCH] missing files

---
 .../process/BoundaryCrossingProcess.hpp       | 45 +++++++++++
 .../framework/process/ContinuousProcess.hpp   | 74 ++++++++++++++++++
 .../detail/framework/process/DecayProcess.hpp | 75 +++++++++++++++++++
 .../framework/process/SecondariesProcess.hpp  | 45 +++++++++++
 .../detail/framework/process/StackProcess.hpp | 48 ++++++++++++
 5 files changed, 287 insertions(+)
 create mode 100644 corsika/detail/framework/process/BoundaryCrossingProcess.hpp
 create mode 100644 corsika/detail/framework/process/ContinuousProcess.hpp
 create mode 100644 corsika/detail/framework/process/DecayProcess.hpp
 create mode 100644 corsika/detail/framework/process/SecondariesProcess.hpp
 create mode 100644 corsika/detail/framework/process/StackProcess.hpp

diff --git a/corsika/detail/framework/process/BoundaryCrossingProcess.hpp b/corsika/detail/framework/process/BoundaryCrossingProcess.hpp
new file mode 100644
index 000000000..caf268523
--- /dev/null
+++ b/corsika/detail/framework/process/BoundaryCrossingProcess.hpp
@@ -0,0 +1,45 @@
+/*
+ * (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#pragma once
+
+#include <corsika/framework/process/ProcessTraits.hpp>
+
+namespace corsika {
+
+  // test for doBoundaryCrossing method
+  
+  template <class TProcess, typename TReturn, typename... TArg>
+  struct has_method_doBoundaryCrossing : public detail::has_method_signature<TReturn, TArg...> {
+
+    using detail::has_method_signature<TReturn, TArg...>::testSignature;
+
+    // the default value
+    template <class T>
+    static std::false_type test(...);
+
+    // templated parameter option
+    template <class T>
+    static decltype(testSignature(&T::template doBoundaryCrossing<TArg...>)) test(
+        std::nullptr_t);
+
+    // non templated parameter option
+    template <class T>
+    static decltype(testSignature(&T::doBoundaryCrossing)) test(std::nullptr_t);
+
+  public:
+    using type = decltype(test<std::decay_t<TProcess>>(nullptr));
+    static const bool value = type::value;
+  };
+
+  template <class TProcess, typename TReturn, typename... TArg>
+  bool constexpr has_method_doBoundaryCrossing_v =
+    has_method_doBoundaryCrossing<TProcess, TReturn, TArg...>::value;
+
+
+} // namespace corsika
diff --git a/corsika/detail/framework/process/ContinuousProcess.hpp b/corsika/detail/framework/process/ContinuousProcess.hpp
new file mode 100644
index 000000000..c91805914
--- /dev/null
+++ b/corsika/detail/framework/process/ContinuousProcess.hpp
@@ -0,0 +1,74 @@
+/*
+ * (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#pragma once
+
+#include <corsika/framework/process/ProcessTraits.hpp>
+
+namespace corsika {
+
+  // test for doContinuous method
+  
+  template <class TProcess, typename TReturn, typename TArg1, typename TArg2>
+  struct has_method_doContinuous : public detail::has_method_signature<TReturn, TArg1, TArg2, bool> {
+
+    using detail::has_method_signature<TReturn, TArg1, TArg2, bool>::testSignature;
+
+    // the default value
+    template <class T>
+    static std::false_type test(...);
+
+    // templated parameter option
+    template <class T>
+    static decltype(testSignature(&T::template doContinuous<TArg1, TArg2>)) test(
+        std::nullptr_t);
+
+    // non templated parameter option
+    template <class T>
+    static decltype(testSignature(&T::doContinuous)) test(std::nullptr_t);
+
+  public:
+    using type = decltype(test<std::decay_t<TProcess>>(nullptr));
+    static const bool value = type::value;
+  };
+
+  template <class TProcess, typename TReturn, typename TArg1, typename TArg2>
+  bool constexpr has_method_doContinuous_v =
+    has_method_doContinuous<TProcess, TReturn, TArg1, TArg2>::value;
+
+  // test for getMaxStepLength method
+  
+  template <class TProcess, typename TReturn, typename... TArgs>
+  struct has_method_getMaxStepLength
+      : public detail::has_method_signature<TReturn, TArgs...> {
+
+    using detail::has_method_signature<TReturn, TArgs...>::testSignature;
+
+    // the default value
+    template <class T>
+    static std::false_type test(...);
+
+    // templated option
+    template <class T>
+    static decltype(testSignature(&T::template getMaxStepLength<TArgs...>)) test(
+        std::nullptr_t);
+
+    // non templated option
+    template <class T>
+    static decltype(testSignature(&T::getMaxStepLength)) test(std::nullptr_t);
+
+  public:
+    using type = decltype(test<std::decay_t<TProcess>>(nullptr));
+    static const bool value = type::value;
+  };
+
+  template <class TProcess, typename TReturn, typename... TArgs>
+  bool constexpr has_method_getMaxStepLength_v =
+      has_method_getMaxStepLength<TProcess, TReturn, TArgs...>::value;
+
+} // namespace corsika
diff --git a/corsika/detail/framework/process/DecayProcess.hpp b/corsika/detail/framework/process/DecayProcess.hpp
new file mode 100644
index 000000000..661d0aeb1
--- /dev/null
+++ b/corsika/detail/framework/process/DecayProcess.hpp
@@ -0,0 +1,75 @@
+/*
+ * (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#pragma once
+
+#include <corsika/framework/process/ProcessTraits.hpp>
+
+namespace corsika {
+
+  // doDecay
+  
+  template <class TProcess, typename TReturn, typename... TArgs>
+  struct has_method_doDecay : public detail::has_method_signature<TReturn, TArgs...> {
+
+    typedef std::decay_t<TProcess> process_type;
+    
+    using detail::has_method_signature<TReturn, TArgs...>::testSignature;
+
+    // the default value
+    template <class T>
+    static std::false_type test(...);
+
+    // signature of templated method
+    template <class T>
+    static decltype(testSignature(&T::template doDecay<TArgs...>)) test(
+        std::nullptr_t);
+    
+    // signature of non-templated method
+    template <class T>
+    static decltype(testSignature(&T::doDecay)) test(std::nullptr_t);
+
+  public:
+    using type = decltype(test<process_type>(nullptr));
+    static const bool value = type::value;
+  };
+
+  template <class TProcess, typename TReturn, typename... TArgs>
+  bool constexpr has_method_doDecay_v =
+      has_method_doDecay<TProcess, TReturn, TArgs...>::value;
+
+
+  // getLifetime
+  
+  template <class TProcess, typename TReturn, typename... TArgs>
+  struct has_method_getLifetime
+      : public detail::has_method_signature<TReturn, TArgs...> {
+
+    using detail::has_method_signature<TReturn, TArgs...>::testSignature;
+
+    // the default value
+    template <class T>
+    static std::false_type test(...);
+
+    template <class T>
+    static decltype(testSignature(&T::template getLifetime<TArgs...>)) test(
+        std::nullptr_t);
+
+    template <class T>
+    static decltype(testSignature(&T::getLifetime)) test(std::nullptr_t);
+
+  public:
+    using type = decltype(test<std::decay_t<TProcess>>(nullptr));
+    static const bool value = type::value;
+  };
+
+  template <class TProcess, typename TReturn, typename... TArgs>
+  bool constexpr has_method_getLifetime_v =
+      has_method_getLifetime<TProcess, TReturn, TArgs...>::value;
+
+} // namespace corsika
diff --git a/corsika/detail/framework/process/SecondariesProcess.hpp b/corsika/detail/framework/process/SecondariesProcess.hpp
new file mode 100644
index 000000000..26990ce68
--- /dev/null
+++ b/corsika/detail/framework/process/SecondariesProcess.hpp
@@ -0,0 +1,45 @@
+/*
+ * (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#pragma once
+
+#include <corsika/framework/process/ProcessTraits.hpp>
+
+namespace corsika {
+
+  // test for doSecondaries method
+  
+  template <class TProcess, typename TReturn, typename... TArg>
+  struct has_method_doSecondaries : public detail::has_method_signature<TReturn, TArg...> {
+
+    using detail::has_method_signature<TReturn, TArg...>::testSignature;
+
+    // the default value
+    template <class T>
+    static std::false_type test(...);
+
+    // templated parameter option
+    template <class T>
+    static decltype(testSignature(&T::template doSecondaries<TArg...>)) test(
+        std::nullptr_t);
+
+    // non templated parameter option
+    template <class T>
+    static decltype(testSignature(&T::doSecondaries)) test(std::nullptr_t);
+
+  public:
+    using type = decltype(test<std::decay_t<TProcess>>(nullptr));
+    static const bool value = type::value;
+  };
+
+  template <class TProcess, typename TReturn, typename... TArg>
+  bool constexpr has_method_doSecondaries_v =
+    has_method_doSecondaries<TProcess, TReturn, TArg...>::value;
+
+
+} // namespace corsika
diff --git a/corsika/detail/framework/process/StackProcess.hpp b/corsika/detail/framework/process/StackProcess.hpp
new file mode 100644
index 000000000..1eea73409
--- /dev/null
+++ b/corsika/detail/framework/process/StackProcess.hpp
@@ -0,0 +1,48 @@
+/*
+ * (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#pragma once
+
+#include <corsika/framework/process/ProcessTraits.hpp>
+
+namespace corsika {
+
+  // test method doStack
+  
+  template <class TProcess, typename TReturn, typename... TArgs>
+  struct has_method_doStack : public detail::has_method_signature<TReturn, TArgs...> {
+
+    using detail::has_method_signature<TReturn, TArgs...>::testSignature;
+
+    // the default value
+    template <class T>
+    static std::false_type test(...);
+    
+    // templated parameter option
+    template <class T>
+    static decltype(testSignature(&T::template doStack<TArgs...>)) test(
+        std::nullptr_t);
+
+    // non-templated parameter option
+    template <template <typename> typename T>
+    static decltype(testSignature(&T<TArgs...>::template doStack)) test(
+        std::nullptr_t);
+
+    template <class T>
+    static decltype(testSignature(&T::doStack)) test(std::nullptr_t);
+
+  public:
+    using type = decltype(test<std::decay_t<TProcess>>(nullptr));
+    static const bool value = type::value;
+  };
+
+  template <class TProcess, typename TReturn, typename... TArgs>
+  bool constexpr has_method_doStack_v =
+      has_method_doStack<TProcess, TReturn, TArgs...>::value;
+
+} // namespace corsika
-- 
GitLab