dune-grid  2.4.1
common/backuprestore.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_GRID_COMMON_BACKUPRESTORE_HH
4 #define DUNE_GRID_COMMON_BACKUPRESTORE_HH
5 
6 #include <dune/common/exceptions.hh>
7 
8 namespace Dune
9 {
10 
39  template< class Grid >
41  {
49  static void backup ( const Grid &grid, const std::string &filename )
50  {
51  DUNE_THROW( NotImplemented, "backup / restore not implemented." );
52  }
53 
63  static void backup ( const Grid &grid, std::ostream &stream )
64  {
65  DUNE_THROW( NotImplemented, "backup / restore not implemented." );
66  }
67 
76  static Grid *restore ( const std::string &filename )
77  {
78  DUNE_THROW( NotImplemented, "backup / restore not implemented." );
79  }
80 
89  static Grid *restore ( std::istream &stream )
90  {
91  DUNE_THROW( NotImplemented, "backup / restore not implemented." );
92  }
93  };
94 
98  template< class Grid >
99  struct BackupRestoreFacility< const Grid >
100  : public BackupRestoreFacility< Grid >
101  {};
102 
103 } // namespace Dune
104 
105 #endif // #ifndef DUNE_GRID_COMMON_BACKUPRESTORE_HH
static void backup(const Grid &grid, const std::string &filename)
write a hierarchic grid to disk
Definition: common/backuprestore.hh:49
static Grid * restore(const std::string &filename)
read a hierarchic grid from disk
Definition: common/backuprestore.hh:76
static void backup(const Grid &grid, std::ostream &stream)
write a hierarchic grid into a stream
Definition: common/backuprestore.hh:63
static Grid * restore(std::istream &stream)
read a hierarchic grid from a stream
Definition: common/backuprestore.hh:89
Grid abstract base classThis class is the base class for all grid implementations. Although no virtual functions are used we call it abstract since its methods do not contain an implementation but forward to the methods of the derived class via the Barton-Nackman trick.
Definition: common/grid.hh:388
Include standard header files.
Definition: agrid.hh:59
facility for writing and reading grids
Definition: common/backuprestore.hh:40