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
+16 -7
View File
@@ -25,6 +25,11 @@ public:
base_handle(){
#ifdef TOOLS_MEM
mem::increment(s_class().c_str());
#endif
}
base_handle(const std::string& a_class):m_class(a_class){
#ifdef TOOLS_MEM
mem::increment(s_class().c_str());
#endif
}
virtual ~base_handle(){
@@ -33,15 +38,20 @@ public:
#endif
}
protected:
base_handle(base_handle&){
base_handle(base_handle& a_from):m_class(a_from.m_class){
#ifdef TOOLS_MEM
mem::increment(s_class().c_str());
#endif
}
private:
//base_handle(const base_handle&){}
//base_handle& operator=(const base_handle&){return *this;}
base_handle& operator=(base_handle&){return *this;}
base_handle& operator=(base_handle& a_from){
m_class = a_from.m_class;
return *this;
}
public:
const std::string& object_class() const {return m_class;}
private:
std::string m_class;
};
template <class T>
@@ -52,9 +62,8 @@ public:
virtual base_handle* copy() {return new handle<T>(*this);}
virtual void disown() {m_owner = false;}
public:
handle(T* a_obj,bool a_owner = true)
:parent()
,m_obj(a_obj),m_owner(a_owner){}
handle(T* a_obj,bool a_owner = true):parent(),m_obj(a_obj),m_owner(a_owner){}
handle(const std::string& a_class,T* a_obj,bool a_owner = true):parent(a_class),m_obj(a_obj),m_owner(a_owner){}
virtual ~handle(){if(m_owner) delete m_obj;}
private:
handle(handle& a_from):parent(a_from){