Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
// mf for multiple field.
|
||||
|
||||
// bmf is intended to have no implementation of :
|
||||
// virtual bool write(io::iwbuf&)
|
||||
// virtual bool read(io::irbuf&)
|
||||
// virtual bool write(io::iwbuf&)
|
||||
// virtual bool read(io::irbuf&)
|
||||
|
||||
#include "field"
|
||||
|
||||
@@ -54,16 +54,16 @@ public:
|
||||
bool operator==(const bmf& a_from) const {
|
||||
return m_values==a_from.m_values;
|
||||
}
|
||||
bool operator!=(const bmf& a_from) const {
|
||||
bool operator!=(const bmf& a_from) const {
|
||||
return !operator==(a_from);
|
||||
}
|
||||
const T& operator[](size_t a_index) const {
|
||||
//WARNING : no check is done on a_index.
|
||||
return m_values[a_index];
|
||||
return m_values[a_index];
|
||||
}
|
||||
T& operator[](size_t a_index) {
|
||||
//WARNING : no check is done on a_index.
|
||||
return m_values[a_index];
|
||||
return m_values[a_index];
|
||||
}
|
||||
public:
|
||||
size_t size() const {return m_values.size();}
|
||||
@@ -116,12 +116,12 @@ public:
|
||||
}
|
||||
void set_value(const T& a_value) { //used in ArcheryTune.
|
||||
bool to_resize = m_values.size()==1?false:true;
|
||||
bool is_eq = ( (m_values.size()>=1) && (m_values[0]==a_value) ) ? true : false;
|
||||
bool is_eq = ( (m_values.size()>=1) && (m_values[0]==a_value) ) ? true : false;
|
||||
if(to_resize) m_values.resize(1);
|
||||
if(to_resize || !is_eq) m_touched = true;
|
||||
m_values[0] = a_value;
|
||||
}
|
||||
|
||||
|
||||
public: //for iv2sg
|
||||
//bool setValues(size_t a_index,size_t a_num,const T* a_vs) {
|
||||
// for(size_t index=0;index<a_num;index++) {
|
||||
@@ -148,7 +148,7 @@ public: //for iv2sg
|
||||
return true;
|
||||
}
|
||||
bool setValue(const T& a_value) {set_value(a_value);return true;}
|
||||
|
||||
|
||||
bmf& operator=(const T& a_v){
|
||||
if(!setValue(a_v)) {}
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user