dune-grid  2.4.1-rc2
interfaces.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_ALUGRID_INTERFACES_HH
4 #define DUNE_ALUGRID_INTERFACES_HH
5 
6 #include <dune/common/typetraits.hh>
7 
13 namespace Dune {
14 
16  struct HasObjectStream {};
17 
20  template <bool hasStream, class GridImp, class DefaultImp>
22  typedef typename GridImp::InStreamType InStreamType;
23  typedef typename GridImp::OutStreamType OutStreamType;
24  };
25 
28  template <class GridImp, class DefaultImp>
29  struct GridObjectStreamOrDefaultHelper<false, GridImp, DefaultImp> {
30  typedef DefaultImp InStreamType;
31  typedef DefaultImp OutStreamType;
32  };
33 
35  template <class GridImp, class DefaultImp>
37  {
39  Conversion<GridImp, HasObjectStream>::exists,
40  GridImp,
42 
43  typedef typename GridObjectStreamTraits :: InStreamType InStreamType; // read stream
44  typedef typename GridObjectStreamTraits :: OutStreamType OutStreamType; // write stream
45  };
46 
48  struct IsDofManager {};
49 
52 
53 } // end namespace Dune
54 #endif
GridObjectStreamOrDefaultHelper< Conversion< GridImp, HasObjectStream >::exists, GridImp, DefaultImp > GridObjectStreamTraits
Definition: interfaces.hh:41
GridImp::InStreamType InStreamType
Definition: interfaces.hh:22
GridObjectStreamTraits::OutStreamType OutStreamType
Definition: interfaces.hh:44
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:16
Tagging interface to indicate that class is of Type DofManager.
Definition: interfaces.hh:48
Definition: interfaces.hh:21
GridObjectStreamTraits::InStreamType InStreamType
Definition: interfaces.hh:43
Include standard header files.
Definition: agrid.hh:59
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:51
GridImp::OutStreamType OutStreamType
Definition: interfaces.hh:23
Template to choose right Object stream type for a given class.
Definition: interfaces.hh:36