Changeset 1219 for XIOS/dev/XIOS_DEV_CMIP6/src/attribute_array_impl.hpp
- Timestamp:
- 07/18/17 11:50:10 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/attribute_array_impl.hpp
r1158 r1219 104 104 105 105 template <typename T_numtype, int N_rank> 106 bool CAttributeArray<T_numtype,N_rank>::isEqual(const CAttribute Array& attr)106 bool CAttributeArray<T_numtype,N_rank>::isEqual(const CAttribute& attr) 107 107 { 108 return ((dynamic_cast<CArray<T_numtype,N_rank>& >(*this)) == (dynamic_cast<const CArray<T_numtype,N_rank>& >(attr))); 108 const CAttributeArray<T_numtype,N_rank>& tmp = dynamic_cast<const CAttributeArray<T_numtype,N_rank>& >(attr); 109 return this->isEqual_(tmp); 109 110 } 110 111 111 112 template <typename T_numtype, int N_rank> 112 bool CAttributeArray<T_numtype,N_rank>::isEqual (const CAttribute& attr)113 bool CAttributeArray<T_numtype,N_rank>::isEqual_(const CAttributeArray& attr) 113 114 { 114 return ((*this) == (dynamic_cast<const CAttributeArray<T_numtype,N_rank>& >(attr))); 115 if ((!this->hasInheritedValue() && !attr.hasInheritedValue())) 116 return true; 117 if (this->hasInheritedValue() && attr.hasInheritedValue()) 118 return (this->getInheritedValue() == attr.getInheritedValue()); 119 else 120 return false; 115 121 } 116 122
Note: See TracChangeset
for help on using the changeset viewer.