/** * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu * * See file AUTHORS for a list of contributors. * * 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. */ #ifndef _include_corsika_baseprocess_h_ #define _include_corsika_baseprocess_h_ #include <corsika/process/ProcessReturn.h> // for convenience namespace corsika::process { /** \class BaseProcess The structural base type of a process object in a ProcessSequence. Both, the ProcessSequence and all its elements are of type BaseProcess<T> */ template <typename derived> struct BaseProcess { derived& GetRef() { return static_cast<derived&>(*this); } const derived& GetRef() const { return static_cast<const derived&>(*this); } /* template <typename Particle, typename Stack> inline EProcessReturn DoDiscrete(Particle&, Stack&) const; // {} template <typename Particle, typename Track, typename Stack> inline EProcessReturn DoContinuous(Particle&, Track&, Stack&) const; // {} */ /* template <typename Particle, typename Track> inline double GetInverseInteractionLength(Particle& p, Track& t) const { return 1./GetRef().GetInteractionLength(p, t); } */ }; /* template<template<typename, typename> class T, typename A, typename B> typename BaseProcess< T<A, B> >::is_process_sequence { static const bool value = true; }; */ /* template <typename T> struct is_base { static const bool value = false; }; template <typename T> struct is_base<BaseProcess<T>> { static const bool value = true; }; */ } // namespace corsika::process #endif