Newer
Older
/**
* (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.
*/
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef _include_corsika_discreteprocess_h_
#define _include_corsika_discreteprocess_h_
#include <corsika/process/ProcessReturn.h> // for convenience
#include <iostream> // debug
namespace corsika::process {
/**
\class DiscreteProcess
The structural base type of a process object in a
ProcessSequence. Both, the ProcessSequence and all its elements
are of type DiscreteProcess<T>
*/
template <typename derived>
struct DiscreteProcess {
// DiscreteProcess() {
// static_assert(mustProvide<derived>::mustProvide, "");
//}
derived& GetRef() { return static_cast<derived&>(*this); }
const derived& GetRef() const { return static_cast<const derived&>(*this); }
// here starts the interface part
// -> enforce derived to implement DoDiscrete...
template <typename Particle, typename Stack>
inline EProcessReturn DoDiscrete(Particle&, Stack&) const; // {}
// private:
template <typename D, typename T, typename S>
inline EProcessReturn DoContinuous(D& d, T&, S&) const {
std::cout << "yeah" << std::endl;
return EProcessReturn::eOk;
} // find out how to make this FINAL
// void DoContinuous;
};
} // namespace corsika::process
#endif