Dune Core Modules (2.4.2)

backuprestore.hh
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
7
8namespace 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 >
100 : public BackupRestoreFacility< Grid >
101 {};
102
103} // namespace Dune
104
105#endif // #ifndef DUNE_GRID_COMMON_BACKUPRESTORE_HH
Grid abstract base class.
Definition: grid.hh:388
Default exception for dummy implementations.
Definition: exceptions.hh:288
A few common exception classes.
#define DUNE_THROW(E, m)
Definition: exceptions.hh:243
Dune namespace.
Definition: alignment.hh:10
facility for writing and reading grids
Definition: backuprestore.hh:41
static Grid * restore(const std::string &filename)
read a hierarchic grid from disk
Definition: backuprestore.hh:76
static Grid * restore(std::istream &stream)
read a hierarchic grid from a stream
Definition: backuprestore.hh:89
static void backup(const Grid &grid, std::ostream &stream)
write a hierarchic grid into a stream
Definition: backuprestore.hh:63
static void backup(const Grid &grid, const std::string &filename)
write a hierarchic grid to disk
Definition: backuprestore.hh:49
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)