Dune Core Modules (2.4.2)

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