dune-alugrid  3.0.0
datacollectorcaps.hh
Go to the documentation of this file.
1 #ifndef DUNE_ALUGRID_3D_DATACOLLECTORCAPS_HH
2 #define DUNE_ALUGRID_3D_DATACOLLECTORCAPS_HH
3 
4 namespace ALUGrid
5 {
6 
7  namespace DataCollectorCaps
8  {
9 
10  template< class DataCollector >
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 >
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
ALUGrid::DataCollectorCaps::HasUserDefinedPartitioning
Definition: datacollectorcaps.hh:11
ALUGrid::DataCollectorCaps::HasUserDefinedLoadWeights::v
static const bool v
Definition: datacollectorcaps.hh:45
ALUGrid::DataCollectorCaps::HasUserDefinedPartitioning::v
static const bool v
Definition: datacollectorcaps.hh:26
ALUGrid
Definition: alu3dinclude.hh:49
ALUGrid::DataCollectorCaps::HasUserDefinedLoadWeights
Definition: datacollectorcaps.hh:30