dune-alugrid  3.0.0
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
Dune::GridObjectStreamOrDefaultHelper< false, GridImp, DefaultImp >::OutStreamType
DefaultImp OutStreamType
Definition: interfaces.hh:29
Dune::GridObjectStreamOrDefault::OutStreamType
GridObjectStreamTraits ::OutStreamType OutStreamType
Definition: interfaces.hh:42
Dune::GridObjectStreamOrDefault
Template to choose right Object stream type for a given class.
Definition: interfaces.hh:34
Dune::GridObjectStreamOrDefaultHelper::OutStreamType
GridImp::OutStreamType OutStreamType
Definition: interfaces.hh:21
Dune::GridObjectStreamOrDefault::InStreamType
GridObjectStreamTraits ::InStreamType InStreamType
Definition: interfaces.hh:41
Dune::HasObjectStream
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:14
Dune::GridObjectStreamOrDefaultHelper::InStreamType
GridImp::InStreamType InStreamType
Definition: interfaces.hh:20
Dune::GridObjectStreamOrDefaultHelper< false, GridImp, DefaultImp >::InStreamType
DefaultImp InStreamType
Definition: interfaces.hh:28
Dune::IsDofManager
Tagging interface to indicate that class is of Type DofManager.
Definition: interfaces.hh:46
Dune::GridObjectStreamOrDefaultHelper
Definition: interfaces.hh:19
Dune
Definition: alu3dinclude.hh:79
Dune::HasHierarchicIndexSet
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:49
Dune::GridObjectStreamOrDefault::GridObjectStreamTraits
GridObjectStreamOrDefaultHelper< std::is_base_of< HasObjectStream, GridImp >::value, GridImp, DefaultImp > GridObjectStreamTraits
Definition: interfaces.hh:39