Changeset 1106 for XIOS/trunk/src/node/scalar.cpp
- Timestamp:
- 04/25/17 10:57:55 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/scalar.cpp
r976 r1106 65 65 } 66 66 67 /*! 68 Compare two scalar objects. 69 They are equal if only if they have identical attributes as well as their values. 70 Moreover, they must have the same transformations. 71 \param [in] scalar Compared scalar 72 \return result of the comparison 73 */ 74 bool CScalar::isEqual(CScalar* obj) 75 { 76 bool objEqual = SuperClass::isEqual(obj); 77 if (!objEqual) return objEqual; 78 79 TransMapTypes thisTrans = this->getAllTransformations(); 80 TransMapTypes objTrans = obj->getAllTransformations(); 81 82 TransMapTypes::const_iterator it, itb, ite; 83 std::vector<ETranformationType> thisTransType, objTransType; 84 for (it = thisTrans.begin(); it != thisTrans.end(); ++it) 85 thisTransType.push_back(it->first); 86 for (it = objTrans.begin(); it != objTrans.end(); ++it) 87 objTransType.push_back(it->first); 88 89 if (thisTransType.size() != objTransType.size()) return false; 90 for (int idx = 0; idx < thisTransType.size(); ++idx) 91 objEqual &= (thisTransType[idx] == objTransType[idx]); 92 93 return objEqual; 94 } 95 67 96 CTransformation<CScalar>* CScalar::addTransformation(ETranformationType transType, const StdString& id) 68 97 { … … 84 113 { 85 114 return transformationMap_; 86 }87 88 /*!89 Check the validity of all transformations applied on scalar90 This functions is called AFTER all inherited attributes are solved91 */92 void CScalar::checkTransformations()93 {94 TransMapTypes::const_iterator itb = transformationMap_.begin(), it,95 ite = transformationMap_.end();96 // for (it = itb; it != ite; ++it)97 // {98 // (it->second)->checkValid(this);99 // }100 115 } 101 116
Note: See TracChangeset
for help on using the changeset viewer.