CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
ProcessTraits.hpp
Go to the documentation of this file.
1 /*
2  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
15 #include <type_traits>
16 
17 namespace corsika {
18 
22  template <typename TProcess, typename TEnable = void>
23  struct is_process : std::false_type {};
24 
25  template <typename TProcess>
26  bool constexpr is_process_v = is_process<TProcess>::value;
27 
31  template <typename TProcess, typename Enable = void>
32  struct is_continuous_process : std::false_type {};
33 
34  template <typename TProcess>
35  bool constexpr is_continuous_process_v = is_continuous_process<TProcess>::value;
36 
40  template <typename TProcess, typename Enable = void>
41  struct is_decay_process : std::false_type {};
42 
43  template <typename TProcess>
44  bool constexpr is_decay_process_v = is_decay_process<TProcess>::value;
45 
49  template <typename TProcess, typename Enable = void>
50  struct is_stack_process : std::false_type {};
51 
52  template <typename TProcess>
53  bool constexpr is_stack_process_v = is_stack_process<TProcess>::value;
54 
58  template <typename TProcess, typename Enable = void>
59  struct is_secondaries_process : std::false_type {};
60 
61  template <typename TProcess>
62  bool constexpr is_secondaries_process_v = is_secondaries_process<TProcess>::value;
63 
67  template <typename TProcess, typename Enable = void>
68  struct is_boundary_process : std::false_type {};
69 
70  template <typename TProcess>
71  bool constexpr is_boundary_process_v = is_boundary_process<TProcess>::value;
72 
76  template <typename TProcess, typename Enable = void>
77  struct is_interaction_process : std::false_type {};
78 
79  template <typename TProcess>
80  bool constexpr is_interaction_process_v = is_interaction_process<TProcess>::value;
81 
85  template <typename TClass>
86  struct contains_stack_process : std::false_type {};
87 
88  template <typename TClass>
89  bool constexpr contains_stack_process_v = contains_stack_process<TClass>::value;
90 
94  template <typename TProcess, int N = 0, typename Enable = void>
95  struct count_processes {
96  static unsigned int constexpr count = N;
97  };
98 
99 } // namespace corsika
traits class to count any type of Process, general version
A traits marker to identify BaseProcess, thus any type of process.
A traits marker to identify InteractionProcess.
A traits marker to identify StackProcess.
The cascade namespace assembles all objects needed to simulate full particles cascades.
A traits marker to identify DecayProcess.
A traits marker to identify ContinuousProcess.
A traits marker to identify ProcessSequence that contain a StackProcess.
A traits marker to identify BoundaryProcess.
A traits marker to identify SecondariesProcess.