dune-grid  2.2.0
common/interfaces.hh
Go to the documentation of this file.
00001 #ifndef DUNE_ALUGRID_INTERFACES_HH
00002 #define DUNE_ALUGRID_INTERFACES_HH
00003 
00004 #include <dune/common/typetraits.hh>
00005 
00011 namespace Dune {
00012 
00014   struct HasObjectStream {};
00015 
00018   template <bool hasStream, class GridImp, class DefaultImp>
00019   struct GridObjectStreamOrDefaultHelper {
00020     typedef typename GridImp::InStreamType     InStreamType;
00021     typedef typename GridImp::OutStreamType    OutStreamType;
00022   };
00023   
00026   template <class GridImp, class DefaultImp>
00027   struct GridObjectStreamOrDefaultHelper<false, GridImp, DefaultImp> {
00028     typedef DefaultImp InStreamType;
00029     typedef DefaultImp OutStreamType; 
00030   };
00031 
00033   template <class GridImp, class DefaultImp>
00034   struct GridObjectStreamOrDefault 
00035   {
00036     typedef GridObjectStreamOrDefaultHelper<
00037                 Conversion<GridImp, HasObjectStream>::exists, 
00038                 GridImp, 
00039                 DefaultImp> GridObjectStreamTraits; 
00040     
00041     typedef typename GridObjectStreamTraits :: InStreamType   InStreamType;  //  read  stream
00042     typedef typename GridObjectStreamTraits :: OutStreamType  OutStreamType; //  write stream 
00043   };
00044 
00046   struct IsDofManager {};
00047 
00049   struct HasHierarchicIndexSet {};
00050 
00051 } // end namespace Dune
00052 #endif