Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
+28
View File
@@ -0,0 +1,28 @@
// Copyright (C) 2010, Guy Barrand. All rights reserved.
// See the file tools.license for terms.
#ifndef tools_scast
#define tools_scast
// For implementations of cast methods.
#include "safe_cast"
#include "rcmp"
namespace tools {
template <class TO>
inline void* cmp_cast(const TO* a_this,const std::string& a_class) {
if(!rcmp(a_class,TO::s_class())) return 0;
return (void*)static_cast<const TO*>(a_this);
}
template <class TO>
inline void* cmp_cast(const TO* a_this,cid a_id) {
if(TO::id_class()!=a_id) return 0;
return (void*)static_cast<const TO*>(a_this);
}
}
#endif