Changeset 445 for XIOS/trunk/src/attribute_template_impl.hpp
- Timestamp:
- 06/19/13 10:09:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/attribute_template_impl.hpp
r432 r445 109 109 } 110 110 111 template <class T> 112 void CAttributeTemplate<T>::setInheritedValue(const CAttribute& attr) 113 { 114 this->setInheritedValue(dynamic_cast<const CAttributeTemplate<T>& >(attr)) ; 115 } 116 117 template <class T> 118 void CAttributeTemplate<T>::setInheritedValue(const CAttributeTemplate& attr) 119 { 120 if (this->isEmpty() && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()) ; 121 } 122 123 template <class T> 124 T CAttributeTemplate<T>::getInheritedValue(void) const 125 { 126 if (this->isEmpty()) return inheritedValue.get() ; 127 else return getValue() ; 128 } 129 130 template <class T> 131 bool CAttributeTemplate<T>::hasInheritedValue(void) const 132 { 133 return !this->isEmpty() || !inheritedValue.isEmpty() ; 134 } 135 111 136 //--------------------------------------------------------------- 112 137
Note: See TracChangeset
for help on using the changeset viewer.