IAP GITLAB

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

missing files

parent 64059505
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>
#include <corsika/framework/utility/HasMethodSignature.hpp>
/**
* @file CascadeEquationsProcess.hpp
*/
namespace corsika {
/**
* traits test for CascadeEquationsProcess::doCascadeEquations method.
*/
template <class TProcess, typename TReturn, typename... TArg>
struct has_method_doCascadeEquations
: public detail::has_method_signature<TReturn, TArg...> {
//! method signature
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 doCascadeEquations<TArg...>)) test(
std::nullptr_t);
//! non templated parameter option
template <class T>
static decltype(testSignature(&T::doCascadeEquations)) test(std::nullptr_t);
public:
/**
* @name traits results
* @{
*/
using type = decltype(test<std::decay_t<TProcess>>(nullptr));
static const bool value = type::value;
//! @}
};
/**
* value traits type.
*/
template <class TProcess, typename TReturn, typename... TArg>
bool constexpr has_method_doCascadeEquations_v =
has_method_doCascadeEquations<TProcess, TReturn, TArg...>::value;
} // namespace corsika
/*
* (c) Copyright 2020 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/BaseProcess.hpp>
#include <corsika/framework/core/PhysicalUnits.hpp>
#include <corsika/detail/framework/process/CascadeEquationsProcess.hpp> // for extra traits, method/interface checking
namespace corsika {
/**
* @ingroup Processes
* @{
*
* Processes executing cascade-equations calculations.
*
* Create a new CascadeEquationsProcess, e.g. for XYModel, via:
* @code{.cpp}
* class XYModel : public CascadeEquationsProcess<XYModel> {};
* @endcode
*
* and provide the necessary interface method:
* @code{.cpp}
* template <typename TStack>
* void doCascadeEquations(TStack& stack);
* @endcode
*
* Cascade equation processes may generate new particles on the stack. They also
* typically generate output.
*/
template <typename TDerived>
class CascadeEquationsProcess : public BaseProcess<TDerived> {
public:
};
/**
* ProcessTraits specialization to flag CascadeEquationsProcess objects.
*/
template <typename TProcess>
struct is_cascade_equations_process<
TProcess, std::enable_if_t<std::is_base_of_v<
CascadeEquationsProcess<typename std::decay_t<TProcess>>,
typename std::decay_t<TProcess>>>> : std::true_type {};
//! @}
} // 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