Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
+14 -4
View File
@@ -18,17 +18,15 @@
namespace tools {
class mem {
public:
protected:
mem(){increment();}
virtual ~mem(){decrement();}
private:
mem(const mem&){}
mem& operator=(const mem&){return *this;}
public:
static void increment(){counter()++;}
static void decrement(){counter()--;}
static void increment(const char* a_class){
counter()++;
if(check_by_class()) {
@@ -90,11 +88,13 @@ public:
}
list().clear();
}
private:
static int& counter() {
static int s_count = 0;
return s_count;
}
protected:
static bool& check_by_class() {
static bool s_check_by_class = false;
return s_check_by_class;
@@ -108,6 +108,16 @@ private:
}
};
inline const std::string& s_new() {
static const std::string s_v("new");
return s_v;
}
inline const std::string& s_malloc() {
static const std::string s_v("malloc");
return s_v;
}
}
#endif