inlib
1.2.0
|
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved. 00002 // See the file inlib.license for terms. 00003 00004 #ifndef inlib_stype 00005 #define inlib_stype 00006 00007 //used in rroot leaf template. 00008 00009 #include "typedefs" 00010 00011 #include <string> 00012 00013 namespace inlib { 00014 00015 inline const std::string& stype(unsigned char) { 00016 static const std::string s_v("unsigned char"); 00017 return s_v; 00018 } 00019 00020 inline const std::string& stype(char) { 00021 static const std::string s_v("char"); 00022 return s_v; 00023 } 00024 00025 inline const std::string& stype(unsigned short) { 00026 static const std::string s_v("unsigned short"); 00027 return s_v; 00028 } 00029 00030 inline const std::string& stype(short) { 00031 static const std::string s_v("short"); 00032 return s_v; 00033 } 00034 00035 inline const std::string& stype(int) { 00036 static const std::string s_v("int"); 00037 return s_v; 00038 } 00039 00040 inline const std::string& stype(unsigned int) { 00041 static const std::string s_v("unsigned int"); 00042 return s_v; 00043 } 00044 00045 inline const std::string& stype(float) { 00046 static const std::string s_v("float"); 00047 return s_v; 00048 } 00049 00050 inline const std::string& stype(double) { 00051 static const std::string s_v("double"); 00052 return s_v; 00053 } 00054 00055 // for inlib::mcol<T> : 00056 inline const std::string& stype(int64) { 00057 static const std::string s_v("inlib::int64"); 00058 return s_v; 00059 } 00060 inline const std::string& stype(uint64) { 00061 static const std::string s_v("inlib::uint64"); 00062 return s_v; 00063 } 00064 inline const std::string& stype(const std::string&) { 00065 static const std::string s_v("std::string"); 00066 return s_v; 00067 } 00068 00069 } 00070 00071 #endif