Changeset 445 for XIOS/trunk/src/attribute_enum_impl.hpp
- Timestamp:
- 06/19/13 10:09:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/attribute_enum_impl.hpp
r380 r445 75 75 } 76 76 77 78 template <class T> 79 void CAttributeEnum<T>::setInheritedValue(const CAttribute& attr) 80 { 81 this->setInheritedValue(dynamic_cast<const CAttributeEnum<T>& >(attr)) ; 82 } 83 84 template <class T> 85 void CAttributeEnum<T>::setInheritedValue(const CAttributeEnum& attr) 86 { 87 if (this->isEmpty() && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()) ; 88 } 89 90 template <class T> 91 typename T::t_enum CAttributeEnum<T>::getInheritedValue(void) const 92 { 93 if (this->isEmpty()) return inheritedValue.get() ; 94 else return getValue() ; 95 } 96 97 template <class T> 98 string CAttributeEnum<T>::getInheritedStringValue(void) const 99 { 100 return CEnum<T>::toString() ; 101 if (this->isEmpty()) return inheritedValue.toString() ; 102 else return CEnum<T>::toString() ; ; 103 } 104 105 template <class T> 106 bool CAttributeEnum<T>::hasInheritedValue(void) const 107 { 108 return !this->isEmpty() || !inheritedValue.isEmpty() ; 109 } 110 77 111 //--------------------------------------------------------------- 78 112
Note: See TracChangeset
for help on using the changeset viewer.