Dune Core Modules (2.9.0)

datacollectorcaps.hh
1#ifndef DUNE_ALUGRID_3D_DATACOLLECTORCAPS_HH
2#define DUNE_ALUGRID_3D_DATACOLLECTORCAPS_HH
3
4namespace ALUGrid
5{
6
7 namespace DataCollectorCaps
8 {
9
10 template< class DataCollector >
11 class HasUserDefinedPartitioning
12 {
13 typedef char Small;
14 struct Big { char dummy[2]; };
15
16 template< class T, T > struct TypeCheck;
17
18 typedef bool (DataCollector::*Method)() const;
19
20 template< class T >
21 static Small test ( TypeCheck< Method, &T::userDefinedPartitioning > * );
22 template< class T >
23 static Big test ( ... );
24
25 public:
26 static const bool v = (sizeof( test< DataCollector >( 0 ) ) == sizeof( Small ));
27 };
28
29 template< class DataCollector >
30 class HasUserDefinedLoadWeights
31 {
32 typedef char Small;
33 struct Big { char dummy[2]; };
34
35 template< class T, T > struct TypeCheck;
36
37 typedef bool (DataCollector::*Method)() const;
38
39 template< class T >
40 static Small test ( TypeCheck< Method, &T::userDefinedLoadWeights > * );
41 template< class T >
42 static Big test ( ... );
43
44 public:
45 static const bool v = (sizeof( test< DataCollector >( 0 ) ) == sizeof( Small ));
46 };
47
48 } // namespace DataCollectorCaps
49
50} // namespace Dune
51
52#endif // #ifndef DUNE_ALUGRID_3D_DATACOLLECTORCAPS_HH
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)