IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 7690d12b authored by ralfulrich's avatar ralfulrich Committed by Ralf Ulrich
Browse files

missing files

parent 6442c68b
No related branches found
No related tags found
No related merge requests found
/*
* (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
/*
* (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
/*
* (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
/*
* (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
/*
* (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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment