Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
// Copyright (C) 2010, Guy Barrand. All rights reserved.
|
||||
// See the file tools.license for terms.
|
||||
|
||||
#ifndef tools_S_STRING
|
||||
#define tools_S_STRING
|
||||
|
||||
// a few place in which a cpp macro help the readability.
|
||||
|
||||
#define TOOLS_CLASS_STRING(a_name)\
|
||||
static const std::string& s_##a_name() {\
|
||||
static const std::string s_v(#a_name);\
|
||||
return s_v;\
|
||||
}
|
||||
|
||||
#define TOOLS_CLASS_STRING_VALUE(a_name,a_value)\
|
||||
static const std::string& s_##a_name() {\
|
||||
static const std::string s_v(#a_value);\
|
||||
return s_v;\
|
||||
}
|
||||
|
||||
#define TOOLS_GLOBAL_STRING(a_name)\
|
||||
inline const std::string& s_##a_name() {\
|
||||
static const std::string s_v(#a_name);\
|
||||
return s_v;\
|
||||
}
|
||||
|
||||
#define TOOLS_GLOBAL_ARG(a_name)\
|
||||
inline const std::string& s_##a_name() {\
|
||||
static const std::string s_v(std::string("-")+std::string(#a_name));\
|
||||
return s_v;\
|
||||
}
|
||||
|
||||
#define TOOLS_SCLASS(a_name)\
|
||||
static const std::string& s_class() {\
|
||||
static const std::string s_v(#a_name);\
|
||||
return s_v;\
|
||||
}\
|
||||
static void check_class_name() {a_name::s_class();}
|
||||
|
||||
#define TOOLS_T_SCLASS(a_T,a_name)\
|
||||
static const std::string& s_class() {\
|
||||
static const std::string s_v(#a_name);\
|
||||
return s_v;\
|
||||
}\
|
||||
static void check_class_name() {a_name<a_T>::s_class();}
|
||||
|
||||
#define TOOLS_SCLASS_NO_CHECK(a_name)\
|
||||
static const std::string& s_class() {\
|
||||
static const std::string s_v(#a_name);\
|
||||
return s_v;\
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user