Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
+31
View File
@@ -29,6 +29,10 @@ inline bool to(const std::string& a_string,bool& a_value,bool a_def = false){
}
}
inline bool tob(const std::string& a_string,bool& a_value,bool a_def = false){
return to(a_string,a_value,a_def);
}
}
#include <sstream>
@@ -54,4 +58,31 @@ inline bool to(T& a_field,const std::string& a_s,bool& a_changed){
}
#include <ostream>
namespace tools {
template <class T>
inline bool to(std::ostream& a_out,const std::string& a_string,T& a_value){
if(!to<T>(a_string,a_value)) {
a_out << "Passed value \"" << a_string << "\""
<< " is of bad type."
<< std::endl;
return false;
}
return true;
}
inline bool to(std::ostream& a_out,const std::string& a_string,bool& a_value){
if(!to(a_string,a_value)) {
a_out << "Passed value \"" << a_string << "\""
<< " is not a boolean."
<< std::endl;
return false;
}
return true;
}
}
#endif