dune-grid  2.2.0
common/interfaces.hh
Go to the documentation of this file.
1 #ifndef DUNE_ALUGRID_INTERFACES_HH
2 #define DUNE_ALUGRID_INTERFACES_HH
3 
4 #include <dune/common/typetraits.hh>
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  Conversion<GridImp, HasObjectStream>::exists,
38  GridImp,
39  DefaultImp> GridObjectStreamTraits;
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