Warning, /include/Geant4/tools/stype is written in an unsupported language. File is not indexed.
0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003
0004 #ifndef tools_stype
0005 #define tools_stype
0006
0007 //used in rroot leaf template.
0008
0009 #include "typedefs"
0010
0011 #include <string>
0012
0013 namespace tools {
0014
0015 inline const std::string& stype(unsigned char) {
0016 static const std::string s_v("unsigned char");
0017 return s_v;
0018 }
0019
0020 inline const std::string& stype(char) {
0021 static const std::string s_v("char");
0022 return s_v;
0023 }
0024
0025 inline const std::string& stype(unsigned short) {
0026 static const std::string s_v("unsigned short");
0027 return s_v;
0028 }
0029
0030 inline const std::string& stype(short) {
0031 static const std::string s_v("short");
0032 return s_v;
0033 }
0034
0035 inline const std::string& stype(int) {
0036 static const std::string s_v("int");
0037 return s_v;
0038 }
0039
0040 inline const std::string& stype(unsigned int) {
0041 static const std::string s_v("unsigned int");
0042 return s_v;
0043 }
0044
0045 inline const std::string& stype(float) {
0046 static const std::string s_v("float");
0047 return s_v;
0048 }
0049
0050 inline const std::string& stype(double) {
0051 static const std::string s_v("double");
0052 return s_v;
0053 }
0054
0055 inline const std::string& stype(bool) {
0056 static const std::string s_v("bool");
0057 return s_v;
0058 }
0059
0060 // for tools::mcol<T> :
0061 inline const std::string& stype(int64) {
0062 static const std::string s_v("tools::int64");
0063 return s_v;
0064 }
0065 inline const std::string& stype(uint64) {
0066 static const std::string s_v("tools::uint64");
0067 return s_v;
0068 }
0069 inline const std::string& stype(const std::string&) {
0070 static const std::string s_v("std::string");
0071 return s_v;
0072 }
0073
0074 // for introspection templated fields or class methods :
0075 template <class T>
0076 inline const std::string& stype(const T&) {return T::s_class();}
0077
0078 }
0079
0080 #include <vector>
0081
0082 namespace tools {
0083
0084 // for sg::entries mf_vec< std::vector<std::string> ,std::string> opts;
0085 inline const std::string& stype(const std::vector<std::string>&) {
0086 static const std::string s_v("std::vector<std::string>");
0087 return s_v;
0088 }
0089
0090 }
0091
0092 #endif