dune-alugrid  2.8-git
interfaces.hh
Go to the documentation of this file.
1 #ifndef DUNE_ALUGRID_INTERFACES_HH
2 #define DUNE_ALUGRID_INTERFACES_HH
3 
4 #include <type_traits>
5 
11 namespace Dune {
12 
14  struct HasObjectStream {};
15 
18  template <bool hasStream, class GridImp, class DefaultImp>
20  typedef typename GridImp::InStreamType InStreamType;
21  typedef typename GridImp::OutStreamType OutStreamType;
22  };
23 
26  template <class GridImp, class DefaultImp>
27  struct GridObjectStreamOrDefaultHelper<false, GridImp, DefaultImp> {
28  typedef DefaultImp InStreamType;
29  typedef DefaultImp OutStreamType;
30  };
31 
33  template <class GridImp, class DefaultImp>
35  {
37  std::is_base_of< HasObjectStream, GridImp >::value,
38  GridImp,
40 
41  typedef typename GridObjectStreamTraits :: InStreamType InStreamType; // read stream
42  typedef typename GridObjectStreamTraits :: OutStreamType OutStreamType; // write stream
43  };
44 
46  struct IsDofManager {};
47 
50 
51 } // end namespace Dune
52 #endif
Definition: alu3dinclude.hh:63
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:14
Definition: interfaces.hh:19
GridImp::OutStreamType OutStreamType
Definition: interfaces.hh:21
GridImp::InStreamType InStreamType
Definition: interfaces.hh:20
Template to choose right Object stream type for a given class.
Definition: interfaces.hh:35
GridObjectStreamOrDefaultHelper< std::is_base_of< HasObjectStream, GridImp >::value, GridImp, DefaultImp > GridObjectStreamTraits
Definition: interfaces.hh:39
GridObjectStreamTraits ::InStreamType InStreamType
Definition: interfaces.hh:41
GridObjectStreamTraits ::OutStreamType OutStreamType
Definition: interfaces.hh:42
Tagging interface to indicate that class is of Type DofManager.
Definition: interfaces.hh:46
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:49