dune-grid  2.3.1
grapedataioformattypes.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_GRAPEDATAIOFORMATTYPE_HH
4 #define DUNE_GRAPEDATAIOFORMATTYPE_HH
5 
6 //- system includes
7 #include <string>
8 
9 namespace Dune {
10 
15  { ascii = 0 ,
16  xdr = 1 ,
17  pgm = 2 };
19 
20 
21  typedef std::string GrapeIOStringType;
22 
25  template <typename T>
27  {
28  GrapeIOStringType tmp = "unknown";
29  return tmp;
30  }
31 
32  template <>
34  {
35  GrapeIOStringType tmp = "float";
36  return tmp;
37  }
38 
39  template <>
41  {
42  GrapeIOStringType tmp = "int";
43  return tmp;
44  }
45 
46  template <>
48  {
49  GrapeIOStringType tmp = "double";
50  return tmp;
51  }
52 
53 } // end namespace Dune
54 
55 #endif
GrapeIOStringType typeIdentifier< int >()
Definition: grapedataioformattypes.hh:40
Definition: grapedataioformattypes.hh:16
Definition: grapedataioformattypes.hh:18
std::string GrapeIOStringType
Definition: grapedataioformattypes.hh:21
GrapeIOStringType typeIdentifier< float >()
Definition: grapedataioformattypes.hh:33
GrapeIOFileFormatType
Definition: grapedataioformattypes.hh:14
GrapeIOStringType typeIdentifier()
convert type to string
Definition: grapedataioformattypes.hh:26
store data in a human readable form
Definition: grapedataioformattypes.hh:15
GrapeIOStringType typeIdentifier< double >()
Definition: grapedataioformattypes.hh:47