00001 #ifndef DUNE_GRAPEDATAIOFORMATTYPE_HH
00002 #define DUNE_GRAPEDATAIOFORMATTYPE_HH
00003
00004
00005 #include <string>
00006
00007 namespace Dune {
00008
00012 enum GrapeIOFileFormatType
00013 { ascii = 0 ,
00014 xdr = 1 ,
00015
00016 pgm = 2 };
00017
00018
00019 typedef std::string GrapeIOStringType;
00020
00023 template <typename T>
00024 inline GrapeIOStringType typeIdentifier ()
00025 {
00026 GrapeIOStringType tmp = "unknown";
00027 return tmp;
00028 }
00029
00030 template <>
00031 inline GrapeIOStringType typeIdentifier<float> ()
00032 {
00033 GrapeIOStringType tmp = "float";
00034 return tmp;
00035 }
00036
00037 template <>
00038 inline GrapeIOStringType typeIdentifier<int> ()
00039 {
00040 GrapeIOStringType tmp = "int";
00041 return tmp;
00042 }
00043
00044 template <>
00045 inline GrapeIOStringType typeIdentifier<double> ()
00046 {
00047 GrapeIOStringType tmp = "double";
00048 return tmp;
00049 }
00050
00051 }
00052
00053 #endif