00001 #ifndef Impala_Core_Array_Element_TypeString_h
00002 #define Impala_Core_Array_Element_TypeString_h
00003
00004 #include <string>
00005 #include "Basis/NativeTypes.h"
00006
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Array
00012 {
00013 namespace Element
00014 {
00015
00016
00017 template <class Type>
00018 inline std::string
00019 TypeString(Type v)
00020 {
00021 return std::string("unknown");
00022 }
00023
00024
00025
00026 template <>
00027 inline std::string
00028 TypeString<UInt8>(UInt8 v)
00029 {
00030 return std::string("uint8");
00031 }
00032
00033 template <>
00034 inline std::string
00035 TypeString<UInt16>(UInt16 v)
00036 {
00037 return std::string("uint16");
00038 }
00039
00040 template <>
00041 inline std::string
00042 TypeString<UInt32>(UInt32 v)
00043 {
00044 return std::string("uint32");
00045 }
00046
00047 template <>
00048 inline std::string
00049 TypeString<UInt64>(UInt64 v)
00050 {
00051 return std::string("uint64");
00052 }
00053
00054 template <>
00055 inline std::string
00056 TypeString<Int8>(Int8 v)
00057 {
00058 return std::string("int8");
00059 }
00060
00061 template <>
00062 inline std::string
00063 TypeString<Int16>(Int16 v)
00064 {
00065 return std::string("int16");
00066 }
00067
00068 template <>
00069 inline std::string
00070 TypeString<Int32>(Int32 v)
00071 {
00072 return std::string("int32");
00073 }
00074
00075 template <>
00076 inline std::string
00077 TypeString<Int64>(Int64 v)
00078 {
00079 return std::string("int64");
00080 }
00081
00082 template <>
00083 inline std::string
00084 TypeString<Real32>(Real32 v)
00085 {
00086 return std::string("real32");
00087 }
00088
00089 template <>
00090 inline std::string
00091 TypeString<Real64>(Real64 v)
00092 {
00093 return std::string("real64");
00094 }
00095
00096 }
00097 }
00098 }
00099 }
00100
00101 #endif